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
よくある質問
私のコードを外部に送りますか?
いいえ。スキルは完全にローカルで動き、ネットワーク通信は行わず、リポジトリへの書き込みもしません。
何を私に求めますか?
リポジトリの場所、ファイルのパス、必要に応じて対象のコードの行の範囲です。
履歴を書き換えたり削除したりできますか?
いいえ。履歴の書き換えや削除は、このスキルの範囲外です。
詳細
作者による元の説明
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コンピューター上の未完成の個人プロジェクトを探し、それぞれが止まった理由を説明し、完成させる価値のあるものを選ぶのをエージェントが支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。