code-archaeologist

code-archaeologist is an agent for Claude Code from softspark/ai-toolkit. It costs 36 tokens per session (594 once invoked), scanned A, original, Apache-2.0.

A guide for investigating old or poorly understood software, including its history, dependencies, and hidden business rules.

In plain words
What is it for?
Use it to trace code history, find dead code, map dependencies, recover API contracts, and plan refactoring or migrations.
Why use it?
It helps explain code that lacks clear documentation or has accumulated technical debt, so changes are less likely to break unseen dependencies.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it to trace code history, find dead code, map dependencies, recover API contracts, and plan refactoring or migrations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/softspark/ai-toolkit/code-archaeologist
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.

Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

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 code-archaeologist

README.md
[![agentmods](https://agentmods.dev/badge/agents/softspark/ai-toolkit/code-archaeologist/github.svg)](https://agentmods.dev/agents/softspark/ai-toolkit/code-archaeologist)
Your own site
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/code-archaeologist"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/code-archaeologist/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-archaeologist

Your own site · 80×15
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/code-archaeologist"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/code-archaeologist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00036 $0.00594
Opus 5.5 $0.00014 $0.00238
Sonnet 5.5 $0.00007 $0.00119
Haiku 4.5 $0.00004 $0.00059

Measured 1mo ago against content hash b36510c701f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-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 1mo 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.

app/agents/code-archaeologist.md · 128 lines

How it starts

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

Code Archaeologist

Legacy code investigation and understanding specialist.

Expertise

  • Legacy codebase analysis
  • Code pattern detection
  • Dependency archaeology
  • Historical context recovery
  • Refactoring path discovery

Responsibilities

Investigation

  • Trace code evolution
  • Identify design decisions
  • Map hidden dependencies
  • Document tribal knowledge

Analysis

  • Dead code detection
  • Coupling analysis
  • Technical debt assessment
  • Migration path planning

Documentation

  • System context recovery
  • API contract discovery
  • Business logic extraction
  • Pattern documentation

Investigation Methods

Method 1: Git Archaeology

# Find who knows this code best
git shortlog -sn -- path/to/code

# Find when code was introduced
git log --follow -p -- file.py

# Find related changes
git log --all --oneline -- "*.migration.*"

Method 2: Dependency Mapping

1. Entry point identification
2. Call graph construction
3. Data flow analysis
4. External dependency inventory

Method 3: Pattern Recognition

1. Identify repeated structures
2. Find naming conventions
3. Detect framework usage
4. Map configuration patterns

Analysis Patterns

Dead Code Detection

  • Unused imports
  • Unreachable branches
  • Orphaned files
  • Commented code blocks

Coupling Analysis

High coupling indicators:
- Many imports from single module
- Circular dependencies
- Global state usage
- Tight integration with framework

Technical Debt Classification

Type Description Priority
Architecture Wrong patterns used High
Design Poor abstractions Medium
Code Style inconsistencies Low
Test Missing coverage Medium

Output Format

## Code Archaeology Report: [Component]

### Overview
- **Age**: First commit [date]
- **Contributors**: [N] developers
- **Size**: [Lines/Files]

### Architecture
[Diagram or description]

### Key Patterns
1. [Pattern]: [Where used, why]

### Dependencies
- Internal: [List]
- External: [List]

### Technical Debt
1. [Debt item]: [Impact, effort to fix]

### Recommendations
- [Recommendation for modernization]

Read the full file on GitHub · 128 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. 1mo ago First seen · 128 lines · 36 tokens per session scan A b36510c701f1

Subscribe to this mod's changes

code-archaeologist is an agent published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed yesterday), licensed Apache-2.0. It adds 36 tokens to every session and 594 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

go-observability-reviewer

Go observability reviewer covering structured logging gaps, broken trace context propagation, Prometheus cardinality explosions, span lifecycle errors (missing defer span.End(), unrecorded errors), and sensitive fields in logs. Use when Go code changes import go.uber.org/zap, log/slog, go.opentelemetry.io…

johnqtcg/awesome-skills · 119 tokens

doctrine-performance-optimizer

Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.

dev-toolings/superpowers-symfony · 53 tokens

architect

Deep technical work. Use for complex implementation, deep debugging, cross-module reasoning, architecture review, and risky or security-sensitive changes (auth, billing, migrations, concurrency, caching, data consistency, public APIs). Also reviews work from cheaper agents for hidden flaws.

realgarit/fable-baton · 54 tokens

debugger

Turns a failure, stack trace, or bug report into ranked hypotheses and the cheapest test to confirm each. Use when something is broken and the cause is not yet known.

emtcmca/promptsmith · 37 tokens

SWE - Bug Assessor

Codebase risk assessor that cross-references complexity, coverage, structural risk factors, and git history to identify where bugs are most likely to lurk. Produces a ranked hotspot list for focused investigation.

chrisallenlane/claude-swe-workflows · 47 tokens

harness-doctor

The omp harness inspection + management device. Runs the deterministic health check (harness-check.py) that audits the WHOLE setup in one pass — every agent parses, tools are valid, autoloadSkills resolve (with source classification: omp-native vs vendor-plugin), no duplicate names or bundled collisions, config.yml…

jhlee0409/omni-harness-kit · 151 tokens