agentleFS
tderousseltderoussel/agent-skills/skills/codebase-audit/SKILL.md

codebase-audit

Skill1 starsChanged 3 months agoMITView on GitHub

Runs a ranked, evidence-backed audit of a product, codebase, or subsystem, ending in a verify list that separates proven findings from inferred ones. Use when the user asks for an audit, a gap analysis, a deep read, a bug hunt, a readiness check, a re-audit, a state reconciliation, or asks what they are not seeing. Trigger phrases include "audit", "gap analysis", "what am I missing", "deep audit", "readiness", "bug hunt", "review the whole thing". Produces findings and a verify list; does not fix.

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use improve-codebase-architecture, grill-with-docs and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AWSSkill

    improve-codebase-architecture

    Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

    Also in 3 projects that use this

  • MicrosoftSkill

    grill-with-docs

    Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the documents and the code disagree, that disagreement is itself a finding — often the most valuable one in the audit.

    line 15
  2. Distinctive:

    Every audit ends with the discrepancies it could not resolve.

    line 47
  3. Distinctive:

    This is the section the next session actually uses: Write it even when it is short.

    line 53
  4. Distinctive:

    Write the audit where the project keeps them.

    line 69

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codebase audit

An audit's value is the ranking and the evidence, not the length. A finding without a file path, query result, PR number, or row count is a hypothesis — label it as one.

Ground the audit in code and production, not in documents

Project notes, plans, and status docs are checkpoints, not authority. Start from them to learn what was claimed, then verify against reality: the live commit, database state, PR checks, branch heads.

When the documents and the code disagree, that disagreement is itself a finding — often the most valuable one in the audit.

A claim about production requires a query against production. Pair this with a verification gate skill for the mechanics.

Structure

# <Scope> Audit (YYYY-MM-DD)

## TL;DR
<The three things that matter, and what you'd do first.>

## Part 1 — What you're not seeing (blind spots, ranked)
## Part 2 — Capabilities missing (ranked, each with a rough effort estimate)
## Part 3 — Existing capabilities that need improvement (ranked)
## Part 4 — Architecture changes (ranked, plain English)
## Part 5 — If I ran the next 30 days
## Verify list (discrepancies found during the audit)

Rank everything. An unranked list of 40 findings is an unactioned list of 40 findings.

Check for dormant scaffolds before estimating

Attach a rough effort estimate to each gap and say what makes it cheap or expensive.

The single most valuable audit finding is usually this one: most of the high-value "gaps" are days of work, not weeks, because the scaffolds already exist in the repo with no callers. A feature that is already 80% built is a completely different decision from one that is not.

Grep for the thing before declaring it missing. A function with zero callers is the canonical case — the code is there, nothing invokes it, and every status document describes the feature as absent.

The verify list

Every audit ends with the discrepancies it could not resolve. Each entry names:

  • what was claimed
  • what was observed
  • what query or check would settle it

This is the section the next session actually uses. Write it even when it is short.

The explicitly-not-worth-doing section

Name what you examined and deliberately rejected, with the reason.

Audits that only add to the backlog make the backlog useless. A finding you looked at and dismissed is worth more than one you never mention, because it stops the next audit from re-raising it.

Held items are not gaps

Anything already marked as deliberately deferred, or held for an explicit human decision, is held on purpose. Do not list it as a gap.

Re-surfacing a deliberate hold as a finding is how held decisions get executed by accident.

Output

Write the audit where the project keeps them. If it supersedes a prior audit, say which one and what changed — a folder of audits should stay readable as a sequence, not as a pile.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.