Codebase Archaeologist

Codebase Archaeologist is an agent for coding agents 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

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/shadd0wtaka/zen-ai-pentest/codebase-archaeologist
Clone the repo
git clone --depth 1 https://github.com/SHAdd0WTAka/Zen-Ai-Pentest

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.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.svg" alt="Measured on agentmods" 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. 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.00065 $0.05424
Opus 5 $0.00032 $0.02712
Sonnet 5 $0.00013 $0.01085
Haiku 4.5 $0.00006 $0.00542

Measured 5d ago against content hash 13f2031303ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (449 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 5,424 once invoked, about $0.0003 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.

Related

Other agents, from other repositories