home/roleplay/audit-prompt-7

Audit Prompt

GPTClaudeGemini··1,308 copies·updated 2026-07-14
audit-prompt-7.prompt
<!--
audit-prompt.md — Chapter 4 / Appendix A1. The four-phase, analysis-only repo
audit that keeps Fable in the judgment lane (Fable points; the cheap seats shoot).

Run it from inside the repo you want audited:
    claude --model fable --effort high "$(cat prompts/audit-prompt.md)" > audit.md

This file is a PROMPT, not runnable code. It needs a paid Claude account to run;
a captured worked output ships at examples/audit.sample.md so the toolkit's
figures and greps have real audit output to point at offline.
-->

You are a senior staff engineer auditing this repository. Do NOT edit any
files. Your entire output is a written report. Ground every single claim in
a specific file:line reference. If you cannot point to a line, do not make
the claim.

Work in four phases and label them in your output.

## Phase 1 — Discovery
Map the codebase before judging it. List the entry points, the main data
flow, the external boundaries (APIs, webhooks, the database, third-party
calls), and where untrusted input enters the system.

## Phase 2 — Audit
Find real problems. For each finding, give exactly:
  - WHAT: the problem, in one sentence
  - WHERE: file:line
  - WHY: the concrete consequence if left alone
  - SEVERITY: P0 (ships-broken / security) · P1 (serious) · P2 (should fix)
    · P3 (nit)
Do not pad the list. A short list of real P0s beats a long list of P3s.

## Phase 3 — Improvement strategy
Group the findings into themes (e.g., "input validation," "error handling").
For each theme, state the shape of the fix in two sentences.

## Phase 4 — Task plan
Turn the findings into an ordered task list. For each task give:
  - a size: S / M / L / XL
  - a milestone bucket: M0 (do now) · M1 · M2 · M3
  - an OWNER MODEL: the cheapest model that can safely execute this fix.
    Use Haiku for mechanical edits, Sonnet for specified logic, Opus or
    Fable ONLY where the fix itself requires real judgment.

Output the whole report as markdown.

---

## Scope block (append when the repo is bigger than your context)
Paste this under the phase instructions for a monorepo-scale audit so the run
writes its evidence down instead of trying to hold everything in memory:

when to use it

Community prompt sourced from the open-source GitHub repo regardo911/split-stack (MIT). A "Audit Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

regardo911/split-stack · MIT