code-archaeology

code-archaeology is a skill for Claude Code, Codex from flonat/flonat-research. It costs 50 tokens per session (1,073 once invoked), scanned A, original, MIT.

A workflow for understanding the structure, purpose, and history of old code, data, or analysis files before changing them.

In plain words
What is it for?
It documents old projects, traces their processing steps, and prepares them for safe extension.
Why use it?
It reduces the risk of breaking inherited or dormant work whose organization and intent are unclear.

Skill for Claude CodeCodex

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 skills/flonat/flonat-research/code-archaeology
Any agent
npx skills add flonat/flonat-research --skill code-archaeology
Clone the repo
git clone --depth 1 https://github.com/flonat/flonat-research

Made for: Claude Code, Codex.

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 code-archaeology

README.md
[![agentmods](https://agentmods.dev/badge/skills/flonat/flonat-research/code-archaeology.svg)](https://agentmods.dev/skills/flonat/flonat-research/code-archaeology)
Your own site
<a href="https://agentmods.dev/skills/flonat/flonat-research/code-archaeology"><img src="https://agentmods.dev/badge/skills/flonat/flonat-research/code-archaeology.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,073 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.00050 $0.01073
Opus 5 $0.00025 $0.00536
Sonnet 5 $0.00010 $0.00215
Haiku 4.5 $0.00005 $0.00107

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

Security

Grade A, and why

code-archaeology 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 yesterday.

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.

skills/code-archaeology/SKILL.md · 142 lines

How it starts

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

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)

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

Read the full file on GitHub · 142 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. yesterday First seen · 142 lines · 50 tokens per session scan A c17a3eadad49

Subscribe to this mod's changes

code-archaeology is a skill published in the GitHub repository flonat/flonat-research (131 stars, last pushed 10d ago), licensed MIT. It adds 50 tokens to every session and 1,073 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-09-03.

Related

Other skills, from other repositories

fin-paper-convert

Compile LaTeX to PDF and convert to target journal format.

csmar432/finai-research · 12 tokens

fin-paper-plan

Generate structured paper outline adapted to target journal.

csmar432/finai-research · 8 tokens

latex-compile

Compile a LaTeX document and fix every error plus aesthetic issue (overfull/underfull boxes, widows, alignment, fonts) for a clean PDF and log. Use this instead of running pdflatex/latexmk manually — it avoids the latexmk stale-log trap and silent grep failures on binary log output, and it reformats rather than…

Mexregkan/claude-for-researchers · 79 tokens

claim-audit

Audit what a passing script actually established, before writing any prose about it — build the computed-object ledger, rewrite every check's label as the weakest statement that makes its body pass, and separate the verdict on someone else's work from your own new claim. Run after the script passes and BEFORE the…

Mexregkan/claude-for-researchers · 75 tokens

doc-audit

Evaluate one project document in detail — a workbook section, big picture, strategy map, handoff message, paper, brief, or primer — without editing it. Runs the mechanical lint, builds a claim ledger, types every headline against the eight claim statuses in CLAUDE.md, traces cited evidence to the scripts and logs that…

Mexregkan/claude-for-researchers · 140 tokens

nb-to-wolfbook

Convert Mathematica .nb or .m files to Wolfbook .wb format so they open and run in VS Code. Use when bringing existing .nb/.m files into Wolfbook, or to make an existing .wb bridge-safe.

Mexregkan/claude-for-researchers · 53 tokens