self-audit

self-audit is a skill for Claude Code from jamestexas/agents. It costs 63 tokens per session (2,055 once invoked), scanned A, original, Apache-2.0.

A pre-review checklist for a pull request branch. A pull request is a proposed change to a codebase for review; this check looks for issues that compilers may not report and then asks another agent to look for deeper design problems.

In plain words
What is it for?
Auditing a branch before requesting review, or checking a refactor after making it yourself.
Why use it?
It catches stale comments, unused structure fields, duplicate types, and changes that have grown beyond their intended scope before a human reviewer spends time on them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Auditing a branch before requesting review, or checking a refactor after making it yourself.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamestexas/agents/self-audit
Install

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.

Any agent
npx skills add jamestexas/agents --skill self-audit
Clone the repo
git clone --depth 1 https://github.com/jamestexas/agents

Made for: Claude Code.

Wrote 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.

agentmods badge for self-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamestexas/agents/self-audit/github.svg)](https://agentmods.dev/skills/jamestexas/agents/self-audit)
Your own site
<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.

agentmods 80×15 button for self-audit

Your own site · 80×15
<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>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,055 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2mo ago against content hash e671ed2c2460, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (de-claudish.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/self-audit/SKILL.md · 221 lines

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.

Read the full file on GitHub · 221 lines

Files

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.

Changes

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.

  1. 2mo ago Changed · +3 lines e671ed2c2460
  2. 3mo ago First seen · 218 lines · 63 tokens per session scan A ac53ba998895

Subscribe to this mod's changes

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.

Related

self-audit compared with skills from other repositories

self-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-auditjamestexas/agentsSkill2todayApache-2.0A63Claude Code
code-reviewgithub/awesome-copilotSkill42ktodayMITA27Claude Code, Codex
discount-reviewpromptfoo/promptfooSkill28ktodayMITA18Claude Code, Codex
code-reviewpromptfoo/promptfooSkill28ktodayMITA11Claude Code
writing-qualityvercel/eveSkill6.1ktodayApache-2.0A69Claude Code, Codex
crit-storytomasz-tomczyk/critSkill1.4k3d agoMITA47Claude Code, Codex
mcp-server-reviewpnp/copilot-promptsSkill913yesterdayMITA93Claude Code, Codex