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 skills add jamestexas/agents --skill counterfactual-auditgit clone --depth 1 https://github.com/jamestexas/agentsWrote 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/jamestexas/agents/counterfactual-audit)<a href="https://agentmods.dev/skills/jamestexas/agents/counterfactual-audit"><img src="https://agentmods.dev/badge/skills/jamestexas/agents/counterfactual-audit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jamestexas/agents/counterfactual-audit"><img src="https://agentmods.dev/badge/skills/jamestexas/agents/counterfactual-audit.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00093 | $0.02532 |
| Opus 5.5 | $0.00037 | $0.01013 |
| Sonnet 5.5 | $0.00019 | $0.00506 |
| Haiku 4.5 | $0.00009 | $0.00253 |
Grade A, and why
counterfactual-audit 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 2mo 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 — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Counterfactual Architecture Audit
Six isolated evidence passes answer one question: given the capabilities and constraints genuinely required today, how would this system be designed now, and how does that differ from the current design? The audit does not validate a thesis — the requester's suspicion ("too broad", "needs a split") is deliberately withheld from every pass, and a correct outcome may be that the present design is right.
Provenance: distilled from a full run against rosary @ 52b3db7
(2026-08-31, archive ~/codebase-audits/agentic-research-rosary/52b3db7/) and
an external meta-review of that run. Every rule below that looks paranoid
exists because the naive version failed in that run.
Iron rules
- Durable evidence directory FIRST, before any pass is dispatched.
~/codebase-audits/<org>-<repo>/<commit>/withmanifest.json, numbered pass files, andcommands/for raw tool output. Session scratchpads get garbage-collected — in the reference run, all six packs were destroyed by tmp GC mid-session and survived only because they had been read into context. Passes write here directly. - Read-only. No tracked-file edits, no issue/bead creation, no tool installs, no dependency changes during the audit. Findings are banked as issues after the final report (see Post-audit).
- Every material statement is tagged
OBSERVED(code, tests, command output, history),INFERRED(best explanation of observations), orPROPOSED(a design choice — passes 5–6 only). - Every major conclusion needs 2+ independent evidence classes, one code-level. Documentation never confirms itself. A prior session's memory note is a weaker class — label it and have a pass re-verify it in code before any recommendation leans on it.
- LOC and file size are sampling signals, never conclusions.
- Passes 1–3 are doc-blind: no README, docs/, ADRs, design notes, roadmaps, or glossary. They may read build/CI config needed to operate. Doc-blindness is what makes pass 4's doc-vs-code reconciliation evidence rather than circularity.
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.
- 2mo ago Changed · +1 lines 7465efe736ce
- 2mo ago First seen · 194 lines · 93 tokens per session scan A 1af10c63cc91
counterfactual-audit is a skill published in the GitHub repository jamestexas/agents (2 stars, last pushed today), licensed Apache-2.0. It adds 93 tokens to every session and 2,532 once invoked, about $0.0004 per session on Opus 5.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-09-05.
counterfactual-audit compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| counterfactual-auditjamestexas/agents | Skill | 2 | today | Apache-2.0 | A | 93 | Claude Code |
| code-reviewgithub/awesome-copilot | Skill | 42k | today | MIT | A | 27 | Claude Code, Codex |
| discount-reviewpromptfoo/promptfoo | Skill | 28k | today | MIT | A | 18 | Claude Code, Codex |
| code-reviewpromptfoo/promptfoo | Skill | 28k | today | MIT | A | 11 | Claude Code |
| writing-qualityvercel/eve | Skill | 6.1k | today | Apache-2.0 | A | 69 | Claude Code, Codex |
| crit-storytomasz-tomczyk/crit | Skill | 1.4k | 3d ago | MIT | A | 47 | Claude Code, Codex |
| mcp-server-reviewpnp/copilot-prompts | Skill | 913 | yesterday | MIT | A | 93 | Claude Code, Codex |