agentleFS
Sagargupta16Sagargupta16/agent-brain/skills/repo-audit/SKILL.md

repo-audit

Skill2 starsChanged 13 days agoMITView on GitHub

Whole-repo deep analysis of one repo that ends in a findings report and waits for the user's "fix". Runs the repo's own gates once for a baseline, then sweeps correctness bugs, security, performance, dead code, dependency currency, CI and docs drift, and mobile-friendliness, each with file and line evidence, ranked by severity. Use when the user says "analyze this repo in very detail, find bugs", "analyse this repo in detail", "analyze again complete repo", "give me report", or "study this repo" about a whole codebase rather than a diff. Never edits code, never claims a bug without the line and command that shows it, and never starts fixing before the user says fix.

  • Reads credentials

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use handoff and code-review.

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.
  • MicrosoftSkill

    handoff

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

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify the top ten yourself before publishing: open the file, run the repro.

    line 59
  2. Distinctive:

    Never edit, format, commit, or open a PR from this skill.

    line 85
  3. Very specific:

    Never state a bug without file:line plus the command or input that shows it.

    line 86
  4. Distinctive:

    Never stop at the first hits in a lane.

    line 88
  5. Distinctive:

    Never pad with generic advice (add tests, add docs, enable strict).

    line 89
  6. Very specific:

    Never audit an upstream fork as if it were the user's own.

    line 91
  7. Very specific:

    Never read .env* or local database file contents.

    line 93
  8. Distinctive:

    Never chain commands with a double ampersand.

    line 95

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

repo-audit

A common ask is a whole-repo read that ends in a report: "analyze this repo in very detail, find bugs", "analyze again complete repo", then "give me report". code-review sees a diff, a graph tool explains structure; nothing owns the deep single-repo pass. Read-only by design: the fix is the user's next message.

Read first

  • Your always-on rules, if you keep them (honesty and verification; a described problem gets an assessment, not a patch)
  • The repo's CLAUDE.md, README.md, TODO.md, docs/ index, the last 30 commits (git log --oneline -30), open issues (gh issue list --state open)
  • graphify-out/ when present and the graphify skill is installed: graphify query "<question>" before grepping for architecture questions

Procedure

  1. Header first: repo, branch, git rev-parse --short HEAD, files by language (git ls-files | sed 's/.*\.//' | sort | uniq -c | sort -rn | head), entry points, deploy target. Print it before anything else.
  2. Baseline the repo's own gates once, exactly as its CLAUDE.md names them (pnpm run check, uv run pytest, npm run typecheck, pnpm build). Record pass/fail with counts. A red baseline is finding #1, not a stop.
  3. Sweep in lanes. Over ~150 source files, fan the lanes out with the parallel skill (one read-only agent per lane, shared return shape file:line | severity | claim | evidence | one-line fix); below that, run them yourself in this order.
LaneLook forEvidence required
correctnessoff-by-one, null paths, unawaited promises, wrong SQL dialect calls (a SQLite-only function on a Postgres backend), timezone anchors that disagree with the repo's rule, swallowed exceptionsthe line plus a repro command or failing input
securitysecrets in history (git log -p -S ghp_, -S AKIA, -S sk-), tracked .env, string-built SQL or URLs, CORS *, unauthenticated route, missing user_id scopingline and the command that showed it
performanceN+1 queries, sync I/O in request paths, unbounded lists or recursion, long lists without virtualisation, eager pagesline plus the loop or query count
structuredead exports, duplicated helpers, files over the repo's own size rule, barrels where its CLAUDE.md forbids themgrep counts, not opinion
depspnpm outdated, pnpm audit, uv pip list --outdated, gh api repos/<owner>/<repo>/dependabot/alerts?state=open --jq length; treat outdated as a defectthe command output
ci and docsgh run list --limit 10 per workflow; README or CHANGELOG claims the code no longer matchesrun ids; details go to gh-actions and docs-fresh
mobileanything web-facing: layout at 375px, tap targets under 44px, tables that scroll sideways, h-screen where h-dvh is the rulecomponent and the viewport width it fails at
  1. Deduplicate across lanes, then rank: critical (data loss, auth, secrets), high (wrong output, red gate, vulnerable dep), medium (perf, structure), low (style, docs). A finding without evidence is dropped, not softened.
  2. Verify the top ten yourself before publishing: open the file, run the repro. Subagent findings are claims until you looked: the summary describes intent, not reality.
  3. Print the report and stop. The last line is the offer. When the user answers "fix", "fix all", or names numbers ("do 1, 3, 4"), the report is the worklist for fix-all (enumerate-first, fixed N/N); a single named finding is fixed inline on a branch and verified the way its evidence column says.

Output

repo <owner>/<repo> @ <sha> on <branch> | 412 files (ts 288, py 61, md 24) | <YYYY-MM-DD>
baseline: pnpm run check FAIL (2 type errors) | tests 212/214 | build pass

| # | sev | lane | file:line | finding | evidence | fix (one line) |
| 1 | critical | security | backend/api/upload.py:88 | soft delete not user-scoped | grep shows no user_id predicate on the query | add user_id filter |
| ... |

counts: critical 1, high 4, medium 9, low 6 (20 total, 20 with evidence)
skipped on purpose: <area> (reason)
say "fix" to run fix-all on this list, or name the numbers to do.

Must not

  • Never edit, format, commit, or open a PR from this skill; report only.
  • Never state a bug without file:line plus the command or input that shows it; "looks suspicious" is not a finding.
  • Never stop at the first hits in a lane; grep the full set and give counts.
  • Never pad with generic advice (add tests, add docs, enable strict); each finding names this repo's line.
  • Never audit an upstream fork as if it were the user's own; its bugs go through the oss skill and its 7/10 bar.
  • Never read .env* or local database file contents; tracking state and existence are the findings, never the values.
  • Never chain commands with a double ampersand; one per line.

Non-goals

Diff review (code-review), architecture explanation (graph or diagram skills, if installed), the fix itself (fix-all), docs rewrite (docs-fresh), CI repair (gh-actions), design critique (a design skill, if installed).

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.