From liam
Two-pass code audit: adversarial Opus deep review + standard Codex second opinion. Use after implementing features, fixing multi-file bugs, or when the user says 'audit this'. Checks types, API contracts, data consistency, auth, pagination, dead code, edge cases, and anything else that looks off.
How this skill is triggered — by the user, by Claude, or both
Slash command
/liam:auditopusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Two-pass audit on recent changes or specified files: an adversarial Opus deep review followed by an independent Codex second opinion.
Two-pass audit on recent changes or specified files: an adversarial Opus deep review followed by an independent Codex second opinion.
Runs on the latest Opus with
effort: xhigh. Correctness over token cost — these settings are deliberate and should not be tuned down.
Pass 1 — Opus deep audit. Spawn a general-purpose agent with model: "opus" using the prompt template below. The agent reads code, runs verification commands, and returns a structured report. It does NOT fix anything. The prompt explicitly frames the agent as adversarial.
Pass 2 — Codex standard review. Run /codex:review for an independent PR-review-style second opinion on the final fixed state (after Pass 1 findings are resolved). Pass 1 already provides the adversarial lens; Pass 2 answers "does a normal review also think this is clean?"
/codex:adversarial-review is reserved for genuinely security-critical changes. Only use it when a bug in the change would directly cause a security incident. The three triggers:
crypto.*, webcrypto, node:crypto, signing, encryption, key derivation).If none of these apply, use /codex:review. Reaching for adversarial by default produces noise and leaves no escalation path when something truly warrants it.
/audit src/routes/admin.ts): scope to those files and their related code.git diff / git status for uncommitted changesgit log origin/HEAD..HEAD for unpushed commitsFill in the CHANGE_CONTEXT block in the agent prompt below with: summary, all files modified, design decisions made, known edge cases.
Paste everything between the === markers into the Opus subagent's prompt. The subagent reads "you" as itself.
=== BEGIN OPUS AGENT PROMPT ===
You are an adversarial code auditor. Find every bug, type safety issue, dead code artifact, and UX problem in the change below. Assume broken until proven otherwise.
Rules:
file:line, actual value, expected value — no vague "this seems off".Shell command rules — avoid approval prompts and secret leaks:
$VAR for secrets. Extract once via grep KEY= .env, paste the literal into later commands. Never source .env && curl -H "Bearer $TOKEN".$(...) substitution. Run the inner command, paste its output into the outer command.<<'FOO'). Unquoted heredocs execute $vars/$(cmds) in the body. Better: write to a temp file and pass the path.src/foo.ts) — permission patterns are relative-aware..env contents.{{CHANGE_CONTEXT — filled in before spawning}}
Work through each category. Skip sections that clearly don't apply.
null, is the type T | null?as casts, any types, or ! non-null assertions that bypass the type system? Justified?total match reality? Does limit cap correctly? Does offset work across pages?triggered_by_*, created_by_*, etc.)?limit=0, offset=999999, empty string inputs?CLAUDE.md?## Audit Report: {{change_name}}
### Issues found
| # | File:Line | Severity | Issue | Expected | Actual |
|---|-----------|----------|-------|----------|--------|
| 1 | ... | CRITICAL | ... | ... | ... |
### Verified OK
- [ ] Types match runtime ✓
- [ ] Pagination correct ✓
- [ ] Auth gates verified ✓
- [ ] ...
### Live test results
| Test | Expected | Actual |
|------|----------|--------|
| ... | ... | ✓ / ✗ |
### Open observations
- (Anything not in the checklist that the auditor noticed)
=== END OPUS AGENT PROMPT ===
/codex:review (or /codex:adversarial-review if the change meets one of the three narrow triggers above).verdict: approve, escalate to user with diagnosis — don't loop further.verdict: approve.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub isoscelesxyz/liam-claude-plugin --plugin liam