Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/lancegui/causal-powers/analysis-state-managementnpx skills add lancegui/causal-powers --skill analysis-state-managementgit clone --depth 1 https://github.com/lancegui/causal-powersWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/lancegui/causal-powers/analysis-state-management)<a href="https://agentmods.dev/skills/lancegui/causal-powers/analysis-state-management"><img src="https://agentmods.dev/badge/skills/lancegui/causal-powers/analysis-state-management.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00095 | $0.02933 |
| Opus 5 | $0.00048 | $0.01466 |
| Sonnet 5 | $0.00019 | $0.00587 |
| Haiku 4.5 | $0.00010 | $0.00293 |
Grade A, and why
analysis-state-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analysis State Management
Principle
A long analysis should resume from durable state, not from a bloated chat or a single growing markdown file. The default memory surface is a small YAML index that points to the few records needed for the current task.
Core rule: read docs/analysis/index.yaml first, then only the records it
names. Do not read a whole legacy plan file by default.
On OpenCode with causal-conductor installed, the phase contract carries
additional required fields and binding semantics — see
references/conductor-integration.md.
Folder Layout (schema v2)
Use this layout unless the repo already has an equivalent convention:
docs/analysis/
index.yaml # the ONLY default read
decisions.yaml # decision ledger
artifact_registry.yaml # truth-to-file map
phases/<id>.yaml # one file per phase; carries the plan AND the topology
evidence/ runs/ handoffs/ scratch/ # optional; referenced when used
YAML is the agent-facing memory because it is compact, diffable, and easy to address by field. Markdown is still allowed for human narrative and detailed evidence, but it should be referenced from YAML rather than read by default. JSON is acceptable for generated records; YAML is preferred for hand-edited plans. Do not put full logs, full diffs, or long prose in YAML.
There is no separate current.yaml — the live-state fields it used to carry
(updated, active_phase, next_action, blockers) are merged into
index.yaml. One default read, not two.
Required Records
index.yaml is the only default read:
updated: 2026-07-10
active_phase: phase-2-primary-spec
next_action: draft phase-2 topology, request independent review
blockers: []
read_for_current_task:
- phases/phase-2-primary-spec.yaml
- evidence/label-rule-choice.yaml
latest_handoffs: # optional
robustness-runner: handoffs/robustness-runner_phase-1b_2026-07-08.yaml
There are no constant pointer keys (current:, decisions:,
artifact_registry:) — decisions.yaml and artifact_registry.yaml are
fixed conventional filenames, not something the index needs to point at.
There is no do_not_read_by_default key — the rule "read only what the index
names" already covers it. There is no phases: list and no phase status in
the index — phase status lives in the phase record only (one source of
truth; ls docs/analysis/phases/ enumerates what exists).
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 283 lines · 95 tokens per session scan A 0654d3d5c250
analysis-state-management is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 10d ago), licensed MIT. It adds 95 tokens to every session and 2,933 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
audit-reproducibility
Enforce the replication-protocol.md rule by cross-checking numeric claims in a manuscript against the actual R / Stata / Python outputs. Report PASS/FAIL per claim against tolerance thresholds. Use before submission and before releasing a replication package.
diagnose
Root-cause a failing or wrong empirical result with a disciplined reproduce → minimise → hypothesise → instrument → fix loop, instead of guessing-and-poking. Use when the user says "why is my regression wrong", "this number changed", "my script errors out", "the result won't reproduce", "debug this", "this estimate…
capture-environment
Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt / environment.yml / uv.lock, Stata version + ado package list), records seeds and RNG kind, optionally writes a pinning…
checkpoint
Save a structured state snapshot before stopping or handing off. Captures the active plan, recent decisions, file pointers (with line numbers), open questions, and the next 1–3 actions into a checkpoint file under qualityreports/checkpoints/. Optionally proposes [LEARN] entries to add to MEMORY.md. Use when user says…
coauthor-brief
Generate a co-author / collaborator handoff brief for a multi-author, multi-machine project — summarizing what changed since the last brief (git delta), the current state of each artifact (manuscript, analysis, slides), open questions, how to reproduce locally, and any restricted-data access steps. Use when user says…
data-management-plan
Draft a funder-compliant Data Management Plan (NSF DMP, NIH DMS Policy 2023, ERC, Horizon Europe) by composing the confidential-data and environment-capture primitives. Sections cover data description, formats/metadata, storage/backup, access/sharing, preservation/archiving, and roles. Use when user says "data…