# Data archaeology

> Data archaeology is an open-source agent skill for databases. Reconstructs an undocumented data model from migrations, queries and live data. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/rpraharaj/forward-deployed-engineer/tree/main/fde-data/skills/data-archaeology
- **Repository:** https://github.com/rpraharaj/forward-deployed-engineer
- **GitHub stars:** 19
- **License:** MIT
- **Skill name:** data-archaeology
- **Collection:** https://github.com/rpraharaj/forward-deployed-engineer
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through working out what a database's tables and columns really mean when the schema is unreliable or undocumented. It starts by reading migrations in order as a history of the model, then searches the codebase for the queries actually issued, since those reveal which columns matter and which values are compared against. The agent is directed to run aggregate queries against the data to see live enum vocabularies, when each value was in use, implied foreign keys and orphaned rows, and to identify distinct generations of rows that a change must handle.

The workflow ends with a structured data model write-up covering entities, column reality, live vocabulary, eras, relationships and other readers of the tables, with unverified points flagged as gaps. It points to other skills for related work such as shape queries, control-flow tracing and blast-radius analysis.

It expects read access to the codebase and ideally a database with aggregate-query permission. Without a database it still works from migrations and code, at lower confidence. It also assumes a workspace folder from the FDE orientation process for saving its output.

## When your agent uses it

> Reconstruct an undocumented data model from whatever exists - migrations, DDL, ORM definitions, and most reliably the queries actually issued - then surface the gap between the schema's stated intent and its real use. Use when a schema is undocumented, when the domain model is unclear, before a migration or reporting change, when column names do not match their contents, or when you need to know what the data actually looks like rather than what the schema claims. The schema tells you what is allowed; the data tells you what happens.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/rpraharaj/forward-deployed-engineer/tree/HEAD/fde-data/skills/data-archaeology)
- [License: MIT](https://github.com/rpraharaj/forward-deployed-engineer/tree/HEAD/fde-data/skills/data-archaeology)

## Features

- **Migration history reading:** Reads schema migrations in sequence to reconstruct how the data model changed over time.
- **Query-driven discovery:** Finds the columns, filters and literal values the code actually uses to infer intended meaning.
- **Live data profiling:** Runs aggregate queries to reveal enum usage periods, implied relationships and orphaned rows.
- **Data era detection:** Identifies generations of rows with differing shapes that any change must account for.
- **Declared versus actual gap:** Compares what the schema permits with what the data contains, such as null-as-empty-string usage.
- **Structured model report:** Writes a data model document with entities, vocabulary, eras, relationships and unverified gaps.

## Good for

- Figure out what an undocumented orders table really contains before changing it
- Find out which status values are still written and which are legacy
- Check whether child rows have valid parent records when foreign keys are missing
- Map who reads a production table before running a migration
- Understand why a column named status holds several different vocabularies

## Install

### Claude Code

This skill ships in the `fde-data` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add rpraharaj/forward-deployed-engineer
/plugin install fde-data@fde-skills
```

Or copy only this skill to `~/.claude/skills/data-archaeology`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/data-archaeology &&
cp -R "$tmp/fde-data/skills/data-archaeology" ~/.claude/skills/data-archaeology &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/data-archaeology` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/data-archaeology` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/data-archaeology &&
cp -R "$tmp/fde-data/skills/data-archaeology" ~/.agents/skills/data-archaeology &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/data-archaeology` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/data-archaeology` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/data-archaeology &&
cp -R "$tmp/fde-data/skills/data-archaeology" ~/.cursor/skills/data-archaeology &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/data-archaeology` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/rpraharaj/forward-deployed-engineer.git --path fde-data/skills/data-archaeology
```

Or copy the folder to `~/.gemini/skills/data-archaeology` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/data-archaeology`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/data-archaeology &&
cp -R "$tmp/fde-data/skills/data-archaeology" ~/.copilot/skills/data-archaeology &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/data-archaeology` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git
```

Then copy `forward-deployed-engineer/fde-data/skills/data-archaeology` into your agent's skills folder as `data-archaeology`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Data archaeology need database access?

Database read access is ideal, mainly for aggregate queries. Without it, the skill still works from migrations and code at reduced confidence, and says so.

### When does Data archaeology trigger?

It applies when a schema is undocumented, the domain model is unclear, before a migration or reporting change, or when column names do not match their contents.

### What does Data archaeology produce?

It writes a data model document to the workspace traces folder, covering entities, column reality, live vocabulary, eras, relationships, other readers and gaps.

### Does Data archaeology change the database?

The skill is built around reading migrations, code and aggregate queries; it does not describe making changes to the data.

### How do I install Data archaeology in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/data-archaeology to use it in all your projects, or to .claude/skills/data-archaeology in one project. Or install the fde-data plugin, which includes it: /plugin marketplace add rpraharaj/forward-deployed-engineer, then /plugin install fde-data@fde-skills.

### Does Data archaeology run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Data archaeology?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Data archaeology?

The closest alternatives to Data archaeology are Db change management, Database migrations, Alembic knowledge patch, Cosmosdb datamodeling and Bigquery migration validator.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Db change management](https://ai-powered.com/skills/db-change-management): Db change management is an open-source agent skill for databases.
- [Database migrations](https://ai-powered.com/skills/database-migrations): Database migrations is an open-source agent skill for databases.
- [Alembic knowledge patch](https://ai-powered.com/skills/alembic-knowledge-patch): Alembic knowledge patch is an open-source agent skill for databases.
- [Cosmosdb datamodeling](https://ai-powered.com/skills/cosmosdb-datamodeling): Cosmosdb datamodeling is an open-source agent skill for databases.
- [Bigquery migration validator](https://ai-powered.com/skills/bigquery-migration-validator): Bigquery migration validator is an open-source agent skill for databases.
- [Planning oracle to postgres migration integration testing](https://ai-powered.com/skills/planning-oracle-to-postgres-migration-integration-testing): Planning oracle to postgres migration integration testing is an open-source agent skill for databases.
- [SQL queries](https://ai-powered.com/skills/sql-queries): SQL queries is an open-source agent skill for databases.
- [SQL server table reconciliation](https://ai-powered.com/skills/sql-server-table-reconciliation): SQL server table reconciliation is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/data-archaeology
