Agent skill

Code Archaeology

by flonat in flonat/flonat-research

Recover the structure, intent, and lineage of old code, data, or analysis files.

MITAuto-check passed

Install Code Archaeology

skills CLI
$ npx skills add flonat/flonat-research --skill code-archaeology -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install flonat/flonat-research code-archaeology --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/flonat/flonat-research.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-archaeology .claude/skills/code-archaeology && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-archaeology
GitHub stars
145
Token cost
~1.2k tokens
SKILL.md length
439 words
Files
1
Skills in repo
83
Repo updated
First seen
Licence
MIT

At a glance

Recover the structure, intent, and lineage of old code, data, or analysis files.

  • Works in 5 steps: Explore the directory → Understand the pipeline → Document findings → …
  • Dormant research code must be understood before it is changed
  • SKILL.md covers Purpose, When to Use, When NOT to Use and Workflow, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Code Archaeology is an agent skill from flonat/flonat-research. Recover the structure, intent, and lineage of old code, data, or analysis files. Use when inherited or dormant research code must be understood before it is changed. Not for a quality review of already-understood code.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Shareable Claude Code + Codex infrastructure for PhD researchers — skills, agents, hooks, and rules for academic workflows. The licence is MIT.

When your agent uses it

  • Dormant research code must be understood before it is changed

Example prompts

  • “/code-archaeology”

Requirements

  • Pre-approved tools (allowed-tools): Bash(ls*), Bash(cp*), Bash(mkdir*), Bash(git*), Read, Write, Edit, Glob, Grep

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Explore the directory
  2. Understand the pipeline
  3. Document findings
  4. Establish safety
  5. Create audit report

What it can do on your machine

Read from SKILL.md and the folder at commit da27600. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(ls*)
    • Bash(cp*)
    • Bash(mkdir*)
    • Bash(git*)
    • Read
    • Write
    • Edit
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Archaeology loads about 1.2k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 439 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from flonat/flonat-research at commit da27600, republished under its MIT licence (© flonat). 439 words, ~1,165 tokens.

Download SKILL.mdSave it as .claude/skills/code-archaeology/SKILL.md (or your agent's skills folder).
name
code-archaeology
description
Recover the structure, intent, and lineage of old code, data, or analysis files. Use when inherited or dormant research code must be understood before it is changed. Not for a quality review of already-understood code.
allowed-tools
Bash(ls*), Bash(cp*), Bash(mkdir*), Bash(git*), Read, Write, Edit, Glob, Grep
argument-hint
[project-path]

Code Audit Skill

CRITICAL RULE: Never delete data or code files. Copy to legacy/, never move or delete originals.

Systematically review and understand old code, data, and analysis files.

Purpose

Based on Scott Cunningham's workflow of reviving old projects - understanding what exists, documenting it, and making it safe to work with.

For formal audits with cross-language replication and referee reports, use the Referee 2 agent (.claude/agents/referee2-reviewer.md). This skill is for understanding and documenting existing code, not formal verification.

When to Use

  • Returning to an old project after months/years
  • Taking over code from a coauthor
  • Before extending existing analysis
  • R&R requiring you to revisit old work

When NOT to Use

  • Brand new projects — use project-safety skill instead to set up structure
  • Formal code verification — use the Referee 2 agent for cross-language replication
  • Quick code questions — just ask directly, no need for full audit

Workflow

  1. Explore the directory:

    • What files exist?
    • What's the structure?
    • When were things last modified?
  2. Understand the pipeline:

    • What are the main scripts?
    • What order do they run in?
    • What data do they use?
    • What outputs do they produce?
  3. Document findings:

    • Create/update README.md
    • Map data flows
    • Note dependencies
  4. Establish safety:

    • Create legacy/ folder
    • Copy (don't move) originals
    • Set up version control if not present
  5. Create audit report:

    • What the code does
    • Potential issues found
    • Recommendations for cleanup

Safety Rules (from Scott Cunningham)

markdown
1. Never delete data. Under no circumstances.
2. Never delete programs. No do-files, no R scripts, nothing.
3. Stay in this folder. Can go down, not up.
4. Use a legacy folder. Move originals there for safekeeping.
5. Copy, don't move. When reorganising, always copy from legacy.

Prompt Template

I'm returning to an old project after [TIME]. Please help me understand what's here.

1. Explore the directory and tell me what you find
2. Identify the main analysis scripts and their order
3. Map the data pipeline (inputs → processing → outputs)
4. Note any potential issues (missing files, unclear code, etc.)
5. Create a README documenting everything

Before making ANY changes, create a legacy/ folder and copy everything there.

Data Flow Mapping

Understand how data moves through the project:

  • What raw data files exist?
  • What cleaning/transformation scripts run?
  • What intermediate files are created?
  • What outputs are generated?
Show full SKILL.md (180 more words)Show less

Compare Datasets (if multiple versions exist)

When you find multiple versions of the same data:

  • Side-by-side comparison of key variables
  • Identify where datasets diverge
  • Visualize differences geographically/temporally
  • Document which version to use going forward

Output Files

After a code audit, you should have:

project/
├── README.md           ← Project overview (generated)
├── AUDIT.md            ← Audit findings and issues
├── CLAUDE.md           ← Safety rules for this project
├── legacy/             ← Protected original files
├── docs/
│   └── data_dictionary.md
└── output/
    └── audit_deck.pdf  ← Visual summary

Questions to Answer

  • What is the research question?
  • What data is used?
  • What is the identification strategy?
  • What are the main results?
  • Are results reproducible from the code?
  • What assumptions are made?
  • What are the known limitations?
  • What would need to change to extend this?

Example Prompts

Initial exploration:

"Read all the .do/.R/.py files in this project and create a summary of what each script does, including inputs and outputs."

Data comparison:

"Compare dataset_v1.dta and dataset_v2.dta. Show me where they differ, with summary statistics and visualizations."

Documentation:

"Create a README.md that documents this project's structure, data sources, and how to reproduce the main results."

Example Use

"Audit my Brexit replication project - I haven't touched it in 8 months. Tell me what's there, what state it's in, and what I need to do to pick it back up."

© flonat, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/code-archaeology of flonat/flonat-research.

Open the folder on GitHubat commit da27600

Compare with similar skills

Code Archaeology next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Archaeology compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Archaeology this skillflonat/flonat-research145—~1.2kAutomated safety check: PassMIT
Intent Requirements IntakeYeachan-Heo/oh-my-claudecode40k—~1.5kAutomated safety check: PassMIT
Browser Intentruvnet/ruflo74k—~1.2kAutomated safety check: NotesMIT
Intent Driven Developmentaffaan-m/ECC274k1 repos~4.3kAutomated safety check: PassMIT
Gbp Local SEO Intentsickn33/agentic-awesome-skills47k1 repos~5.9kAutomated safety check: PassMIT
Recovering Deleted Files With Photorecmukul975/Anthropic-Cybersecurity-Skills34k—~2.3kAutomated safety check: NotesApache-2.0

Similar skills

  • Intent Requirements Intake

    Yeachan-Heo/oh-my-claudecode

    Turns a pasted chat log or spoken problem report from support or ops staff into a reviewed five-section intent.md through numbered batches of questions.

    40k GitHub stars~1.5k tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Browser Intent

    ruvnet/ruflo

    Execute a natural-language browser intent via page-agent (browseract) when the target is easier to describe than to select — degrades gracefully when page-agent or an OpenAI-compatible LLM provider…

    74k GitHub stars~1.2k tokensUpdated today
    Productivity & AutomationAuto-check: notes
  • Turn ambiguous or high-impact product and engineering changes into scoped, verifiable acceptance criteria before or alongside implementation.

    274k GitHub starsUsed in 1 repo~4.3k tokens
    DevelopmentAuto-check passed
  • Gbp Local SEO Intent

    sickn33/agentic-awesome-skills

    Google Business Profile register: element, primary and supporting keywords, search intent, landing page, post dates, review rating and reply status, visibility and status.

    47k GitHub starsUsed in 1 repo~5.9k tokens
    Marketing & SEOAuto-check passed
  • Recovering Deleted Files With Photorec

    mukul975/Anthropic-Cybersecurity-Skills

    Recovers deleted files from disk images and storage media using PhotoRec's file signature-based carving engine, which works regardless of file system damage or corruption.

    34k GitHub stars~2.3k tokensUpdated 1 mo ago
    SecurityAuto-check: notes
  • NEAR Intents Swap Integration

    internet-court/internet-court-skill

    Builds cross-chain token swaps and bridge flows with the NEAR Intents 1Click API: quotes, deposit addresses, per-chain deposits and status polling.

    6.4k GitHub starsUsed in 2 repos~939 tokens
    Backend & APIsAuto-check passed

More from flonat/flonat-research

All 83 skills in this repo
  • Latex Posters

    flonat/flonat-research

    Create a large-format academic poster in LaTeX using beamerposter, tikzposter, or baposter.

    145 GitHub stars~1.5k tokensUpdated 8 days ago
    Auto-check: notes
  • Skill Creator

    flonat/flonat-research

    Create, revise, and evaluate reusable AI workflow skills, including trigger-quality tests.

    145 GitHub stars~4.4k tokensUpdated 8 days ago
    Auto-check passed
  • DOCX

    flonat/flonat-research

    Create, read, edit, or convert Microsoft Word documents while preserving professional document structure.

    145 GitHub stars~1.2k tokensUpdated 8 days ago
    Auto-check passed
  • PDF

    flonat/flonat-research

    Read, create, combine, split, rotate, OCR, watermark, secure, or extract content from PDF files.

    145 GitHub stars~488 tokensUpdated 8 days ago
    Auto-check passed
  • Init Project Orchestration

    flonat/flonat-research

    Create or migrate project-level agents, repeatable project workflows, and planning state from one client-neutral contract, then render repository-scoped adapters for both Claude Code and Codex.

    145 GitHub stars~1.6k tokensUpdated 8 days ago
    Auto-check passed
  • Pre Commit Audit

    flonat/flonat-research

    Deliver a fast pre-commit safety scan: file size, anonymity (author / affiliation strings in tex/bib), hardcoded secrets, and invisible-Unicode carriers.

    145 GitHub stars~2.8k tokensUpdated 8 days ago
    Auto-check: notes

Questions about Code Archaeology

What does Code Archaeology do?

Recover the structure, intent, and lineage of old code, data, or analysis files. Code Archaeology is an agent skill from flonat/flonat-research. Recover the structure, intent, and lineage of old code, data, or analysis files.

When should I use Code Archaeology?

Code Archaeology fits situations like: dormant research code must be understood before it is changed.

How do I install Code Archaeology in Claude Code?

Run `npx skills add flonat/flonat-research --skill code-archaeology -a claude-code`. Or copy the skill folder (skills/code-archaeology in flonat/flonat-research) into .claude/skills/code-archaeology in your project. Claude Code loads it when a task matches its description.

How do I install Code Archaeology in Codex?

Run `npx skills add flonat/flonat-research --skill code-archaeology -a codex`. Or copy the skill folder (skills/code-archaeology in flonat/flonat-research) into .agents/skills/code-archaeology in your project. Codex loads it when a task matches its description.

Can I use Code Archaeology in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add flonat/flonat-research --skill code-archaeology -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-archaeology, .gemini/skills/code-archaeology, .github/skills/code-archaeology and .opencode/skills/code-archaeology in your project.

What does Code Archaeology need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Archaeology is instructions for the agent only. Its frontmatter pre-approves these tools: Bash(ls*), Bash(cp*), Bash(mkdir*), Bash(git*), Read, Write, Edit, Glob, Grep.

Does Code Archaeology access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Archaeology safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Archaeology use?

Code Archaeology is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Archaeology use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Archaeology?

Skills that share tags, products or a category with Code Archaeology: Intent Requirements Intake (Yeachan-Heo/oh-my-claudecode, 40k stars), Browser Intent (ruvnet/ruflo, 74k stars), Intent Driven Development (affaan-m/ECC, 274k stars) and Gbp Local SEO Intent (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Archaeology?

flonat (a GitHub user) maintains it in flonat/flonat-research, which has 145 GitHub stars. The repository holds 83 skills in this directory. The repository was last updated on September 29, 2026.

Source: flonat/flonat-research on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.