Skip to content
Back to skills

Audit

ASecurity

Run one prune round over documents a model executes: a judge proposes cuts of lines a current model no longer needs, the user reviews them, and the verdicts become telemetry and precision labels. Use when asked to audit, prune, or trim a repository's skills, CLAUDE.md, rules, or agent definitions by reading them.

  • 18 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 18, 2026
ai-agentsgobash

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned November 18, 2026

npx -y skills add bendrucker/claude --skill audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bendrucker-audit-claude/badge)](https://www.skillsdirectory.com/skills/bendrucker-audit-claude)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prompting:audit
description: "Run one prune round over documents a model executes: a judge proposes cuts of lines a current model no longer needs, the user reviews them, and the verdicts become telemetry and precision labels. Use when asked to audit, prune, or trim a repository's skills, CLAUDE.md, rules, or agent definitions by reading them."
argument-hint: "[<path>...]"
allowed-tools:
  - Bash(bun ${CLAUDE_SKILL_DIR}/scripts/audit.ts:*)
  - Bash(prompt-scan-edit:*)
  - Bash(sh ${CLAUDE_PLUGIN_ROOT}/scripts/bin-path-check.sh:*)
  - Read
  - Edit
---

# Audit

Run one round of the prune loop over the paths in `$ARGUMENTS`, defaulting to the current directory. A judge reads each document and proposes cuts of lines a current model no longer needs, the user accepts or rejects each in review, and the verdicts become telemetry and rule-precision labels. The round is done when every ledger proposal has a verdict event and the per-class table is printed.

List the units:

```bash
bun ${CLAUDE_SKILL_DIR}/scripts/audit.ts units [<path>...]
```

Where the `observability:session` index is available, rank the units by its `memory-loads` query, which multiplies each rule or nested `CLAUDE.md`'s load count by its injected size, and judge the costliest first.

Judge one unit inline. Judge more than one through a Workflow with one judge per batch of units, kept within the session's workflow size, since this skill's instruction to run one is the opt-in. [references/judge.md](references/judge.md) holds the judge prompt and output schema, and [references/classes.md](references/classes.md) the classes it tags. Write the returned proposals to `tmp/prompting-audit/<run>/proposals.jsonl` in the audited repo, one per line with a unique `id`, where `<run>` names the round.

!`sh ${CLAUDE_PLUGIN_ROOT}/scripts/bin-path-check.sh prompt-scan-edit`

Then drive the ledger through `audit.ts` and `prompt-scan-edit`:

- `audit.ts check <ledger>` runs each `enforced` proposal's planted-violation check and lists any that did not hold.
- `prompt-scan-edit apply <ledger>` applies every proposal whose check held to the working tree and lists any quote it could not locate. A failed check or a missing quote drops the proposal out of the round.
- The user reviews the diff. Where `plannotator` is available, open it with `plannotator review`, which opens a browser and runs outside the sandbox, and read an annotation on a hunk as a rejection of that proposal. Otherwise ask the user to name the rejected hunks.
- `prompt-scan-edit revert <ledger> <id...> --reason <annotation>` restores each rejected span.
- Commit the round with nothing else in the commit, and open it as its own pull request, so rule-precision can read its squash commit as labels.
- `audit.ts verdict <ledger> --commit <sha>` reconciles each proposal against the commit, so a hand edit the user makes before committing counts too. It prints the per-class table and the precision-label entry.

## Gotchas

- The ledger copies source text, so it stays untracked under `tmp/`.
- The sandbox denies writes under `.claude/skills`. An `excludedCommands` entry `prompt-scan-edit:*` lets the bare command escape, and the plugin README covers the setup. Run `prompt-scan-edit` as the whole Bash command. Without the entry, a sandboxed run fails with nothing written, and this skill authorizes rerunning it with `dangerouslyDisableSandbox: true`. It writes only agent-facing files inside the repository.
- Retire this skill when two consecutive rounds fall below 50% overall acceptance in the `prune-acceptance` session query. [references/classes.md](references/classes.md) holds the per-class retirement rule.

Files in this skill

  • SKILL.md3.6 KB
  • references/classes.md3.2 KB
  • references/judge.md2.6 KB
  • scripts/audit.test.ts24.4 KB
  • scripts/audit.ts22 KB
  • scripts/edit.ts5.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.