Skip to main content
skill CX Codex

audit · rainmanjam — Claude Code skill: code checks and installation

This skill guides a review of unchecked inputs, missing timeouts, and other unhandled failure paths. Use it to audit an existing codebase.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rainmanjam/poka-yoke --skill audit -a claude-code
Open on GitHub

What audit does

The skill traces data from entry points to the places where code uses it. It covers request parameters, configuration, database rows, service responses, and values returned by other modules. The review looks for unsafe dereferences, swallowed exceptions, broad handlers, missing limits, and partial writes without a transaction.

Each finding should name the value, the line, and the case that triggers the failure, then recommend what the code should do: reject, substitute, skip, or propagate. Findings are ranked by the consequences they can reach; checks that cannot fire are treated as noise. Unbounded network calls, subprocesses, or lock acquisitions can hang, so their timeouts deserve a direct check.

What it helps with

  • find inputs used without validation
  • spot network calls and retries without limits
  • identify exceptions hidden by handlers
  • flag partial writes that lack a transaction
  • rank failure paths by their potential impact

Example prompts for the agent

  • Audit this project for inputs that are used without validation.
  • Check network calls, subprocesses, and lock acquisitions for missing timeouts.
  • Rank the findings by impact and recommend how the code should handle each one.

How to install audit

1Skills CLI (Vercel)

npx skills add rainmanjam/poka-yoke --skill audit -a claude-code

2Manually: put the files in place

~/.claude/skills/audit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/audit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about audit

How do I install audit in Claude Code?

Run npx skills add rainmanjam/poka-yoke --skill audit -a claude-code. The skill file is at ~/.claude/skills/audit/SKILL.md.

What does audit do?

It guides a review for failure paths that the code does not handle, then asks for a specific response to each finding. It also ranks issues by the consequences they can reach.

Which failures in service responses does audit check for?

It calls out unsuccessful HTTP responses, error bodies, malformed JSON, empty payloads, and calls that never return.

Source text

SKILL.md · MIT
---
name: audit
description: >-
  Reviewing existing code for unchecked inputs, unguarded dereferences, unhandled failure paths,
  swallowed exceptions, missing timeouts and absent limits: the places where an unexpected value
  becomes an unhandled failure.
---

# Audit: Finding the Unhandled Paths

The code in front of you works on the inputs it has seen. The audit question is what happens on
the inputs it has not: the null, the empty list, the oversized upload, the dependency that
times out, the row that predates the current schema.

Work outside in. Start where untrusted data enters and follow it, noting every point where the
code assumes something it has not checked.

## Trace every input to its use

For each entry point, list what arrives and follow it:

**Request data.** Path parameters, query strings, bodies, headers, cookies. Every one is
attacker-controlled. Check type, presence, range and size before use.

**Configuration and environment.** Absent variables, empty strings, values of the wrong type,
and files that failed to parse into an empty dict rather than an error.

**Database rows.** Nullable columns, rows written before a constraint existed, and joins that
return nothing.

**Other services.** Non-200 responses, valid HTTP with an error body, malformed JSON, empty
payloads, and calls that never return.

**Other modules.** A function that returns `None` on failure will hand you `None`, and the type
annotation may not say so.

## What to look for

**Unguarded dereference.** `data["key"]`, `obj.attr`, `items[0]` where nothing established that
the key, attribute or element exists. Note the exception it would raise and how far from the
cause it would surface.

**Unchecked arithmetic.** Division without a zero check. Multiplication of values that could be
`None`. Currency in floats. Indexes computed from input.

**Swallowed exceptions.** `except: pass`, `except Exception: pass`, and empty catch blocks. The
failure happened and nobody will ever know.

**Over-broad catches.** A single handler around a long block. You cannot tell which operation
failed, and the recovery cannot be specific to it.

**Missing timeouts.** Any network call, subprocess or lock acquisition without a bound. This is
the most common cause of a hang that looks like a deadlock.

**Absent limits.** Unbounded uploads, unpaginated queries, list parameters with no maximum,
retries with no cap, recursion driven by input.

**Fallbacks that hide.** A default that fires silently and often. Note whether anything would
reveal it firing.

**Success reported without verification.** `return True` after an operation whose failure was
never checked.

**Partial writes.** A sequence of mutations with no transaction, where failing halfway leaves
inconsistent state.

## Ranking by blast radius

Order by what the failure reaches, not by how easy it is to fix.

- **High:** unchecked input reaching a write, a delete, a payment or an auth decision; missing timeouts on calls in a request path; swallowed exceptions around anything that mutates state; partial writes without a transaction.
- **Medium:** unguarded dereferences on a read path; missing limits on inputs that are large but bounded in practice; broad catches around mixed operations.
- **Low:** unchecked values that can only produce a clean crash on a page nobody depends on; defensive checks missing where the type genuinely excludes the case.
- **Not a finding:** guarding against conditions the language already prevents, or re-validating a value three frames after it was validated at the boundary. Both add lines the reader must evaluate and dismiss.

## For each finding, say what should happen

An audit that only says "unchecked" leaves the hard part undone. The decision is the deliverable:

> `orders.py:88` reads `customer["email"]` with no check. Imported customers can lack one.
> Skip the send, log at warning with the customer id, and return `False` so the caller can
> record it as unsent rather than believing it went out.

Reject, substitute, skip or propagate, and say what it costs when it fires.

## What good output looks like

- **Name the value, the line and the arriving case.** "`amount` may be a string when the form posts an empty field" beats "validate inputs".
- **Say how far the failure travels.** An exception three frames from its cause is a different problem from one caught locally.
- **State the chosen behaviour**, not just that one is needed.
- **Cover the dependency being unavailable**, not only the value being wrong.
- **Order by what the failure reaches.**

## What to avoid

**Blanket advice.** "Add error handling" is not a finding. Which value, which line, which
behaviour.

**Wrapping everything.** A try block around each statement is unreadable and makes real
handling harder to see.

**Validation without a decision.** Adding a check that logs and then proceeds with the bad
value is worse than no check, because it implies coverage that does not exist.

**Ignoring the happy-path cost.** Every guard is a line to read. Guards that cannot fire are
noise, and noise is what makes real guards get skimmed.

© rainmanjam · MIT · rainmanjam/poka-yoke

Similar skills

All skills for Code review and refactoring →

audit by other authors comes first.

audit jsmastery-pro Scans codebases to generate and gap fill AGENTS.md context files. Helps bootstrap shared rules for AI assistants on greenfield or legacy repos. CX Codex +1 4,300installs audit educlopez Runs a technical UI audit across accessibility, performance and responsiveness, then hands back a prioritized findings table. CX Codex +1 929installs audit calm-north This skill walks a site through five layers of SEO review: technical foundation, on-page work, content quality, link profile and competitive position. CX Codex +1 6,400installs audit official OpenAI Walks through product flows step by step, captures verified screenshots, and flags UX and accessibility issues in chat. CX Codex GP ChatGPT 10installs audit aladicf Runs code-level checks on accessibility, performance, theming, responsive design and anti-patterns. Returns a scored report with a fix plan. CX Codex +1 625installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. 990,453installs codebase-design Matt Pocock This skill helps design modules with small interfaces and hidden complexity. Use it when refactoring code, choosing a seam, or making tests easier to write. 850,344installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. 774,700installs

From the same set20

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor