agentleFS
jakubsuplickijakubsuplicki/codument/skills/review-codebase/SKILL.md

review-codebase

Skill48 starsChanged 40 days agoApache-2.0View on GitHub

Run a full codebase review across all features. Reads the documentation registry to understand feature boundaries, then spawns code-reviewer agents per feature to identify bugs, security issues, and quality concerns. Non-breaking — reports issues and optionally applies safe fixes only. Use whenever reviewing the whole project across features (an audit), not a single change. Do NOT use for one diff or PR (use code-reviewer). Invoke with /review-codebase.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read docs/.registry.json to get the feature map.

    line 20
  2. Very specific:

    If no registry exists, tell the user to run codument scan first.

    line 22
  3. Distinctive:

    If the user doesn't specify, review everything.

    line 32
  4. Distinctive:

    After all agents complete, compile findings into a unified report:

    line 58
  5. Distinctive:

    If the user asks to fix issues (or says "fix what you can"):

    line 88
  6. Distinctive:

    Only fix Critical and High issues

    line 89
  7. Distinctive:

    Only apply non-breaking changes: bug fixes, missing null checks, error handling, security patches

    line 90
  8. Distinctive:

    After fixes, run the project's test suite to verify nothing broke

    line 92
  9. Very specific:

    Update docs/.registry.json if any source files were modified — mark affected features as "stale" so docs get updated

    line 93
  10. Distinctive:

    If uncertain whether a fix is safe, report it instead of applying it.

    line 95
  11. Distinctive:

    Not a refactoring tool — don't suggest "this should be rewritten"

    line 99
  12. Distinctive:

    Not a style checker — assume linters handle formatting

    line 100
  13. Distinctive:

    Not an architecture review — that's the senior-architect skill

    line 101
  14. Distinctive:

    Not a PR review — this reviews the whole codebase, not a diff

    line 102
  15. Distinctive:

    Always read the registry first — don't guess at feature boundaries

    line 120
  16. Distinctive:

    Don't manufacture issues — if a feature is clean, say so

    line 123
  17. Very specific:

    After making any code changes, run codument context --file <path> --owner to find the owning doc — one line, not a read of the whole …

    line 125

“Common” is measured: kept by at least 6 in 10 of the 3 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 Review

You are the orchestrator for a full codebase review. Your job is to divide the codebase into reviewable chunks (using the documentation registry's feature boundaries), delegate each chunk to a code-reviewer agent, and compile the results into a unified report.

How It Works

Step 1: Read the registry

Read docs/.registry.json to get the feature map. Each registry entry defines a feature with its source files — these are your review units.

If no registry exists, tell the user to run codument scan first.

Step 2: Determine review scope

By default, review all features. The user may narrow scope:

  • Specific features: "review auth and payments"
  • By status: "review stale features only"
  • By directory: "review everything under src/api/"
  • By severity filter: "only critical and high issues"

If the user doesn't specify, review everything.

Step 3: Spawn code-reviewer agents

For each feature in scope, spawn a code-reviewer agent with specific instructions:

Review the "{feature-name}" feature.
Doc: {doc path from registry}
Source files to review:
{list each file from the registry entry's sources array}

Focus areas: correctness, security, performance, error handling, type safety.
Report findings by severity: Critical, High, Medium, Low.
Include a Positives section for what's done well.
{any user-specified focus or constraints}

Batching:

  • Small projects (< 6 features): spawn all agents in parallel
  • Larger projects: batch 3-5 agents at a time to avoid overwhelming the system

Important: Be specific in agent instructions. Include the exact file paths. Vague instructions produce vague reviews.

Step 4: Compile the report

After all agents complete, compile findings into a unified report:

# Codebase Review Report

**Date**: YYYY-MM-DD
**Features reviewed**: N
**Total findings**: N (X critical, Y high, Z medium, W low)

## Critical Issues
[all critical findings across features, grouped by feature]

## High Priority
[all high findings across features, grouped by feature]

## Medium Priority
[all medium findings, grouped by feature]

## Low Priority
[summary count only — detail available per-feature]

## Highlights
[notable positives across the codebase]

## Recommended Priorities
[ordered list: what to fix first based on severity and blast radius]

Step 5: Optionally apply safe fixes

If the user asks to fix issues (or says "fix what you can"):

  1. Only fix Critical and High issues
  2. Only apply non-breaking changes: bug fixes, missing null checks, error handling, security patches
  3. Never: rename public APIs, change function signatures, refactor architecture, remove exports
  4. After fixes, run the project's test suite to verify nothing broke
  5. Update docs/.registry.json if any source files were modified — mark affected features as "stale" so docs get updated

If uncertain whether a fix is safe, report it instead of applying it.

What This Is NOT

  • Not a refactoring tool — don't suggest "this should be rewritten"
  • Not a style checker — assume linters handle formatting
  • Not an architecture review — that's the senior-architect skill
  • Not a PR review — this reviews the whole codebase, not a diff

Scope Control

The user can customize the review:

User saysYou do
/review-codebaseReview all features in registry
/review-codebase auth paymentsReview only named features
/review-codebase --securityFocus agents on security checks only
/review-codebase --fixReview and apply safe fixes for critical/high
/review-codebase --critical-onlyOnly report critical severity

Parse these from the user's message — they don't need to use exact flags.

Rules

  • Always read the registry first — don't guess at feature boundaries
  • One agent per feature — don't overload agents with multiple features
  • Report format is consistent across runs so findings can be compared over time
  • Don't manufacture issues — if a feature is clean, say so
  • Focus on things that could actually cause problems in production
  • After making any code changes, run codument context --file <path> --owner to find the owning doc — one line, not a read of the whole registry — and update it. This is part of the Definition of Done.

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.