Agent skill
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 this agent skill to your Project
npx add-skill https://github.com/ntsk/dotfiles/tree/main/claude/skills/decision-archaeology
SKILL.md
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 -
git blame→ introducing commit - Trace PR/Issue - Check commit message for
#123references - 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
git blameto find introducing commit - Check commit message for
#123references - PR descriptions and review comments contain the "why"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
code-review
Code review workflow using GitHub CLI. Use when reviewing pull requests, checking PR diffs, adding review comments, or approving/requesting changes on PRs.
nix-profile-manager
Expert guidance for agents to manage local Nix profiles for installing tools and dependencies. Covers flakes, profile management, package searching, and registry configuration.
github-pr-workflow
Working with GitHub Pull Requests using the gh CLI. Use for fetching PR details, review comments, CI status, and understanding the difference between PR-level comments vs inline code review comments.
working-with-jj
Expert guidance for using JJ (Jujutsu) version control system. Use when working with JJ, whatever the subject. Operations, revsets, templates, debugging change evolution, etc. Covers JJ commands, template system, evolog, operations log, and interoperability with git remotes.
typst-writer
Write correct and idiomatic Typst code for document typesetting. Use when creating or editing Typst (.typ) files, working with Typst markup, or answering questions about Typst syntax and features. Focuses on avoiding common syntax confusion (arrays vs content blocks, proper function definitions, state management).
nushell-plugin-builder
Guide for creating Nushell plugins in Rust using nu_plugin and nu_protocol crates. Use when users want to build custom Nushell commands, extend Nushell with new functionality, create data transformations, or integrate external tools/APIs into Nushell. Covers project setup, command implementation, streaming data, custom values, and testing.
Didn't find tool you were looking for?