.claude/skills/review-static-history/SKILL.md
Mine git history for bug patterns that static analysis could have caught
npx skillsauth add cwilliams5/Alt-Tabby review-static-historyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Enter planning mode. Mine git history for bugs that shipped and were later fixed, to find patterns a static analysis check could have prevented. This is evidence-driven — only propose checks backed by real bug occurrences.
Review the last 50 commits (or more if the repo is active) for fix commits. Look for:
global declaration, add Critical "Off", fix a DllCall signature, correct a variable name, etc.For each fix commit, categorize the root cause:
Group fix commits by root cause class. Use occurrence count as a signal, not a hard gate:
Cross-reference each pattern against the current pre-gate inventory:
Already caught (validate these are working):
global declaration → check_batch_simple_b.ps1 (switch_global sub-check) + query_global_ownership.ps1 -Checkquery_function_visibility.ps1 -Checkquery_global_ownership.ps1 -CheckIf a pattern IS already caught but the bug still shipped, that's a different problem — the check may have a gap or the developer bypassed pre-gate. Flag it.
For surviving patterns (not already caught, statically detectable):
Feasibility test for each:
Hard limit: propose at most 2 new checkers. Keep the plan focused on the highest-value patterns.
For each proposed check, specify placement:
check_batch_simple.ps1)review-static-speed for batch architecture context if neededSection 1 — Evidence table (all fix commits analyzed):
| Commit | Message | Root Cause Class | Already Caught? |
|--------|---------|-----------------|----------------|
| abc1234 | Fix missing global in foo | Missing declaration | Yes — check_batch_simple |
| def5678 | Fix Critical not released on early return | Unmatched Critical | No |
Section 2 — Pattern frequency:
| Pattern | Occurrences | Commits | Already Caught? | Severity |
|---------|-------------|---------|----------------|----------|
| Unmatched Critical "Off" | 4 | abc, def, ghi, jkl | No | Silent corruption |
Section 3 — Proposed checks (max 2, highest-value patterns):
| Pattern | Detection Sketch | False Positive Est. | Placement | Evidence |
|---------|-----------------|--------------------|-----------|---------|
| Unmatched Critical | Track Critical "On" → scan for return/continue without prior Critical "Off" | Low — structural | check_batch_guards.ps1 | 4 bugs in last 50 commits |
Ignore any existing plans — create a fresh one.
tools
Create a new git worktree and switch the session into it
tools
Spawn agent to trace code flow via query tools — answer only, no context cost
tools
Commit, push, and create a PR for the current branch
tools
Retire a shader by moving its files to legacy/shaders_retired