Skip to content
Development
Agent

code-archaeologist

Legacy code investigation and understanding specialist. Trigger words: legacy code, code archaeology, dead code, technical debt, dependency analysis, refactoring, code history

From plugin
ai-toolkit
18044 skills44 agents

Claude Code

$ npx -y skills add softspark/ai-toolkit --agent claude-code

Agent definition

code-archaeologist.md
name: code-archaeologist
description: "Legacy code investigation and understanding specialist. Trigger words: legacy code, code archaeology, dead code, technical debt, dependency analysis, refactoring, code history"
tools: Read, Write, Edit, Bash, Grep, Glob
model: sonnet
color: magenta
skills: clean-code, testing-patterns

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]

KB Integration

smart_query("legacy code analysis")
hybrid_search_kb("refactoring patterns")
Read more
@softspark
Ships withai-toolkit

AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.

180117 skills44 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
180
Star history of softspark/ai-toolkit on GitHub, a chart by star-history.com

Other agents on ai-toolkit.

ai-engineer

ai-engineer

Agent

AI/ML integration specialist. Use for LLM integration, vector databases, RAG pipelines, embeddings, AI agent orchestration,…

backend-specialist

backend-specialist

Agent

Expert backend architect for Node.js, Python, PHP, and modern serverless systems. Use for API development, server-side logic,…

business-intelligence

business-intelligence

Agent

Opportunity Discovery agent. Scans data models and code to identify missing business metrics, KPIs, and opportunities for value…

chaos-monkey

chaos-monkey

Agent

Resilience testing agent. Use to inject faults, latency, and failures into the system to verify robustness and recovery…

chief-of-staff

chief-of-staff

Agent

Executive Summary agent. Aggregates reports from all other agents to reduce noise and present a single, actionable daily briefing…

code-reviewer

code-reviewer

Agent

Code review and security audit expert. Use for security reviews, Devil's Advocate analysis, quality audits, best practices…

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc3w293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react11d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex10d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman11d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about code-archaeologist.

Which coding agents can use code-archaeologist?
code-archaeologist installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.