code-historylisted
Install: claude install-skill 2ykwang/agent-skills
# Code History
Trace how specific code evolved over time — when it was introduced, how it changed, and why.
## Use this skill when
- Understanding how a function or method evolved over time
- Tracking when a specific code pattern was introduced or changed
- Finding which commit/PR introduced, modified, or removed a piece of code
- Investigating why code changed and what motivated each revision
## Do not use this skill when
- The user wants to modify code (this skill is read-only)
- The user wants general git log without a specific target
- The user only needs `git blame` for a single line's last author
- The user only wants to see a specific commit's diff (`git show` is sufficient)
**This skill is read-only. Never modify any files or run write commands.**
## Instructions
### Tool Usage
| Purpose | Tool | Command / Pattern |
|---------|------|-------------------|
| Search code pattern history | **Bash** | `git log -p --all -S '<pattern>'` |
| Trace function line history | **Bash** | `git log -L :'<func>':<file> --no-patch` |
| Trace file history | **Bash** | `git log --follow --oneline -- <path>` |
| Find pattern location | **Grep** | Search for pattern across codebase |
| Read file context | **Read** | Read surrounding code for understanding |
| Link commit to PR | **Bash** | `gh pr list --search '<sha>' --state all` |
### Step 1: Identify the Target
Parse `$ARGUMENTS` to determine what to trace:
| Input type | Example | Detection |
|------------|---------|-------