skills/git-hygiene/SKILL.md
Guardrail against git commands that read file contents outside the Read tool — especially `git show <ref>:<path>` and `git cat-file`, which bypass file-access controls. Triggers when constructing git commands with colon ref:path syntax or cat-file to read another branch or commit. Do NOT use for normal git operations like status, log, diff, commit, or push.
npx skillsauth add paulnsorensen/dotfiles git-hygieneInstall 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.
Git has commands that can read arbitrary file contents from any branch or commit. Using them in Bash bypasses the Read tool, avoids file access controls, and floods the context window with unstructured output. This skill explains why these patterns are dangerous and what to do instead.
git show <ref>:<path> — reads raw file contents from any ref.
git show origin/main:src/lib.rs # blocked
git show HEAD~3:package.json # blocked
git show abc123:Cargo.toml # blocked
git cat-file -p <ref>:<path> — same thing, lower-level plumbing.
The colon (:) is the tell — it means "file contents at ref", not "commit details".
| Goal | Correct approach |
|------|-----------------|
| Read a file in the current worktree | Use the Read tool directly |
| Compare a file across versions | git diff <ref> -- <path> (shows diff, not raw content) |
| See what changed in a file between refs | git diff <ref> HEAD -- <path> (shows delta, not raw content) |
| Read a file from another branch in isolation | Use Read tool after switching branches via /worktree — isolated worktree is the safe pattern |
| View commit metadata | git show <commit> (no colon — this is fine) |
| View commit stats | git show --stat <commit> (fine) |
| List files changed in a commit | git diff-tree --no-commit-id -r <commit> (fine) |
git log -p and git show <commit> (without path) are safe — they show diffs, not file contentsgit diff <ref> -- <path> is safe — shows delta, doesn't bypass Read toolref:path) is the specific pattern to block — not all git show usagetools
Reconstruct what a past coding-agent session was doing so you can resume it — goal, files touched, last verified state, and the next step — by querying the session logs. Use when the user says "what was I working on", "recover that session", "reconstruct where I left off", "resume my last session", "what did that session change", "rebuild context from logs", or invokes /work-recovery. Report-only — it never scores or judges. Do NOT use for usage scoring (that is /skill-improver, /tool-efficiency, /prompt-analytics) or one-off interactive log queries (that is /session-analytics).
development
Curate this repo's hallouminate wiki (.hallouminate/wiki/, the repo:dotfiles:wiki corpus) — add or update architecture pages, per-harness docs, and gotchas. Use when the user says "update the wiki", "document this in the wiki", "refresh the harness docs", "add a wiki page", "curate the wiki", "the wiki is stale", or invokes /wiki-curator. Also use at session end to write back a non-obvious decision or gotcha worth preserving. Grounds the existing wiki first, follows one-topic-per-file conventions, verifies every external doc URL before writing, and reindexes. Do NOT use for general code search (that is cheez-search) or for editing AGENTS.md command reference.
tools
Audit how a tool, command, or MCP server is actually used across coding-agent sessions and produce calibrated recommendations — tool-vs-task fit, error forensics, fix recommendations, permission friction, MCP health, and token economics. Use when the user says "tool efficiency", "am I using X efficiently", "audit tool usage", "why does X keep failing", "how do I fix this error", "what should I change", "permission friction", "is this MCP worth it", "tool error rate", "fix recommendations", or invokes /tool-efficiency. Do NOT use for auditing a skill or agent definition (that is /skill-improver) or for one-off interactive log queries (that is /session-analytics).
tools
Analyze how prompts and skill routing behave across coding-agent sessions and produce calibrated recommendations — prompt-pattern analysis, routing accuracy, and knowledge gaps. Use when the user says "analyze my prompts", "prompt patterns", "is routing working", "which skill should have fired", "knowledge gaps", "what do I keep asking", or invokes /prompt-analytics. Do NOT use for auditing a single skill/agent definition (that is /skill-improver), tool/MCP efficiency (that is /tool-efficiency), or one-off interactive log queries (that is /session-analytics).