gitfx-hotspotslisted
Install: claude install-skill vivekbhange-hub/git-forensics-skill
# gitfx-hotspots: the files that cost you the most
Code that is complicated and also changes every week is where defects and delays collect. Code
that is complicated but never changes is a cost you can leave alone. `hotspots.py` ranks files by
both at once, from `git log` alone, so you do not read history into the conversation.
## Inputs
- A path inside a git repository (default: the current folder). Full history is better than a
shallow clone; check `git rev-parse --is-shallow-repository` and say so if it prints `true`.
- Optional: a window (`--since "12 months ago"`), a sub-tree (`--path src`), extra `--exclude`
globs for generated code the defaults miss.
- Commands below say `python3`; on Windows use `python` (or `py -3`). `git` must be on the PATH.
## Outputs
- `gitfx/hotspots.md` (or the path the user prefers): the report from the script.
- In chat: the top 5 to 10 files with one sentence of why each ranks, one suggested action each
(split, add tests, leave alone), and the caveats that apply.
## Steps
1. **Confirm permission.** Ask once whether the user owns or is authorized to analyse this
repository. Commit history can contain names and email addresses of colleagues; if the repo
belongs to someone else, stop.
2. **Pick a window.** Recent history says more about today than a decade ago. Start with
`--since "12 months ago"`; use full history only for a young repo or a stable one.
3. **Run the script**:
```
python3 "${CLAUDE_SKILL_DIR}/hotspo