From git-recon
Use when the user wants a git-history health check of an unfamiliar or inherited repository — triggers on "git recon", "codebase health check", "analyze this repo's history", "where are the landmines", or onboarding/due-diligence framing. Do NOT use for architecture review, bug-fixing, or feature work; this skill reads history, not code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/git-recon:git-reconThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before reading code, read the git history. Five commands reveal where risk concentrates, who owns what, and whether the team is shipping or firefighting. Based on Piechowski's "5 git commands before reading code" (https://piechowski.io/post/git-commands-before-reading-code/).
Before reading code, read the git history. Five commands reveal where risk concentrates, who owns what, and whether the team is shipping or firefighting. Based on Piechowski's "5 git commands before reading code" (https://piechowski.io/post/git-commands-before-reading-code/).
Run from inside a git repository on the branch the user cares about (usually default). If any check fails, stop and ask the user.
git rev-parse --is-inside-work-tree # must print true
git rev-parse --is-shallow-repository # must print false — shallow clones distort all probes
git rev-parse --abbrev-ref HEAD # confirm branch scope in the report
Horizon: all probes use a single 12-month window for comparability. If the user wants a different window, override SINCE everywhere, don't mix.
SINCE="1 year ago"
Run all five probes (in parallel when possible), then synthesize. Do not just dump command output — the value is in the cross-referencing.
git log --no-merges --since="$SINCE" --format=format: --name-only \
| grep -v '^$' \
| sort | uniq -c | sort -nr | head -20
Top 20 most-modified files in the last 12 months. Files that change constantly are risky: unpredictable blast radius, likely god-objects or missing abstractions.
Caveat — renames: this command is not rename-aware. A file renamed mid-window splits its churn across old and new paths. When drilling into a specific top file, rerun with git log --follow --no-merges --since="$SINCE" -- <path> to see true lifetime churn.
Caveat — generated/vendored files: lockfiles (package-lock.json, yarn.lock, Cargo.lock), vendored dirs (vendor/, node_modules/), and generated code will dominate this list and are usually noise. Filter them out before reporting, or flag explicitly.
git log --no-merges --since="$SINCE" --format='%aN' | sort | uniq -c | sort -rn
Who writes the code. One person at 60%+ of commits = dependency risk, especially if they've gone quiet recently.
Note: use git log | sort | uniq -c instead of git shortlog -sn. git shortlog reads from stdin when not attached to a TTY, so it silently produces no output in non-interactive shells (CI, tool calls).
Caveat — commit count ≠ ownership. In monorepos and bot-heavy repos (Dependabot, renovate) this misleads. For each top risky directory from probe 1, rerun scoped ownership:
git log --no-merges --since="$SINCE" --format='%aN' -- <dir> | sort | uniq -c | sort -rn
Also spot-check activity: git log --author="X" --since="6 months ago" --oneline | wc -l.
git log --no-merges -i -E --grep="fix|bug|broken|hotfix|regression" \
--since="$SINCE" --name-only --format='' \
| grep -v '^$' \
| sort | uniq -c | sort -nr | head -20
Files repeatedly touched by bugfix commits. Intersect with the churn list (probe 1) — files appearing on both are the highest-risk code.
Caveat — keyword false positives: fix matches prefix, suffix, fixup!. bug can match debug. Treat the list as a starting point; skim a few commit messages to sanity-check before calling a file a hotspot.
git log --no-merges --since="3 years ago" \
--format='%ad' --date=format:'%Y-%m' \
| sort | uniq -c
Commits per month over 3 years (longer window needed to see trend). Report using a 3-month moving average for the last 12 months vs the prior 12 — not raw month-by-month, which is too noisy. Look for: declining trend (momentum loss), monthly spikes (release batching, not CD), long gaps (project stalls).
git log --oneline --since="$SINCE" \
| grep -icE 'revert|hotfix|emergency|rollback'
Count of reverts/hotfixes in the window. Rule of thumb: < 6/year normal; > 1/month is a reliability smell. Follow up with the actual list (drop -c) to read the messages — clustered reverts in one week point to a specific bad release worth investigating.
When the top-line report surfaces something interesting, these probes add disproportionate value:
git log --no-merges --since="$SINCE" --name-only --format='---' -- <file> | awk 'BEGIN{RS="---"} {for(i=1;i<=NF;i++)print $i}' | sort | uniq -c | sort -nr | head -10.git for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short)' refs/remotes | head -20. Long-lived divergent branches = integration risk.After running all five, produce a Codebase Recon Report with these sections. Be explicit about method — don't just eyeball:
git rev-list --count HEAD), whether generated files were filtered.Keep the report under one screen. Lead with Risk Files — that's the payoff.
| Signal | What it probably means |
|---|---|
| One file with 10× the churn of #2 | God object or dumping-ground config |
| Top contributor inactive 6+ months | Knowledge has already left the building |
| Velocity halved in last quarter | Project stalling or team reorg |
| Reverts clustered in one week | A bad release — read those commits |
| Bug hotspots all in one directory | Architectural weak spot, not scattered bugs |
prefix/fixup/debug create false positives. Spot-check commit messages before naming hotspots.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub smirnov-labs/claude-skills --plugin presentation-tools