commit-archaeologist
하는 일
이 스킬은 프로젝트의 로컬 git 기록을 살펴 코드 블록의 이유를 설명합니다. 자신이 쓰지 않은 코드를 바꾸기 전에 맥락이 필요한 사람을 위한 스킬입니다.
사용하는 경우
- ✓함수나 코드 블록이 왜 있는지 물을 때.
- ✓어떤 코드를 누가 썼고 이후 무엇이 바뀌었는지 알고 싶을 때.
- ✓재작성을 계획하는데 먼저 기록을 알고 싶을 때.
스킬 링크
https://github.com/Shubhamsaboo/awesome-llm-apps/blob/main/agent_skills/commit-archaeologist/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 함수가 왜 있는지 알려 주세요. 바꾸기 전에 git 기록을 파고들어서 설명해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 파일이나 줄을 로컬 git 커밋을 따라 추적해, 해당 코드를 도입한 커밋과 이후의 수정을 찾고, 커밋 메시지에서 의도에 대한 단서를 읽습니다. 모든 작업은 사용자의 컴퓨터에서 실행됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Commit Archaeologist
git blame names the last person to touch a line. This skill reconstructs the
reason the line exists. It traces a file or current line range through local git
history, identifies its origin and later edits, finds files that repeatedly
changed beside it, and extracts intent clues from commit messages.
Everything runs locally. No network calls, API keys, or repository writes.
When to use
- The user asks why a block, function, or file exists
- The user wants to know who introduced code and what changed afterward
- A rewrite or refactor needs historical constraints and change risks
- A workaround, temporary branch, or surprising design choice needs context
When not to use
- The user only wants raw blame output or a commit list
- The task is to squash, delete, or rewrite git history
- The repository is remote and has not been cloned locally
- The question is about project-wide architecture rather than one file or region
Gather the target
Get the repository path and tracked file path. Use a line range when the user names a current block or function. If either path is missing, ask only for the missing value. Do not scan sibling repositories.
Paths should be relative to the repository and use forward slashes. Line ranges
use inclusive current line numbers such as 40-72.
Run the dig
From this skill directory:
python3 scripts/archaeologist.py /path/to/repo src/cache.py --lines 40-72 --json
For the complete history of a file, omit --lines:
python3 scripts/archaeologist.py /path/to/repo src/cache.py --json
The script is read-only. With a range it uses git line-log; without one it uses file history with rename following. It also reads current authorship with blame. If it rejects a path or range, report that error and ask for a corrected target.
Before interpreting the JSON, read
references/reading-git-history.md. Its confidence rules prevent blame
ownership, correlation, and commit-message hints from becoming false certainty.
Read the JSON
region: normalized repository, current and historical paths, mode, range, and co-change thresholdintroduced_by: oldest commit in the selected historytimeline: commits ordered oldest to newest, with category, changed files, and detected renamesco_changed: files present beside the target in enough selected commitsauthors: current blamed lines and historical commit counts, kept separateintent_signals: issue references, reverts, workarounds, temporary markers, and unfinished-work markers found in commit messages
An empty signal list means the messages do not say why. It does not mean the change had no reason.
Write the report
Turn the JSON into a short "why this code exists" report:
- Bottom line. One or two sentences with the most likely explanation and a confidence label: high, medium, or low.
- Origin. Introducing hash, date, author, subject, and the neighboring files that make the initial purpose clearer.
- Timeline. Oldest to newest. Group mechanical edits when they do not change the story, but preserve reverts, fixes, and workarounds.
- Companion files. Explain repeated co-changes as a coupling clue. Do not
treat a one-off file in
changed_filesas a dependency. - Intent evidence. Quote short commit subjects or signal words. Label any conclusion beyond those facts as an inference.
- Change risk. Name the constraints, companion files, and unresolved temporary choices worth checking before an edit.
Keep hashes short in prose, but preserve enough characters to identify them. Do not dump the full JSON unless the user asks.
Evidence rules
- Current blame ownership is not proof of original authorship.
- The oldest selected commit is the region's introduction, not always the file's first commit.
- Repeated co-change suggests coupling; it does not prove a dependency.
- Commit categories are message heuristics, not verified issue types.
- "Temporary" and "workaround" are strong intent clues, but only the message author or linked discussion can confirm whether the constraint still applies.
- If the history is thin or messages are vague, say "the history shows" and "likely" instead of inventing a design rationale.
Follow-ups
End by offering one relevant follow-up, such as:
- "Want me to assess whether this looks deliberate or accidental?"
- "Want me to map what could break if this region changes?"
For a delibe
자주 묻는 질문
제 코드를 어디로 보내나요?
아니요. 완전히 로컬에서 실행되며 네트워크 호출이 없고, 저장소에 쓰지도 않습니다.
사용자에게 무엇이 필요하나요?
저장소 위치, 파일 경로, 그리고 필요하면 해당 코드의 줄 범위가 필요합니다.
git 기록을 다시 쓰거나 삭제할 수 있나요?
아니요. 기록을 다시 쓰거나 삭제하는 것은 이 스킬의 범위 밖입니다.
상세 정보
작성자의 원본 설명
Reconstructs why code exists from local git history, including the introducing commit, later changes, current authors, repeated companion files, and likely intent. Use when the user asks "why does this code exist", "who wrote this function and why", or to "explain the history of this function" before a rewrite, refactor, or risky edit. Runs entirely locally.
인기도
- GitHub 스타
- 144k
- 순위
- #674
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 22.
댓글
- …
이 저장소의 다른 스킬
advisor-orchestrator-worker
144k더 강한 모델이 계획과 검토를 맡고 저렴한 모델들이 작업을 하도록, 매우 큰 작업을 AI 모델 팀에 나눠 맡기도록 돕습니다.
dependency-doctor
144krequirements.txt, pyproject.toml, package.json 파일에서 흔한 의존성 문제를 찾고, 작고 검토 가능한 수정안을 제안하도록 돕습니다.
first-reader
144k실제 독자가 글을 어떻게 읽을지 시뮬레이션해, 흥미를 잃는 지점과 기억에 남는 것을 보여 줍니다.
project-graveyard
144k컴퓨터에서 완료되지 않은 사이드 프로젝트를 찾아 각각이 왜 멈췄는지 설명하고, 끝낼 가치가 있는 하나를 고르도록 돕습니다.