market-breadth
Skill3 starsChanged 4 months agoMITView on GitHub
Cross-sectional breadth: what share of a watchlist basket outperformed the benchmark (default BTC) over a rolling N-day window. Ticker-agnostic rotation read — returns pct_beating, median member return, leaders/laggards, and an alt_rotation/mixed/btc_led regime label with uncalibrated bands. Use to decide whether the multi-day swing book leans into alts or into BTC this week.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Shubhamkumartrichy/claude-trading-skills-indiatheir own version, first seen Nov 8, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Shubhamkumartrichy/claude-trading-skills-india★ 64same name
- nimadorostkar/Claude-Skills-collection★ 37same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- beadsSkill
- backtest-engineSkill
- backtest-pipelineSkill
- backtest-trend-minerSkill
- bug-scanSkill
- daily-trade-pickSkill
- execution-kraken-perpsSkill
- execution-kraken-spotSkill
- l3-conviction-scanSkill
- market-accumulationSkill
- market-basisSkill
- market-breakoutSkill
- market-emaSkill
- market-exhaustionSkill
- market-fibonacciSkill
- market-liquidity-sweepSkill
- market-macdSkill
- market-macroSkill
- market-moversSkill
- market-notesSkill
- market-overviewSkill
- market-rsiSkill
- market-snapshotSkill
- market-squeezeSkill
- market-s-rSkill
- market-stateSkill
- market-trend-qualitySkill
- market-trendSkill
- market-valuationSkill
- market-volatilitySkill
- market-volumeSkill
- market-watchlistSkill
- portfolio-mgmtSkill
- position-watchdogSkill
- risk-engineSkill
- run-all-l2Skill
- run-all-l3Skill
- run-watchlistSkill
- strategy-accumulation-swingSkill
- strategy-breakout-confirmSkill
- strategy-exhaustion-fadeSkill
- strategy-fitness-heatmapSkill
- strategy-funding-carrySkill
- strategy-liquidity-sweepSkill
- strategy-mean-reversionSkill
- strategy-trend-followSkill
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
- Very specific: line 33
When members lack history — each series needs >= 2 usable daily closes.
- Distinctive: line 119
Never raises at the CLI; the explicit request is never substituted.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
market-breadth
Cross-sectional breadth read. One call → one breadth payload: the percentage
of a market-watchlist basket whose N-day return is strictly greater than the
benchmark's. Ticker-agnostic — there is no positional ticker; the universe
comes from a watchlist basket and the benchmark resolves from the same
registry (alias btc → canonical ticker). Logic lives skill-local in
lib.py (compute_breadth pure math, analyze for resolution + fetch);
the skill is deliberately NOT registered in analysis/registry.py
(ADR-0010).
When NOT to use
- As an entry-timing signal — breadth is a rotation/regime read for the multi-day swing book, not a per-ticker trigger. Use market-* / strategy-* skills for entries.
- As an L2 input — it is not a pattern detector: no single ticker, no
{pattern, signals, input_scores, narrative}shape, not consumable by L3 composition code (ADR-0010). - For conviction or sizing — not wired into L3 conviction or risk sizing yet; narrate-only.
- When members lack history — each series needs >= 2 usable daily closes;
members with less are excluded and named in
errors[].
Quick Start
uv run skills/market-breadth/scripts/run.py --jsonDefaults: --basket is tier_1 (falling back to the first non-empty watchlist
basket when tier_1 is absent — substitution disclosed in errors[]),
--window-days=7, --benchmark=btc.
Flags
| Flag | Default | Notes |
--json | human | Emit the AXI envelope to stdout. |
--basket=NAME | tier_1, falling back to the first non-empty watchlist basket (disclosed in errors[]) | Watchlist basket to measure. An explicit name is used verbatim: missing/empty explicit basket → AXI empty state, never raises. Empty value (--basket=) → usage error, exit 2. |
--window-days=N | 7 | Requested lookback in days. <= 0 → usage error, exit 2. Longer than the shortest available history → truncated to the effective window, disclosed in errors[]. |
--benchmark=ALIAS | btc | Benchmark alias resolved through the watchlist; the resolved ticker is excluded from the member set. |
--full | off | Full payload instead of the default field projection. |
--fields=<csv> | default schema | Project specific fields. |
--toon | off | Opt-in TOON encoding. |
What it returns
{
"data": {
"window_days": 7,
"effective_window_days": 7,
"benchmark": "BTCUSD",
"basket": "tier_1",
"members": 19,
"pct_beating": 63.2,
"btc_return_pct": 10.53,
"median_alt_return_pct": 16.6,
"regime": "alt_rotation",
"leaders": [{"ticker": "<TICKER>", "return_pct": 91.36}],
"laggards": [{"ticker": "<TICKER>", "return_pct": 2.88}],
"narrative": "Breadth 7d: 63.2% of 19 members beating BTCUSD (BTCUSD +10.53%, median +16.60%) -> alt_rotation. Regime bands (>=60 / <=40) are uncalibrated first guesses - trust pct_beating, not the label.",
"errors": []
},
"count": null,
"errors": [],
"help": ["..."]
}membersis thepct_beatingdenominator: members actually measured. Members excluded for unusable history are named inerrors[].- Ties do not count as beating — a member whose return equals the benchmark's is not beating. The strict comparison runs on unrounded returns, so a member strictly above the benchmark on raw values still counts even when both round to the same 2dp value; reported values are rounded to 2dp.
benchmarkis the resolved canonical watchlist ticker, not a display string.leaders/laggardsare the top/bottom 3 measured members, deterministic on ties (sorted by return, then ticker).
Regime bands
pct_beating | regime | Reading |
>= 60.0 | alt_rotation | Broad participation — alt swing setups more likely to follow through |
<= 40.0 | btc_led | Narrow breadth — alt breakouts more likely to fail |
| between | mixed | No rotation edge |
These bands are uncalibrated first guesses, picked by hand rather than
fitted against historical data. The raw pct_beating is always in the
payload and the narrative repeats the caveat — trust the number, not the
label. Calibration is a follow-up once there is history to calibrate
against.
Edge cases
- No
--basketgiven → the default istier_1; when it is absent from the watchlist (or empty), the first non-empty basket in watchlist insertion order is measured instead anderrors[]carries[BREADTH BASKET DEFAULTED — preferred 'tier_1' not in watchlist; used '<basket>']. The payload'sbasketfield is the name actually measured. Whentier_1is used as-is there is no diagnostic. - Missing / empty explicit basket (
--basket=<NAME>given, name missing or empty in the registry) → AXI empty state (data: null,count: 0),errors[]names the basket,help[]lists the available basket names. Never raises at the CLI; the explicit request is never substituted. --basket=(empty value) → usage error, exit 2.- Unresolvable or ambiguous benchmark alias → empty state naming the alias.
- Window truncation → one shared effective window:
min(window_days, shortest available history across every measured series and the benchmark)— never compare a 7d alt return against a 3d benchmark return. The payload carrieseffective_window_daysanderrors[]carries[BREADTH WINDOW TRUNCATED — requested Nd, used Md (shortest available history)]. No exception. - Member fetch failure or short history → excluded from the measurement
and named in
errors[]([BREADTH <TICKER> FETCH FAILED ...]/[BREADTH <TICKER> SKIPPED ...]); the rest of the basket still returns. - Benchmark in the basket → dropped silently from the member set (comparing the benchmark to itself is meaningless).
- Benchmark with < 2 usable closes → empty state with an actionable error.
Output envelope (AXI)
--json output follows the canonical AXI envelope
(ADR-0004) — {data, count, errors, help[]}. Default schema is the minimal
field list (basket, window_days, members, pct_beating, regime, narrative);
--fields=<csv> projects, --full returns everything. count is null
(one cross-sectional reading). Errors are never cached state.
Home view (no-arg mode)
No-arg mode prints the home view from the last cached successful run
($XDG_DATA_HOME/market-skills/market-breadth_last.json), or the
"no cached state" fallback on a fresh install.
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
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.

