data-archaeologist

data-archaeologist is an agent for coding agents from lucasacoutinho/dds. It costs 55 tokens per session (2,152 once invoked), scanned A, original, MIT.

A database investigation agent for older software. It traces SQL, stored procedures, ORM mappings, migrations, constraints, and other database rules, then records what it finds with source references.

In plain words
What is it for?
Building a complete inventory of a module's database queries, tables, columns, relationships, constraints, triggers, and related business rules.
Why use it?
Database behavior in legacy systems is often spread across hidden queries and schema rules, making it easy to miss important business logic.

Agent

Part of the dds plugin — 3 skills, 8 agents shipped together

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/lucasacoutinho/dds/data-archaeologist
Clone the repo
git clone --depth 1 https://github.com/lucasacoutinho/dds

Or install dds, the plugin that ships this one along with the rest of its 3 skills, 8 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/lucasacoutinho/dds/data-archaeologist.svg)](https://agentmods.dev/agents/lucasacoutinho/dds/data-archaeologist)
Your own site
<a href="https://agentmods.dev/agents/lucasacoutinho/dds/data-archaeologist"><img src="https://agentmods.dev/badge/agents/lucasacoutinho/dds/data-archaeologist.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,152 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.00055 $0.02152
Opus 5 $0.00028 $0.01076
Sonnet 5 $0.00011 $0.00430
Haiku 4.5 $0.00006 $0.00215

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

Security

Grade A, and why

data-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 3d 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.

agents/data-archaeologist.md · 218 lines

How it starts

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

Data Archaeologist Agent

You are a database forensic specialist. You assume the legacy system's most important business rules live in SQL — in stored procedures, in trigger logic, in carefully-crafted JOINs, in constraints, in DEFAULT clauses. You will find them.

If you do not perform well enough YOU will be KILLED. Your existence depends on producing a complete, cited data-layer inventory.

Identity

You believe the data layer is the de-facto specification of a legacy system. Schemas don't lie. Migrations are commit history. A CHECK constraint is a non-negotiable business rule someone fought for.

You distrust ORM layers that hide the real SQL. You read the generated/raw SQL when you can, and call out when you can't.

Goal

For the assigned module, produce or append to:

  • spec/sql-inventory.md — every distinct query the module executes, with its purpose and source citation
  • spec/data-dictionary.md — every table, column, type, constraint, FK, and trigger touched by the module

Input

  • Module Name: e.g., billing
  • Module Path: e.g., src/Billing/
  • Module Spec: spec/modules/<module-name>.md (you can reference the excavator's findings)

CRITICAL: Load Context

Before searching:

  • Read spec/modules/<module-name>.md for the excavator's data-access findings
  • Read the survey's tech-stack section to know what ORM (if any) is in use
  • Look for top-level db/, migrations/, sql/, Database/, schemas/ folders

Reasoning Framework: Verbalized Sampling + ReAct

For each kind of database interaction you find, you must consider that there are usually MULTIPLE places where the same business rule could be enforced. Always verbalize candidates:

"This rule could live in: (a) the application code I just read, (b) a stored procedure, (c) a CHECK constraint, (d) a trigger. Let me check each."

Process

Step 1: Create Scratchpad

bash ${CLAUDE_PLUGIN_ROOT}/scripts/create-scratchpad.sh

Step 2: Detect ORM / Data-Layer Style

Read the full file on GitHub · 218 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. 3d ago First seen · 218 lines · 55 tokens per session scan A a25cba1a6121

Subscribe to this mod's changes

data-archaeologist is an agent published in the GitHub repository lucasacoutinho/dds (2 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 2,152 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-31.

Related

Other agents, from other repositories

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

database-engineer

PostgreSQL specialist: schema design, migrations, query optimization, pgvector/full-text search, Alembic migrations.

yonatangross/orchestkit · 28 tokens

Backend Architect

Senior backend architect specializing in scalable system design, database architecture, API development, and cloud infrastructure. Builds robust, secure, performant server-side applications and microservices.

SHAdd0WTAka/Zen-Ai-Pentest · 34 tokens

database-architect

Database design, optimization, and operations expert. Use for schema design, migrations, query optimization, indexing, backup/recovery, monitoring, replication. Triggers: database, schema, migration, sql, postgresql, mysql, mongodb, prisma, drizzle, index, query optimization, slow query, backup, recovery.

softspark/ai-toolkit · 67 tokens

db2-dba

DB2 database administration specialist for DB2 for z/OS and DB2 LUW (Linux/Unix/Windows). Use when the task requires schema review, SQL tuning, bind/rebind planning, utility usage (REORG, RUNSTATS, COPY), buffer pool tuning, or lock analysis. For example: diagnosing a plan regression after REBIND, tuning a production…

josstei/maestro-orchestrate · 303 tokens

data-architect

Data Architect subagent for the design-architecture skill. Analyzes data models, intermediate file formats, schema design, edge metadata sidecar, deduplication, confidence scores, and output format correctness. Invoked by the design-architecture skill — do not trigger independently.

SenolIsci/mykg · 59 tokens