codebase-recon
Skill41 starsChanged 7 months agoMITView on GitHub
Use when entering an unfamiliar codebase, onboarding to a new project, or wanting to assess codebase health before reading code — analyzes git history to reveal hotspots, risk areas, team structure, and development momentum
4 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
- bordenet/superpowers-plustheir own version, first seen May 3, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- bordenet/superpowers-plus★ 8same name
- 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.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Before running analysis, determine repo scale to calibrate time windows and result counts.
- Distinctive: line 25
Run this single shell command to collect repo vitals:
- Distinctive: line 34
Use the commit count to set parameters for Phase 2:
- Very specific: line 50
Run all 7 commands in parallel (they are independent).
- Distinctive: line 78
Commit frequency by month (all time):
- Distinctive: line 112
After collecting all Phase 2 results, perform these cross-references before presenting the report:
- Distinctive: line 116
Bus Factor Risk: If active contributors (2g) are less than 30% of total contributors (2b), flag this as a bus factor concern.
- Distinctive: line 166
After printing the report, ask:
- Distinctive: line 170
If yes, write the same content as a markdown file.
“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.
Files
Codebase Recon
Analyze git history to understand a codebase before reading any code. Reveals project health, risk areas, team structure, and development momentum.
Inspired by "The Git Commands I Run Before Reading Any Code" by Ally Piechowski.
Phase 1: Probe
Before running analysis, determine repo scale to calibrate time windows and result counts.
Run this single shell command to collect repo vitals:
echo "COMMITS=$(git rev-list --count HEAD)" && \
echo "FIRST_COMMIT=$(git log --reverse --format='%ad' --date=short | head -1)" && \
echo "LATEST_COMMIT=$(git log --format='%ad' --date=short | head -1)" && \
echo "BRANCHES=$(git branch -a | wc -l | tr -d ' ')"Use the commit count to set parameters for Phase 2:
| Repo Size | Commits | WINDOW (--since) | N (--head) |
| Small | <500 | (omit --since) | 10 |
| Medium | 500-10k | 1 year ago | 20 |
| Large | >10k | 6 months ago | 30 |
Print the Repo Vitals line immediately:
Repo Vitals: Age: [FIRST_COMMIT to LATEST_COMMIT] | Commits: [COMMITS] | Branches: [BRANCHES] | Analysis window: [WINDOW or "all time"]Phase 2: Parallel Analysis
Run all 7 commands in parallel (they are independent). Substitute WINDOW and N from Phase 1. For small repos, omit --since flags entirely.
2a. Code Hotspots
Most-changed files in the analysis window:
git log --format=format: --name-only --since="WINDOW" | sort | uniq -c | sort -nr | head -N2b. Bus Factor
All-time contributor ranking by commit count:
git shortlog -sn --no-merges2c. Bug Magnets
Files most associated with bug-fix commits:
git log -i -E --grep="fix|bug|broken" --name-only --format='' --since="WINDOW" | sort | uniq -c | sort -nr | head -N2d. Team Momentum
Commit frequency by month (all time):
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c2e. Firefighting Frequency
Emergency/revert commits in the analysis window:
git log --oneline --since="WINDOW" | grep -iE 'revert|hotfix|emergency|rollback'2f. Recently Added Files
New files added in the analysis window:
git log --diff-filter=A --since="WINDOW" --name-only --format='' | sort | uniq -c | sort -nr | head -N2g. Active vs Total Contributors
Count of contributors active in the last 3 months (fixed window — measures "who's here now"):
git shortlog -sn --no-merges --since="3 months ago" | wc -lCompare this count against the total from 2b.
Cross-Referencing
After collecting all Phase 2 results, perform these cross-references before presenting the report:
- High-Risk Files: Intersect code hotspots (2a) with bug magnets (2c). Files appearing in both lists are highest-risk.
- Risk Ownership: For each high-risk file, run
git shortlog -sn -- <file>to identify the primary owner. - Bus Factor Risk: If active contributors (2g) are less than 30% of total contributors (2b), flag this as a bus factor concern.
- Momentum Trend: Analyze the monthly commit counts (2d):
- Compare the average of the last 3 months to the average of the 3 months before that.
- Rising: last 3 months average > prior 3 months average by 20%+
- Declining: last 3 months average < prior 3 months average by 20%+
- Erratic: month-over-month variance exceeds 50%
- Stable: otherwise
Report Template
Present the report in the terminal using this structure:
═══ Codebase Recon Report ═══
Repo Vitals
Age: [first commit] to [latest commit] | Commits: N | Branches: N | Analysis window: WINDOW
1. Code Hotspots (most-changed files)
[ranked list: count filepath]
2. Bug Magnets (files with fix/bug/broken commits)
[ranked list: count filepath]
3. High-Risk Files (appear in BOTH hotspots AND bug magnets)
[list with: filepath — hotspot rank #X, bug magnet rank #Y, primary owner: NAME]
If none overlap, state: "No files appear in both lists — good sign."
4. Bus Factor
[top 10 contributors: count name]
Active (last 3 months): X of Y total contributors
[If active < 30% of total: "Warning: low active contributor ratio — knowledge concentration risk"]
5. Team Momentum
[monthly commit counts, most recent 12 months or all if fewer]
Trend: [rising / stable / declining / erratic]
6. Firefighting Frequency
[list of revert/hotfix/emergency commits, or "None found"]
Rate: N emergency commits out of M total in window (X%)
7. Recently Added Files
[ranked list: count filepath]
8. Recommendations
- Start reading: [top 3 high-risk files, or top 3 hotspots if no high-risk files]
- Talk to: [primary owner of the #1 high-risk or hotspot file]
- Watch out: [any trend warnings — declining momentum, low bus factor, high firefighting rate]After printing the report, ask:
"Want me to save this report to a markdown file? (e.g.,
docs/codebase-recon-report.md)"
If yes, write the same content as a markdown file. Do not commit — let the user decide.
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.

