agentleFS
krzysukrzysu/market-skills/skills/run-all-l2/SKILL.md

run-all-l2

Skill3 starsChanged 4 months agoMITView on GitHub

Runner that fetches candles once per ticker, then runs all 6 L2 pattern skills in-process. Replaces N×M individual fetches with N fetches (one per ticker).

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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. Very specific:

    When you want trade ideas directly — use run-all-l3 (or l3-conviction-scan for ranking).

    line 20

≈ “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.

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

run-all-l2

Fetches candles once per ticker, then runs all L2 pattern skills on the cached data. Use this from batch runners or agents that need to evaluate multiple tickers across all L2s.

When NOT to use

  • For a deep single-ticker dive — call the individual L2 skill (market-breakout, market-accumulation, etc.) directly for focused output and flags.
  • As a trade signal — it returns pattern detections (present/classification), not trade ideas. Feed fired patterns into run-all-l3 / an L3 strategy before acting.
  • When you want trade ideas directly — use run-all-l3 (or l3-conviction-scan for ranking); run-all-l2 is the L2 layer only.

Why

Each L2 script's run.py calls fetch_ohlc() independently. A morning brief for 3 tickers × 5 L2s = 15 fetches. This runner reduces that to 3 fetches (one per ticker).

Quick Start

# One ticker
uv run skills/run-all-l2/scripts/run.py SPY

# Multiple tickers
uv run skills/run-all-l2/scripts/run.py SPY BTC-USD AAPL --json

# Explicit provider
uv run skills/run-all-l2/scripts/run.py hl:LIT --json

# Custom timeframe (e.g. 4h candles for the past month)
uv run skills/run-all-l2/scripts/run.py AAPL --interval=4h --period=1mo --json

Flags

FlagDefaultNotes
TICKER... (positional, repeatable)—At least one ticker required. Supports provider:ticker.
--jsonhumanEmit JSON envelope to stdout.
--source=PROVIDERauto-detectForce a data provider.
--interval=INTERVAL1d1m/2m/5m/15m/30m/1h/2h/4h/8h/12h/1d/3d/1wk/1M. Passed to each L2.
--period=PERIOD1y1d/5d/1w/2w/3w/4w/1mo/3mo/6mo/1y/2y/5y/10y/ytd/max. Passed to each L2.
--include-notesoffAuto-load active market-notes for each ticker.
--fired-onlyoffDrop L2 skills whose pattern didn't fire (present=False or classification=None).
--fields=<csv>minimalProject each per-ticker block to the listed keys.
--full—Ship the complete envelope payload.

Both --flag value (space-separated) and --flag=value (equals) syntaxes are accepted; both are validated against analysis/intervals.VALID_INTERVALS / VALID_PERIODS — a bad value exits 2 with a friendly error. JSON output includes top-level interval/period so the consumed timeframe is always visible to downstream agents.

yfinance caveat: when the resolved provider is yfinance and the requested (interval, period) is outside yfinance's per-interval lookback cap (e.g. 4h beyond 1mo, 1h beyond 1mo, 5m beyond 5d), the call returns [] and emits a stderr warning instead of letting yfinance 404 on the unknown token. Route around by using hl:<ticker> or kraken:<ticker> for non-daily intraday data.

Runs

L2 SkillPurpose
market-accumulationWyckoff accumulation patterns
market-breakoutFresh/stale/confirmed breakouts
market-exhaustionCapitulation, blowoff, impulse exhaustion
market-liquidity-sweepSupport/resistance sweeps
market-trend-qualityTrend health (HEALTHY/WEAKENING/DEGRADING)

Output

  • tickers[ticker].skills[l2_name] — full L2 result for each skill
  • tickers[ticker].skills[l2_name].error — error string if skill failed
  • Non-JSON mode: one line per skill showing present + classification

Output envelope (AXI)

--json output follows the canonical AXI envelope — {data, count, errors, help[]}. Default schema is the per-skill minimal fields (3-6 essentials); pass --fields=<csv> to project or --full for the full payload. count is the item count, help[] is contextual next-step command templates. Lib.py return shapes (L1Result / L2Result / L3Result / L3Idea / RegimeSignal) are unchanged — the envelope wraps them at the scripts/run.py boundary.

Candle cache (opt-in)

This runner fetches candles once per ticker, then runs all skills in-process — but each invocation still re-fetches from the venue unless the OHLC cache is enabled. For cron / repeated scans, set a TTL so identical provider:ticker:interval:period requests are served from disk:

MARKET_SKILLS_OHLC_CACHE_TTL=3600 uv run skills/run-all-l2/scripts/run.py SPY BTC-USD

0 (the default) means always fetch live. See the README "Candle cache" section for the full contract (store path, entry cap, staleness guidance).

Home view (no-arg mode)

No-arg mode prints the home view from $XDG_DATA_HOME/market-skills/<skill>_last.json (last successful run). Errors are not cached.

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.