claude-code-audit

claude-code-audit is a skill for Claude Code, Codex from petekp/claude-code-setup. It costs 174 tokens per session (2,339 once invoked), scanned A, original, MIT.

A forensic method for examining recent Claude Code sessions to find major improvements to an AI-assisted development workflow.

In plain words
What is it for?
Use it to analyze coding habits and produce concrete skills, project instructions, hooks, or settings changes based on session evidence.
Why use it?
It focuses on a few changes with measurable impact instead of producing a long list of minor suggestions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Use it to analyze coding habits and produce concrete skills, project instructions, hooks, or settings changes based on session evidence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/petekp/claude-code-setup/claude-code-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 petekp/claude-code-setup --skill claude-code-audit
Clone the repo
git clone --depth 1 https://github.com/petekp/claude-code-setup

Made for: Claude Code, Codex.

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 claude-code-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/petekp/claude-code-setup/claude-code-audit/github.svg)](https://agentmods.dev/skills/petekp/claude-code-setup/claude-code-audit)
Your own site
<a href="https://agentmods.dev/skills/petekp/claude-code-setup/claude-code-audit"><img src="https://agentmods.dev/badge/skills/petekp/claude-code-setup/claude-code-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 claude-code-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/petekp/claude-code-setup/claude-code-audit"><img src="https://agentmods.dev/badge/skills/petekp/claude-code-setup/claude-code-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,339 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Agent Snooping · line 95
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • medium Rogue Agent · line 46
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Agent Snooping · line 95
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00174 $0.02339
Opus 5.5 $0.00070 $0.00936
Sonnet 5.5 $0.00035 $0.00468
Haiku 4.5 $0.00017 $0.00234

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

Security

Grade A, and why

claude-code-audit scanned grade A with 2 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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/extract.py, scripts/inventory.py, scripts/render.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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- The user's current skills dir (`~/.claude/skills`), CLAUDE.md (`~/.claude/CLAUDE.md`), and settings.json (`~/.claude/settings.json`), for cross-reference.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Enumerates other installed skillslowAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

- The user's current skills dir (`~/.claude/skills`), CLAUDE.md (`~/.claude/CLAUDE.md`), and settings.json (`~/.claude/settings.json`), for cross-reference.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/claude-code-audit/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude Code Audit

What this is

A disciplined framework for auditing a large sample of the user's Claude Code sessions to find step-change improvements — the 2–3 changes that would transform their workflow, not the 20 that would polish it.

The default behavior when asked "how can I improve my workflow" is to produce a long list of marginal suggestions. That output is worse than useless: it buries real leverage under pleasant-sounding noise, and the user does nothing with it. This skill exists to prevent that outcome.

The guarantee

By the end of this audit you will have produced:

  1. A short prioritized report — the few findings that would actually move the needle, with quantified evidence.
  2. Drafted implementations — ready-to-install skills, CLAUDE.md rules, hook scripts, or settings diffs for the top recommendations. Not suggestions. Actual drafts.
  3. A paper trail — the extracted data, sampled session list, and subagent findings, so the user can verify the synthesis and revisit it later.

If you end the audit having produced only observations, you have failed.

Step-change vs marginal — hold this distinction the whole way

Marginal Step change
"You should use skill X more often" "Skill X never triggers on prompts like these — its description excludes the phrasing you actually use. Here's a new description."
"You correct Claude a lot about testing style" "You've given the same correction 14 times in 30 days. The root pattern is Claude defaults to unit tests when you want integration tests. Here's a CLAUDE.md paragraph that eliminates the correction loop."
"Consider adding tests earlier" "19 of your 60 sessions have a 'test afterward' → 'fix regression' → 'fix another regression' loop that averages 35 min and 80k tokens. A pre-commit hook that runs your existing test script would short-circuit it."

The left column is observation. The right column is diagnosis plus prescription plus evidence. You produce the right column.

Read the full file on GitHub · 156 lines

Files

What ships with it

9 files 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. 1mo ago First seen · 156 lines · 174 tokens per session scan A 97c6bb72a409

Subscribe to this mod's changes

claude-code-audit is a skill published in the GitHub repository petekp/claude-code-setup (48 stars, last pushed 11d ago), licensed MIT. It adds 174 tokens to every session and 2,339 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 2 findings (reads agent configuration directories, enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

html-artifacts

Author the HTML for a plan artifact, dashboard iframe, or Slack attachment — structure, design plan, available runtime, theming, and craft. Read this before writing HTML for saveplan, outputiframe, or slackattachhtml.

langchain-ai/open-swe · 51 tokens

baby-sit

Monitor a GitHub pull request until CI is green, diagnose failures, and rerun only evidence-backed flaky GitHub Actions jobs.

langchain-ai/open-swe · 30 tokens

workspaces

How an Open SWE workspace's sandbox image works and how to change it — create one, edit or fork an existing one, start from scratch, what setupscript and updatescript are for, why a nightly refresh failed, where the build logs are, and how to read a rebuild in progress. Read this whenever someone asks about…

langchain-ai/open-swe · 89 tokens

linear-tickets

Create or update high-quality Linear tickets while preserving the originating report, diagnostic links, attachments, and reporter/requester attribution. Read this whenever someone asks to create, recreate, or update a Linear issue.

langchain-ai/open-swe · 44 tokens

generative-ui

Use when presenting information already in hand as a small, static structured panel in the conversation — status, results, comparisons, or a compact summary — rather than prose, a markdown table, a widget, or an app.

bearlike/Assistant · 48 tokens

st-widget-builder

Use when the user asks to render, build, visualise, mock up, or show a widget (chart, dashboard, card, table, graph) in the Mewbo Console. Teaches how to delegate the work to the st-widget-builder sub-agent instead of writing HTML or inline code yourself.

bearlike/Assistant · 65 tokens