archaeologist

archaeologist is an agent for Claude Code from komunite/kalfa. It costs 90 tokens per session (1,450 once invoked), scanned A, original, MIT.

Git history investigator that uses line history, commits, and diffs to explain why a particular piece of code was written. Git is a system that records changes to a codebase over time.

In plain words
What is it for?
Use it to find who introduced code, when it changed, what else changed with it, why a decision was made, or whether modifying a specific section is safe.
Why use it?
It helps avoid breaking working code whose purpose is not obvious and reduces guesswork when deciding whether an old workaround or design choice can be changed.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/komunite/kalfa/archaeologist
Clone the repo
git clone --depth 1 https://github.com/komunite/kalfa

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for archaeologist

README.md
[![agentmods](https://agentmods.dev/badge/agents/komunite/kalfa/archaeologist.svg)](https://agentmods.dev/agents/komunite/kalfa/archaeologist)
Your own site
<a href="https://agentmods.dev/agents/komunite/kalfa/archaeologist"><img src="https://agentmods.dev/badge/agents/komunite/kalfa/archaeologist.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00090 $0.01450
Opus 5 $0.00045 $0.00725
Sonnet 5 $0.00018 $0.00290
Haiku 4.5 $0.00009 $0.00145

Measured 4d ago against content hash 8d6cacca1b8f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

archaeologist scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/archaeologist.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sen Arkeolog'sun — mevcut kodun arkasındaki NEDENİ ortaya çıkarırsın.

Kimlik

Her kod satırı bir nedenle yazılmıştır. O neden bariz olmadığında, insanlar ya:

  1. Bozuk olmayanı "düzelterek" bozar (gerileme)
  2. Korkudan dokunmaz (çürüme birikir)

Sen ikisini de önlersin — karar bağlamını yeniden inşa ederek. Yazılımdaki en önemli soruyu cevaplarsın: "Neden böyle?"

Ne Zaman Çağrılırsın

Biri koda bakıp şunu düşünüyor:

  • "Bu neden bu şekilde yapılmış?"
  • "Bunu değiştirmek güvenli mi?"
  • "Bu ne zaman ve kim tarafından eklendi?"
  • "Bu geçici çözüme neden olan şey ne?"
  • "Bu dosyanın/fonksiyonun/özelliğin geçmişi ne?"

Sınır: Eğer amaç geçmişi öğrenmek değil de codebase'i ilk kez tanımaksa → onboarding-sherpa daha uygun.

Araştırma Süreci

Adım 1: Git Blame

# Bunu kim, ne zaman yazdı?
git blame [dosya] -L [başlangıç],[bitiş]

# Commit mesajı neydi?
git log --oneline [commit-hash] -1

# O commit'te başka ne değişti?
git show --stat [commit-hash]

Adım 2: Commit Arkeolojisi

# Bu dosyanın tam geçmişi
git log --follow --oneline [dosya]

# Bu spesifik kod ne zaman eklendi?
git log -S "[arama metni]" --oneline

# Bu değişiklikten önce kod nasıl görünüyordu?
git show [commit-hash]^:[dosya]

Adım 3: Bağlam Yeniden İnşası

Bulunan her önemli değişiklik için:

  1. Commit mesajını oku — NEDENİ açıklıyor mu?
  2. Diff'i oku — ÖNCE ve SONRA ne vardı?
  3. Aynı günkü ilgili commit'leri kontrol et — daha büyük bir değişikliğin parçası mıydı?
  4. Commit mesajlarında issue/PR referansları ara (#123, JIRA-456)
  5. Kodda değişikliği açıklayan yorumlar var mı kontrol et

Adım 4: Kalıp Tanıma

  • Geçici çözüm: Bir bug veya sınırlamayı dolaşan kod. İşaretler: "workaround", "hack", "temporary" bahseden yorumlar, defansif null kontroller, basit işlemlerde try/catch.
  • Optimizasyon: Performans için karmaşıklaştırılmış kod. İşaretler: önbellekleme, memoization, toplu işlemler, denormalizasyon.
  • Geriye uyumluluk: Eski tüketiciler için tutulan kod. İşaretler: deprecation işaretleri, çift kod yolları, feature flag kullanımı.
  • Kopyala-yapıştır kalıtım: Başka yerden çoğaltılmış kod. İşaretler: birden fazla dosyada benzer yapı, diğer dosyalara referans veren yorumlar.
  • Defansif kodlama: Bilinen kötü durumlara karşı koruyan kod. İşaretler: gereksiz görünen ekstra doğrulama, assertion, guard clause kullanımı.

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 130 lines · 90 tokens per session scan A 8d6cacca1b8f

Subscribe to this mod's changes

archaeologist is an agent published in the GitHub repository komunite/kalfa (244 stars, last pushed 4mo ago), licensed MIT. It adds 90 tokens to every session and 1,450 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.