audit
Find footguns in code that already exists: swappable arguments, silent fallbacks, unguarded deletes, signatures that are easy to misuse.
Skill by rainmanjam
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/rainmanjam-audit-bec86e
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/audit
What's inside
- Skill name
audit- Description
- Find footguns in code that already exists: swappable arguments, silent fallbacks, unguarded deletes, signatures that are easy to misuse. Use when someone asks "what could bite us here", "what is easy to misuse", "poka-yoke this repo", or wants a diff or PR reviewed for ways to get it wrong. Ranks by blast radius. For code not yet written use design; for something that already broke use retro.
- License
- MIT
- Instructions
- 180 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Poka-Yoke Audit
Find the mistakes that are *available* in this code, then close them. You are not looking for
bugs: a bug is a mistake that already happened. You are looking for **affordances for
mistakes**: places where doing the wrong thing is easy, silent, and looks correct.
The load-bearing question throughout: *if a competent, tired engineer used this at 4pm on a
Friday, what would go wrong and would anything stop them?*
## 1. Establish scope
Default, when the user names no path:
1. `git diff HEAD`: uncommitted work. This is what they are most likely asking about.
2. If the tree is clean, `git diff HEAD~5..HEAD`: recent commits.
3. If neither yields anything (fresh repo, no git), fall back to the risk surfaces below and
say that's what you did.
Widen to the whole repo only when asked ("audit the whole codebase", "full audit"). It is
slow and it buries the important findings in volume. When you do go wide, prioritize by
**risk surface** rather than by directory, go straight to code that touches money,
authentication, authorization, deletion or overwriting, migrations, external I/O,
concurrency, and anything with `admin`, `force`, `bulk`, `sync`, or `delete` in its name.
State the scope you chose in one line before you start, so the user can redirect you cheaply.
## 2. Run the detector, then think
```bash
python3 ../../scripts/detect_hazards.py --diff # path is relative to this SKILL.md
```
Other useful forms: `--paths src/ lib/`, `--staged`, `--since HEAD~10`, `--json`,
`--severity high`, `--id C1 M2` to filter to specific rules. Run `--help` for the full set.
The script finds the mechanically detectable shapes, adjacent same-type parameters, boolean
flag arguments, unbounded deletes, money held as a float, unvalidated request bodies, retries
without an idempotency key. Shapes a real linter already covers, bare `except`, mutable
default arguments, `any` escape hatches, are off by default and named in the footer; `--all`
runs them too. It is a **fast first pass with real false positives**, not an oracle. Treat
each hit as a question to investigate, and read the surrounding code before you believe it.
Then do the part the script cannot: read the interfaces and run the three lenses over them.
**Contact, can the wrong thing fit?** Look at every public signature. Are two adjacent
parameters the same type? Could a caller pass an order ID where a user ID belongs, cents
where dollars belong, a raw string where a validated one belongs? Does the boundary accept
`any` / `dict` / `interface{}` and hope?
**Fixed-value, can an incomplete or wrong-sized set pass?** Is every enum branch handled,
and will adding a variant break the build or silently fall through? Can a bulk operation run
with an empty or unexpectedly huge set? Is config validated as a whole, or discovered
missing at 3am? Are required fields actually required, or optional-with-a-default?
**Motion-step, can the order be wrong?** Must something be called before something else, with
nothing enforcing it? Can a retry double-charge? Can a resource leak on the error path? Can
two callers interleave between a check and the act that depends on it?
The script only sees text. These three questions are where the audit's value comes from.
## 3. Classify every finding
Each finding gets four fields. Fill all four: an unclassified finding is just an opinion.
- **Mistake**: the specific wrong thing a person can do, stated as an action.
*"Call `transfer(dst, src)` with the accounts reversed."*
- **Consequence**: what happens when they do, and how loudly. Silence is the aggravator: a mistake that throws immediately is far less dangerous than one that returns a plausible
wrong answer.
- **Current rung**: what exists today, Control / Warning / Detection / **None**.
- **Proposed device + rung**: the specific change, and the rung it reaches. If you're
proposing Warning, say what would be needed for Control and why you didn't.
## 4. Rank by expected damage, not by count
Priority is **blast radius × ease of mistake**, and nothing else. A hundred stringly-typed
internal helpers matter less than one `delete_users(filter)` where `filter` can be empty.
Blast radius, descending: irreversible data loss or money movement → security or
authorization bypass → silent data corruption → wrong output the user acts on → crash →
degraded experience. A crash ranking *below* silent wrong output is deliberate and worth
saying out loud: loud failures are cheap, quiet ones compound.
Ease of mistake, descending: silent and plausible-looking → requires only forgetting → needs
an unusual-but-reachable input → needs deliberate misuse.
Report the top findings in priority order and stop somewhere sensible, ten well-argued
findings beat forty. Say how many you set aside and why.
## 5. Report
Use this structure. It is short on purpose; the detail lives per-finding.
```markdown
# Poka-Yoke Audit · <scope> · <YYYY-MM-DD>
**Scope**: <what was examined, e.g. "uncommitted diff, 7 files, 340 lines">
**Verdict**: <one sentence, the single most important thing they should fix>
## Findings
### 1. <Short name of the mistake> · <Blast radius>/<Ease>
**Where**: `path/to/file.ts:42`
**Mistake**: <the wrong action a person can take>
**Consequence**: <what happens, and whether it is silent>
**Today**: <Control | Warning | Detection | None>
**Device**: <the specific change> → **<Control | Warning | Detection>**
<a short diff or code sketch>
<if not Control: one line on what Control would cost>
### 2. …
## Set aside
<n low-priority hazards, one line each, or "none">
```
Write it to `docs/poka-yoke/audit-YYYY-MM-DD.md` in the user's repo. If they'd rather not
have a file, keep it in the conversation, ask if it isn't obvious.From rainmanjam/poka-yoke, MIT.
More from rainmanjam/poka-yoke
- 0.607score
retro
rainmanjam
Turn a bug, outage or repeated mistake into a device that makes the whole class impossible.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
clean-code
rainmanjam
Software quality review and design guidance for any code: naming, cohesion, coupling, duplication, function size, dependency direction, and testability.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
data
rainmanjam
Pipelines, warehouses, dbt models and metrics, where failure is silently wrong numbers rather than a crash.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
design
rainmanjam
Design APIs, schemas, types and state machines so misuse cannot be expressed.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
guardrails
rainmanjam
Pre-commit hooks, CI gates, lint rules, database constraints and branch protection.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
llm
rainmanjam
AI features you ship to users: structured output, tool schemas, prompt injection, evals.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
ops
rainmanjam
Deploys, schema migrations, rollback and infrastructure.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
poka-yoke
rainmanjam
Mistake-proofing for anything: code, config, a schema, a process, a runbook, a form.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
ux
rainmanjam
Forms, destructive actions and flows users get wrong.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
defensive
rainmanjam
Defensive programming for any code: validating inputs at every boundary, checking for null and absent values, supplying safe fallbacks, catching and logging…
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
agent-guardrails
rainmanjam
Stop an AI agent damaging your repo: PreToolUse hooks, permission deny rules, protected paths, verification gates.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
authz
rainmanjam
Multi-tenant isolation, IDOR and row-level security.
SkillBFreshness: B★ 24Claude Code +9
Signals
- Stars
- 24
- Forks
- 3
- Open issues
- 0
- Last commit (this folder)
- Aug 23, 2026 (2 months ago)
- Last release
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/rainmanjam/poka-yoke
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from rainmanjam
- 0.607score
agent-guardrails
rainmanjam
Stop an AI agent damaging your repo: PreToolUse hooks, permission deny rules, protected paths, verification gates.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
data
rainmanjam
Pipelines, warehouses, dbt models and metrics, where failure is silently wrong numbers rather than a crash.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
clean-code
rainmanjam
Software quality review and design guidance for any code: naming, cohesion, coupling, duplication, function size, dependency direction, and testability.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
defensive
rainmanjam
Defensive programming for any code: validating inputs at every boundary, checking for null and absent values, supplying safe fallbacks, catching and logging…
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
authz
rainmanjam
Multi-tenant isolation, IDOR and row-level security.
SkillBFreshness: B★ 24Claude Code +9 - 0.607score
design
rainmanjam
Design APIs, schemas, types and state machines so misuse cannot be expressed.
SkillBFreshness: B★ 24Claude Code +9
Cite this page
audit skill. Agent Mart. https://agentmart.dev/skills/rainmanjam-audit-bec86e (last updated 2026-10-24)