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

market-state

Skill3 starsChanged 4 months agoMITView on GitHub

name: market-state description: "Cross-skill session-start dashboard that composes cached state from market-macro, market-valuation, market-movers, run-watchlist, l3-conviction-scan, and market-notes. One-call read of the world; no I/O at runtime." version: 0.1.0 metadata: hermes: tags: [market, dashboard, session-start, meta] category: market compatibility: "Requires Python 3.12+ and uv" --- Session-start cross-skill dashboard. Reads the per-skill state caches written by phase 3 home views and composes a single AXI envelope. Designed to be the LLM's first call at session start. The first call typically shows…

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 the macro regime fetch is degraded (any source fails), regime.missing_inputs lists the structured input names that failed — fng, vix, …

    line 51

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

name: market-state description: "Cross-skill session-start dashboard that composes cached state from market-macro, market-valuation, market-movers, run-watchlist, l3-conviction-scan, and market-notes. One-call read of the world; no I/O at runtime." version: 0.1.0 metadata: hermes: tags: [market, dashboard, session-start, meta] category: market compatibility: "Requires Python 3.12+ and uv"

market-state

Session-start cross-skill dashboard. Reads the per-skill state caches written by phase 3 home views and composes a single AXI envelope. Designed to be the LLM's first call at session start.

When NOT to use

  • As a live analysis tool — it only reads cached state from other skills; if any source shows "no cache"/stale, run that source skill (market-macro, run-watchlist, l3-conviction-scan, etc.) before relying on the dashboard.
  • For trade decisions — it is a dashboard/overview, not a signal. Drill into the underlying skill for the actionable read.
  • As a fresh-data source — it does no I/O at runtime; use --refresh only for the macro TTL, other sources still come from disk.

Quick Start

uv run skills/market-state/scripts/run.py --json

The first call typically shows several "no cache" freshness entries; populate them by running the source skills (any of market-macro, market-valuation, market-movers, run-watchlist <basket>, l3-conviction-scan <basket>, market-notes list) and re-run market-state --json.

Flags

FlagDefaultNotes
--jsonhumanEmit the AXI envelope to stdout.
--refreshoffBypass the macro TTL cache and re-fetch the regime before composing the dashboard. Other sources still read from their on-disk cache; this flag is the explicit "I know the macro is stale" override. The home-view stdout / JSON help[] both list which sources were refreshed in this run.
--fields=<csv>summary,freshness,sources_cached,sources_totalProject the dashboard.
--full—Full payload including slim source views.

Sources

The dashboard composes 6 cached sources. Each source contributes a slim view (a summary one-liner plus a handful of headline fields) and a cached_at ISO timestamp.

SourceSkillHeadline fields
regimemarket-macrorisk_appetite / liquidity / sentiment / missing_inputs[]
valuationmarket-valuationregime (CAPE z-score)
moversmarket-moversgainers_count / losers_count / trending_count
watchlistrun-watchlistsummary / fired_skills_total / ideas_count
convictionl3-conviction-scantotal / baskets / top_ideas (top 5)
notesmarket-notespair_count / summary

When the macro regime fetch is degraded (any source fails), regime.missing_inputs lists the structured input names that failed — fng, vix, dxy, us10y, btc_dominance, total_mcap_usd. LLM agents can branch on missing_inputs instead of parsing regime_note.

The top-level freshness map shows each source's age (3h ago, 2d ago, no cache). When sources_cached is below sources_total, refresh stale sources by running them with --json before relying on the dashboard.

Output envelope (AXI)

--json output follows the canonical AXI envelope — {data, count, errors, help[]}. count is sources_cached (how many of the 6 sources have a fresh cache). Default schema is the dashboard headline; pass --fields=<csv> to project or --full for the full payload (includes every source's slim view). errors[] lists missing-cache source labels so the LLM can decide which to refresh first. help[] lists the next-step commands. Lib.py return shape is the dashboard dict; the envelope wraps it at the scripts/run.py boundary.

Home view (no-arg mode)

Running this skill with no args prints the home view (last cached dashboard from $XDG_DATA_HOME/market-skills/market-state_last.json) instead of a usage error. render_home_view() is the underlying helper; cache_run_result(__file__, result) writes the cache after every successful --json run. Errors ("error" key in the result) are NOT cached — the home view always reflects the last healthy run.

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.