codebase-recon
Skill8 starsChanged 6 months agoMITView on GitHub
Use when investigating a feature area, doing an RCA, or auditing code across multiple repos and perspectives. Runs structured searches through 8 lenses (security, auth, data flow, error handling, config/secrets, test coverage, API surface, cross-repo consistency) and produces a findings table with evidence.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- sumanrox/codebase-recontheir own version, first seen Aug 29, 2026
- aniruddha-adhikary/skillstheir own version, first seen Aug 16, 2026
- goldenprofile/llm-skillstheir own version, first seen Aug 12, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- aniruddha-adhikary/skills★ 7same name
- goldenprofile/llm-skills★ 3same name
- sumanrox/codebase-recon★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository129 other files it gives its agents.
- AGENTS.mdAGENTS.md
- guidance/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- guidance/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- blast-radius-checkSkill
- brainstormingSkill
- branch-flow-gateSkill
- branch-sync-gateSkill
- codeowners-drift-auditSkill
- code-review-batterySkill
- cognitive-complexity-refactoringSkill
- debateSkill
- debug-conductorSkill
- dispatching-parallel-agentsSkill
- domain-buildSkill
- evidence-adjudicatorSkill
- executing-plansSkill
- external-cli-auditSkill
- feature-developmentSkill
- field-rename-verificationSkill
- finishing-a-development-branchSkill
- git-branch-conventionsSkill
- gitlab-cliSkill
- hotfix-charterSkill
- implementation-trackerSkill
- incident-revert-reviewSkill
- infra-config-investigatorSkill
- investigation-stateSkill
- kernel-splitSkill
- llm-behavior-investigatorSkill
- llm-skill-reviewSkill
- merge-authorization-gateSkill
- micro-harsh-reviewSkill
- output-verificationSkill
- pre-commit-gateSkill
- progressive-code-review-gateSkill
- progressive-harsh-reviewSkill
- providing-code-reviewSkill
- pr-triage-gateSkill
- push-authorization-gateSkill
- receiving-code-reviewSkill
- reproduction-experiment-investigatorSkill
- requesting-code-reviewSkill
- requirements-validation-pmSkill
- requirements-validationSkill
- scope-tripwireSkill
- session-handoffSkill
- skills-hierarchy-tuningSkill
- sp-bughuntSkill
- state-consistency-investigatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- timeline-trace-investigatorSkill
- token-estimationSkill
- unified-commit-gateSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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
- Distinctive: line 53
Identify all repos that could be involved: Ask the user if unclear.
- Distinctive: line 69
Run these searches across ALL repos in scope.
- Very specific: line 82
Run each lens IN ORDER. Each lens has specific search patterns and a checklist.
- Very specific: line 91
Verify feature visibility is gated by plan/tier/flag, not just by whether data happens to exist.
- Distinctive: line 103
Verify identical behavior across repos: same data references, same gating logic, no diverged copy-pastes.
- Very specific: line 131
Quality Gate: Run progressive-harsh-review.
- Distinctive: line 145
Don't trust comments: Verify files exist; don't assume conventional layout.
- Very specific: line 146
Don't claim external CLI calls are correct by syntax alone: If scope includes wrapper scripts invoking gh, aws, kubectl, npm, etc., …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Recon — Wide-Band Investigation
Purpose: Systematic multi-lens investigation of a feature area, producing structured findings with evidence.
Announce at start: "I'm using the codebase-recon skill to investigate this area across 8 lenses."
Reference index
Load reference.md for full grep commands and checklists behind each lens (section: Lens Search Patterns).
When to Use
Use codebase-recon when:
- Root cause is UNKNOWN — you can't write "the bug is X in file Y because Z"
- The defect might span multiple repos or call chains
- You need to map blast radius before changing shared code
- The request is "how does this work?" or "find all places that..." — exploration, not a fix
- Pre-fix investigation to scope a
surgical-fix(result: feeds directly into surgical-fix Phase 0)
Handoff: codebase-recon → produces investigation report → surgical-fix Phase 0 consumes it. Do NOT switch without a written scope statement.
Phase 0: Scope & Anchor (5 min)
- Define the investigation target — a feature name, bug report, ticket, or area of concern.
- Identify all repos that could be involved. Ask the user if unclear.
- Create a coverage map — a table tracking what has/hasn't been searched:
| Repo | Searched | Files checked | Findings |
|------|----------|---------------|----------|
| repo-a | ☐ | 0 | 0 |
| repo-b | ☐ | 0 | 0 |- Set the output document location (wiki page, local file, or inline).
Phase 1: Cross-Repo Entry Point Search (10 min)
Run these searches across ALL repos in scope. Record every hit.
# Primary search — adapt KEYWORD to feature area, EXTS to language
grep -rn 'KEYWORD' --include="*.ts" --include="*.js" --include="*.py" REPO_PATH | head -50Output: A ranked list of files by relevance. Open the top 5-10 in the viewer to understand data flow.
Phase 2: Run All 8 Lenses (30-45 min)
Run each lens IN ORDER. Each lens has specific search patterns and a checklist. Record ALL findings in the master table (Phase 3 format). Full search commands: see reference.md.
Lens 1: Authentication & Authorization
Find every entry point (public HTTP handlers, exported API routes) and verify auth enforcement and account scoping.
Lens 2: Security — Injection & Secrets
Find SQL injection risks (parameterized queries absent), hardcoded API keys/secrets, and debug dump endpoints.
Lens 3: Feature Gating & Entitlement
Verify feature visibility is gated by plan/tier/flag, not just by whether data happens to exist.
Lens 4: Data Flow — Where Does Data Come From and Go?
Trace data from database queries → server → client → outbound integrations (HTTP calls, webhooks, etc.).
Lens 5: Error Handling & Fail Mode
Determine what happens when things go wrong: gate queries must fail CLOSED, errors must be logged (not swallowed), users see graceful degradation, not stack traces.
Lens 6: Test Coverage
Find test files: find REPO_PATH -name "*test*" -o -name "*spec*" | grep -i 'KEYWORD'.
Lens 7: Cross-Repo Consistency
Verify identical behavior across repos: same data references, same gating logic, no diverged copy-pastes.
Lens 8: Git Blame & Change History
Understand WHO introduced WHAT and WHEN. Run AFTER Lenses 1-7 are complete — collect findings first, then git-blame all of them in one pass.
Phase 3: Findings Table (10 min)
| # | Lens | File | Lines | Finding | Severity | Evidence |
|---|------|------|-------|---------|----------|----------|
| 1 | Auth | handler.ts | L41 | public route with no auth check | Critical | grep output |
| 2 | Security | query.ts | L71 | unsanitized user input in SQL | Critical | view L69-73 |Severity scale: Critical (unauthenticated access, injection, tenant exposure) · High (missing gate, wrong-tier data) · Medium (hardcoded config, debug endpoint, missing error handling) · Low (missing tests, inconsistent patterns)
Phase 4: Synthesis & Report (15 min)
- Group findings by theme (not by lens — a single finding may span lenses)
- Write Bottom Line — 3-5 sentences summarizing what's broken and what to do
- Create fix priority list — P0 (today), P1 (this sprint), P2 (tech debt)
- Update coverage map — mark what's been searched
- List open questions — things you couldn't determine from code alone
Quality Gate: Run progressive-harsh-review. Score <6: remediate. 6-8: PASS_WITH_FIXES. >8: PASS.
Handoff to surgical-fix
"Investigation complete. Handing off finding #X to surgical-fix for implementation."Include: file(s), line(s), what's wrong, proposed fix approach.
Anti-Patterns (MUST AVOID)
- Don't fix things during recon. Record findings, don't edit code.
- Don't go deep on one file. Breadth first, depth second.
- Don't skip repos. Gaps in coverage are where bugs hide.
- Don't trust comments. Verify files exist; don't assume conventional layout.
- Don't claim external CLI calls are correct by syntax alone. If scope includes wrapper scripts invoking
gh,aws,kubectl,npm, etc., escalate toexternal-cli-audit— bash control flow tells you nothing about scope/identity/persistence-layer flags.
Failure Modes
| Failure | Recovery |
| Only searched one repo | Return to Phase 0 coverage map; search all in-scope repos |
| Skipped a lens as "probably clean" | All lenses are mandatory; complete in order |
| Claimed external CLI wrappers are correct without checking CLI defaults | Run external-cli-audit for each external CLI invoked |
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
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.

