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 self-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/self-audit)<a href="https://agentmods.dev/skills/jamestexas/agents/self-audit"><img src="https://agentmods.dev/badge/skills/jamestexas/agents/self-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/self-audit"><img src="https://agentmods.dev/badge/skills/jamestexas/agents/self-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.00063 | $0.02055 |
| Opus 5.5 | $0.00025 | $0.00822 |
| Sonnet 5.5 | $0.00013 | $0.00411 |
| Haiku 4.5 | $0.00006 | $0.00205 |
Grade A, and why
self-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 — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.
self-audit — Pre-review quality pass
Check your own PR like a grumpy reviewer would, before one sees it.
Your compiler or type-checker and your linter catch the easy stuff. This skill catches the grown-up stuff that slips past both of them.
When to use
- After addressing review feedback, before asking a reviewer to look again.
- After a significant self-directed refactor, before creating the PR.
- Any time you feel "done" but want a second opinion that isn't a human.
Arguments
$ARGUMENTS — optional base branch name. Defaults to main.
Step 1 — Scope sanity
git diff --stat <base>...HEAD
Read the list. For every file, ask: did I intend to change this? If anything looks surprising — generated files, unrelated packages, formatter drift — stop and investigate before continuing. The rest of this audit is wasted effort if scope is wrong.
Step 2 — Dead struct fields
A field that is written but never read is dead code, and unused-symbol linters
do not catch it — golangci-lint unused counts a field as used as long as
it appears on either side of an =, and most other languages' equivalents
behave the same way.
For every struct field you added, confirm there is a read site outside the place it is written. If the only references are:
- the extractor/constructor that populates it, and
- a test that asserts "this field is non-empty",
...that is circular — the test verifies the field exists, and nothing else cares. Delete the field, its extractor, and that test.
# Rough heuristic — greps for every .FieldName use:
rg '\.FieldName\b' --stats
A real non-test, non-self reader is required.
Step 3 — Comments that rot
Comments die when they reference context that fades. Scan for patterns that will be meaningless in six months:
rg -n '@\w+|comment #|round \d+|per the review|commit [0-9a-f]{7,}|\.\w+:\d+|renamed from|formerly|was previously|intentionally|rather than' <changed-files>
For each hit ask: will this comment make sense to someone who never saw the PR thread? If no, rewrite. State what the code does, not how it got this way.
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.
- 2mo ago Changed · +3 lines e671ed2c2460
- 3mo ago First seen · 218 lines · 63 tokens per session scan A ac53ba998895
self-audit is a skill published in the GitHub repository jamestexas/agents (2 stars, last pushed today), licensed Apache-2.0. It adds 63 tokens to every session and 2,055 once invoked, about $0.0003 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-08-31.
self-audit compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| self-auditjamestexas/agents | Skill | 2 | today | Apache-2.0 | A | 63 | 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 |