agentleFS
krzysukrzysu/market-skills/skills/market-watchlist/SKILL.md

market-watchlist

Skill3 starsChanged 4 months agoMITView on GitHub

Asset registry — named baskets of tickers with metadata (source, tier, tracking_only, hl_proxy). Drives bulk analysis for run-watchlist, run-all-l2, run-all-l3. JSON config keyed by basket name.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not hardcode tickers elsewhere — resolve through this registry so bulk runners stay consistent.

    line 22
  2. Very specific:

    Default: skills/market-watchlist/data/watchlist.json.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

market-watchlist

The asset registry. Named baskets of tickers, each entry carrying metadata: provider, tier, tracking-only flag, HL proxy, label, free-form comment. Drives bulk analysis for run-watchlist, run-all-l2, run-all-l3. Replaces the asset-list part of the old config.json (execution-side knobs stay where they are).

Data file is gitignored at skills/market-watchlist/data/watchlist.json. Shipped example: skills/market-watchlist/examples/watchlist.example.json.

When NOT to use

  • For analysis or signals — this skill only stores/resolve ticker baskets and metadata; it never computes a verdict. Use run-watchlist / run-all-l2 / run-all-l3 for the actual run.
  • For position/price state — open positions and P&L live in position-watchdog / portfolio-mgmt; the tracking_only flag here only means "skip strategy eval".
  • Do not hardcode tickers elsewhere — resolve through this registry so bulk runners stay consistent.

Quick Start

# First time: copy the example and edit
cp skills/market-watchlist/examples/watchlist.example.json \
   skills/market-watchlist/data/watchlist.json

# Inspect
uv run skills/market-watchlist/scripts/run.py list
uv run skills/market-watchlist/scripts/run.py show crypto_majors
uv run skills/market-watchlist/scripts/run.py tickers
uv run skills/market-watchlist/scripts/run.py tickers crypto_majors
uv run skills/market-watchlist/scripts/run.py resolve btc       # → BTCUSD
uv run skills/market-watchlist/scripts/run.py resolve xle       # → XLExUSD
uv run skills/market-watchlist/scripts/run.py validate

# Machine output
uv run skills/market-watchlist/scripts/run.py --json list
uv run skills/market-watchlist/scripts/run.py --json show defi

# Custom file location (--watchlist is an alias of --config, used by
# run-watchlist and position-watchdog for cross-tool consistency)
uv run skills/market-watchlist/scripts/run.py --config /path/to/watchlist.json list
uv run skills/market-watchlist/scripts/run.py --watchlist /path/to/watchlist.json list

Data file

Default: skills/market-watchlist/data/watchlist.json. Override via:

  • --config PATH on every subcommand
  • MARKET_SKILLS_WATCHLIST_PATH env var (absolute path)

Fail-loud: a missing, unreadable, malformed, or empty registry (zero baskets / zero tickers) raises WatchlistUnavailableError from every accessor and exits every consumer non-zero. An empty registry must never silently collapse downstream batches to zero. When the env var is unset the resolver falls back to the in-repo default data file.

Schema

{
  "baskets": {
    "crypto_majors": {
      "BTCUSD": {"tier": 2, "source": "kraken", "label": "BTC"},
      "ETHUSD": {"tier": 2, "source": "kraken", "label": "ETH"}
    },
    "crypto_alts": {
      "<TICKER1>USD": {"tier": 1, "source": "kraken", "label": "<label>"},
      "hl:<PERP>":  {"tier": 1, "source": "hyperliquid", "label": "<label>"}
    },
    "macro_refs": {
      "SPYUSD": {"source": "yfinance", "yfinance_ticker": "SPY", "tracking_only": true, "sector": "stocks"},
      "IWMUSD": {"source": "yfinance", "yfinance_ticker": "IWM", "tracking_only": true, "sector": "stocks",
                 "hl_proxy": "km:SMALL2000", "hl_proxy_weight": 1.0, "hl_proxy_note": "Russell 2000 perp"}
    }
  }
}

Per-ticker metadata

FieldRequiredNotes
tiernoPriority hint (1=highest). Used by the agent brain for triage, not by analysis skills.
sourcenoOne of kraken, yfinance, hyperliquid, ccxt. Used by provider_for().
labelnoHuman-friendly name for display.
yfinance_tickernoOverride the yfinance symbol when it differs from the watchlist key (e.g. XLExUSD → XLE).
hl_coinnoHyperliquid coin name when it differs from the watchlist key.
hl_proxy / hl_proxy_weight / hl_proxy_notenoFor commodities/ETFs: route sentiment through a related HL perp.
tracking_onlynoIf true, skip strategy evaluation — only indicator reads. Used for macro/benchmark tickers.
sectornoFree-form tag (stocks, commodities, etc.) for grouping in reports.
asset_classnoL3 strategy maturity threshold class. Valid values: perp_dex, low_float (6× maturity floor), ai_infra (2×). See strategy-trend-follow Pattern S.
commentnoFree-form note for the human maintainer. Not parsed by tools.

Provider resolution

provider_for(ticker) resolves the provider in this order:

  1. Explicit provider: prefix on the ticker (e.g. hl:LIT → hyperliquid)
  2. source field in metadata
  3. None if ambiguous

The bare-alias resolver (resolve("btc")) strips common quote suffixes (USD, xUSD, EUR) so users can type btc, eth, xle, lit. Raises on ambiguous aliases.

Library use (from other skills / scripts)

from analysis.watchlist import all_tickers, by_category, basket, categories
from analysis.watchlist import metadata_for, provider_for, resolve, expand_tickers

# Flat list across all baskets
tickers = all_tickers()                                  # -> ["BTCUSD", "ETHUSD", "<TICKER1>USD", ...]

# One basket
majors = by_category("crypto_majors")                    # -> ["BTCUSD", "ETHUSD"]

# Alias resolution
ticker = resolve("btc")                                  # -> "BTCUSD"

# Accept user input with bare symbols + full tickers mixed
tickers = expand_tickers(["btc", "ETHUSD", "xle"])       # -> ["BTCUSD", "ETHUSD", "XLExUSD"]

# Provider routing
prov = provider_for("BTCUSD")                             # -> "kraken"

The skill's lib.py re-exports the same surface for compatibility with analysis.skill_loader.load_skill("market-watchlist").

Integration with other skills

SkillHow it consumes the watchlist
run-watchlistPrimary driver. Pass --basket <name> or --tickers … (accepts bare aliases).
run-all-l2 / run-all-l3Use --tickers $(...) to pipe a basket's tickers in. No automatic integration; opt-in.

The watchdog (position-watchdog) reads its own per-position config (skills/position-watchdog/data/watches.json) — different semantics (entry_price/position_size, stop/TP ladders). Keep them separate. position-watchdog --watchlist does a soft cross-ref against this registry and warns on stale tickers.

Cron integration

scripts/run.sh is a thin wrapper that activates uv and calls scripts/run.py. Cron jobs can reference it directly:

# Daily brief — run all L2+L3 on a basket, with notes auto-included
0 7 * * *  bash /path/to/market-skills/skills/run-watchlist/scripts/run.sh crypto_majors --json > /tmp/brief.json

Most edits to the watchlist itself are manual (add a new asset, change tier). Cron mostly consumes it via run-watchlist.

Workflows

Add a new asset to a basket:

# Edit skills/market-watchlist/data/watchlist.json
#   "defi": {
#     ...,
#     "MORPHOUSD": {"tier": 3, "source": "kraken", "label": "Morpho"}
#   }
uv run skills/market-watchlist/scripts/run.py validate

Bulk-scan a basket every morning:

uv run skills/run-watchlist/scripts/run.py crypto_majors --json

Triage by tier:

# Custom one-liner: list all tier-1 tickers across baskets
uv run skills/market-watchlist/scripts/run.py --json tickers | \
  jq -R 'split("\n")[] | select(length > 0)' | ...
# (or use the JSON list output + a small Python filter)

Validation

validate walks the file and reports schema errors. Use after manual edits:

uv run skills/market-watchlist/scripts/run.py validate
# OK — 8 basket(s), 41 ticker(s)

Exit codes

  • 0 — success
  • 1 — fatal (bad --config, file I/O error, schema error)
  • 2 — invalid usage (missing args, unknown subcommand)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.