commit-archaeologist
Fungsinya
Skill ini menelusuri riwayat git lokal sebuah proyek untuk menjelaskan alasan di balik sebuah blok kode. Skill ini ditujukan untuk orang yang memerlukan konteks sebelum mengubah kode yang tidak mereka tulis.
Kapan dipakai
- ✓Saat Anda bertanya mengapa sebuah fungsi atau blok kode ada.
- ✓Saat Anda ingin tahu siapa yang menulis sepotong kode dan apa yang berubah sesudahnya.
- ✓Saat Anda merencanakan penulisan ulang dan memerlukan riwayat kode itu terlebih dahulu.
Link skill
https://github.com/Shubhamsaboo/awesome-llm-apps/blob/main/agent_skills/commit-archaeologist/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Mengapa fungsi ini ada? Telusuri riwayat git-nya dan jelaskan sebelum saya mengubahnya.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill menelusuri file atau baris melalui commit git lokal, menemukan commit yang memperkenalkannya dan perubahan selanjutnya, lalu membaca pesan commit untuk mencari petunjuk maksudnya. Semuanya berjalan di komputer Anda.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah ia mengirim kode saya ke tempat lain?
Tidak. Skill berjalan sepenuhnya secara lokal tanpa panggilan jaringan, dan tidak menulis ke repositori.
Apa yang dibutuhkan dari saya?
Lokasi repositori, jalur file, dan secara opsional rentang baris untuk kode yang dimaksud.
Bisakah menulis ulang atau menghapus riwayat git?
Tidak. Menulis ulang atau menghapus riwayat berada di luar apa yang dilakukan skill ini.
Detail
Deskripsi asli dari pembuat
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.
Popularitas
- Bintang GitHub
- 144k
- Peringkat
- #674
- Lisensi
- Apache-2.0
- Diperbarui
- 22/10/2026
Komentar
- …
Skill lain dari repositori ini
advisor-orchestrator-worker
144kMembantu agent Anda membagi tugas yang sangat besar ke sekelompok model AI, dengan model yang lebih kuat merencanakan dan memeriksa sementara model yang lebih murah mengerjakan.
dependency-doctor
144kMembantu agent Anda memeriksa berkas requirements.txt, pyproject.toml, atau package.json dari masalah dependensi yang umum dan menyarankan perbaikan kecil yang dapat ditinjau.
first-reader
144kMembantu agent Anda menguji draf dengan mensimulasikan bagaimana pembaca sungguhan mengalaminya, dengan menunjukkan di mana mereka mungkin kehilangan minat dan apa yang mereka ingat.
project-graveyard
144kMembantu agent Anda memindai komputer Anda untuk mencari proyek sampingan yang belum selesai, menjelaskan mengapa masing-masing terhenti, dan memilih yang layak diselesaikan.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.