Claude-skill-registry decision-archaeology
Investigate why code was written a certain way. Use when tracing decision history through git blame, commit logs, PRs, and issues to understand the reasoning behind code changes.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/decision-archaeology" ~/.claude/skills/majiayu000-claude-skill-registry-decision-archaeology && rm -rf "$T"
manifest:
skills/data/decision-archaeology/SKILL.mdsource content
Decision Archaeology Skill
Rules
Read-only operations only. For
gh api: GET requests only. No -X POST/PUT/PATCH/DELETE or -f/-F flags.
Workflow
- Identify code - Target file, lines, or function
- Find commit -
→ introducing commitgit blame - Trace PR/Issue - Check commit message for
references#123 - Summarize rationale - Output findings
For detailed commands: See references/commands.md
Key Commands
git blame -L <start>,<end> <file> # Find who changed lines git log -S "code" --oneline # Find when code was added gh pr list --search "<sha>" --state all # Find PR for commit
Output Format
## Decision Archaeology Report ### Target - File: [path/to/file] - Lines: [XX-YY] ### Timeline #### [Date] Commit: [short-sha] - Author: [name] - Message: [commit message] - PR: #[number] [title] - Related Issue: #[number] ### Decision Rationale [Summary of why, based on PR discussions, issue context, commit messages] ### Key References - PR #[number]: [URL] - Issue #[number]: [URL] - Commit: [sha]
Tips
- Start with
to find introducing commitgit blame - Check commit message for
references#123 - PR descriptions and review comments contain the "why"