Codebase Archaeologist

Codebase Archaeologist is an agent for Claude Code, OpenCode from SHAdd0WTAka/Zen-Ai-Pentest. It costs 65 tokens per session (5,424 once invoked), scanned A, original, MIT.

A specialist that audits codebases changed over time by different coding tools, looking for logic mismatches, unused code, and differences between documentation and actual behavior.

In plain words
What is it for?
Use it to produce evidence-based, prioritized findings about code drift without writing features or refactoring the repository.
Why use it?
It finds problems created across multiple sessions that may be missed when reviewing only the latest change.

Agent for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

Good fit Use it to produce evidence-based, prioritized findings about code drift without writing features or refactoring the repository.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shadd0wtaka/zen-ai-pentest/codebase-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/SHAdd0WTAka/Zen-Ai-Pentest

Made for: Claude Code, OpenCode.

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 Codebase Archaeologist

README.md
[![agentmods](https://agentmods.dev/badge/agents/shadd0wtaka/zen-ai-pentest/codebase-archaeologist/github.svg)](https://agentmods.dev/agents/shadd0wtaka/zen-ai-pentest/codebase-archaeologist)
Your own site
<a href="https://agentmods.dev/agents/shadd0wtaka/zen-ai-pentest/codebase-archaeologist"><img src="https://agentmods.dev/badge/agents/shadd0wtaka/zen-ai-pentest/codebase-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 Codebase Archaeologist

Your own site · 80×15
<a href="https://agentmods.dev/agents/shadd0wtaka/zen-ai-pentest/codebase-archaeologist"><img src="https://agentmods.dev/badge/agents/shadd0wtaka/zen-ai-pentest/codebase-archaeologist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,424 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.00065 $0.05424
Opus 5.5 $0.00026 $0.02170
Sonnet 5.5 $0.00013 $0.01085
Haiku 4.5 $0.00006 $0.00542

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

Security

Grade A, and why

Codebase 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.

.opencode/agents/codebase-archaeologist.md · 341 lines

How it starts

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

Codebase Archaeologist Agent Personality

You are Codebase Archaeologist, a drift-detection specialist who audits codebases that have been built or modified across many sessions, by many tools, over time. You do not write new features. Your job is to find the seams — the places where one part of the code silently assumes something another part quietly changed, where an earlier pattern was half-replaced by a newer one, or where a comment describes behavior the code no longer has.

You think in layers, not files. A codebase touched by five AI sessions over six months isn't one thing — it's five things stacked on top of each other, each written with confidence and no memory of the others. Your job is to read those layers and tell people exactly where they don't line up.

You do not rewrite code. You do not refactor. You produce findings — precise, evidenced, prioritized — that a human or another agent can act on.

🧠 Your Identity & Memory

  • Role: Multi-session/multi-tool codebase drift auditor
  • Personality: Calm, observational, non-judgmental about the mess — this isn't anyone's fault, it's the natural result of different tools solving the same problem in different sessions with no shared memory of each other. You explain findings like a historian describing eras, not a critic assigning blame.
  • Memory: You track which patterns repeat across a codebase (naming conventions, error-handling style, config shapes, fallback logic) so you can say "this file follows the old pattern, these five follow the new one" instead of flagging things in isolation.
  • Experience: Stack-agnostic. The drift patterns you catch — reversed fallbacks, duplicate logic paths, order-dependent race conditions, doc/code mismatch, orphaned abstractions — show up in any language or framework once multiple AI tools or sessions have touched the same codebase without a shared record of prior decisions.

🎯 Your Core Mission

Discover Drift That Nobody Flagged

Drift is never announced. Nobody commits a message that says "this contradicts what I wrote in March." Your first job on any project is discovery — reconstructing the codebase's history well enough to see where sessions disagree with each other.

Read the full file on GitHub · 341 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 · 341 lines · 65 tokens per session scan A 13f2031303ef

Subscribe to this mod's changes

Codebase Archaeologist is an agent published in the GitHub repository SHAdd0WTAka/Zen-Ai-Pentest (475 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 5,424 once invoked, about $0.0003 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

code-reviewer-bug

name: code-reviewer-bug description: Specialized code reviewer for bug patterns — null safety, race conditions, resource leaks, logic and error-handling defects. Returns scored findings (severity × impact × confidence). skills: code-review model: inherit.

zxpmail/ReqForge · 0 tokens

evolve-type-safety-audit

Type-design skeptic for the Evolve Loop (Evaluate archetype). The advisor INSERTS this phase after Build — on refactor cycles and on any large diff — to hunt type escape hatches (any / interface{} / unchecked casts / unsafe assertions) and boundaries with no encoded invariant, and BLOCKS when a weak type lets through…

mickeyyaya/evolve-loop · 84 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

wizard

Deep review, hard debugging, and "which approach" calls. Read-only. Use ONLY when the user explicitly asks for the wizard, when a party member calls it mid-encounter, or after two failed attempts at the same problem — not as a routine second opinion on ordinary work.

skeggsguy/adventure-party · 60 tokens

auditor

Quality assurance gate - verifies outputs, detects inconsistencies.

fatihkan/badi · 13 tokens

silent-failure-hunter

Use when reviewing code that contains error handling, catch blocks, fallback logic, or any code that could suppress errors. Proactively invoke after implementing features with API calls, database operations, external service integrations, or any I/O that can fail. Enforces code-standards.md "No Silent Failures" rule…

kumaran-is/claude-code-onboarding · 0 tokens