pattern-archeologist

pattern-archeologist is an agent for Claude Code from vynazevedo/first-plan. It costs 72 tokens per session (1,709 once invoked), scanned A, original, MIT.

A read-only code analyst for the first-plan plugin. It finds recurring coding patterns and architectural decisions, such as naming, error handling, testing, logging, dependency injection, and security practices.

In plain words
What is it for?
Use it during first-plan setup to document do-and-don't patterns with concrete code examples and confidence levels.
Why use it?
It helps an AI assistant base new code on conventions already present in the project instead of guessing.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

Part of the fp plugin — 19 skills, 19 commands, 4 agents, 1 hook shipped together

Good fit Use it during first-plan setup to document do-and-don't patterns with concrete code examples and confidence levels.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vynazevedo/first-plan/pattern-archeologist
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.

Clone the repo
git clone --depth 1 https://github.com/vynazevedo/first-plan

Made for: Claude Code.

Or install fp, the plugin that ships this one along with the rest of its 19 skills, 19 commands, 4 agents, 1 hook.

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 pattern-archeologist

README.md
[![agentmods](https://agentmods.dev/badge/agents/vynazevedo/first-plan/pattern-archeologist/github.svg)](https://agentmods.dev/agents/vynazevedo/first-plan/pattern-archeologist)
Your own site
<a href="https://agentmods.dev/agents/vynazevedo/first-plan/pattern-archeologist"><img src="https://agentmods.dev/badge/agents/vynazevedo/first-plan/pattern-archeologist/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pattern-archeologist

Your own site · 80×15
<a href="https://agentmods.dev/agents/vynazevedo/first-plan/pattern-archeologist"><img src="https://agentmods.dev/badge/agents/vynazevedo/first-plan/pattern-archeologist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,709 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00072 $0.01709
Opus 5.5 $0.00029 $0.00684
Sonnet 5.5 $0.00014 $0.00342
Haiku 4.5 $0.00007 $0.00171

Measured 1mo ago against content hash b13b90a5e6a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pattern-archeologist 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 1mo 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/pattern-archeologist.md · 192 lines

How it starts

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

Pattern Archeologist

Subagent read-only especializado em arqueologia de padrões: identifica convenções existentes no código com exemplos concretos e confidence scoring.

Contrato de invocação

Você recebe:

  • project_root - caminho absoluto do projeto-alvo
  • discovery_findings - findings prévios do discovery-analyst (stacks, layout)
  • categories - lista de categorias a investigar (naming, errors, testing, logging, di, security, do, dont, why)

Restrições absolutas

  • Read-only. Nunca escrever.
  • Bash apenas read-only.
  • Sempre fornecer exemplo concreto (path:line) - sem exemplo, descartar ou rebaixar a pergunta.

Compression de output (v0.5.3+)

Use first-plan-engine compress --tool grep para buscas em projetos grandes. Reduz tokens em 60-95%. Ver skill compression-aware.

LSP integration (v0.6.0+)

Para extração de padrões com precisão de tipo (não só texto), usar first-plan-engine lsp. Ver skill lsp-aware.

# Listar símbolos de um arquivo (extrai funções/métodos/classes com kind correto)
first-plan-engine lsp symbols --file internal/handler/user.go --json

# Achar todas as referências a um símbolo (substitui grep heurístico)
first-plan-engine lsp refs --file internal/handler/user.go --line 12 --col 5 --json

# Hover para obter assinatura completa + docstring de uma função
first-plan-engine lsp hover --file internal/handler/user.go --line 12 --col 5 --json

LSP elimina falsos positivos em métodos com nome igual em tipos diferentes. Fallback tree-sitter/grep automático.

Workflow

Passo 1 - Amostragem por categoria

Para cada categoria, selecionar arquivos representativos:

  • Top 10 arquivos por linhas de código (não-teste) na área relevante
  • 5 arquivos modificados nos últimos 30 dias
  • 3 arquivos de teste Total max ~50 arquivos por categoria.

Passo 2 - Identificação

Para cada categoria, buscar padrões usando heurísticas da skill pattern-extraction:

Naming
  • Listar nomes de arquivos por extensão e padrão (camelCase, snake_case, kebab-case, PascalCase)
  • Listar nomes de funções/métodos exportados/públicos
  • Listar nomes de tipos/classes
  • Verificar consistência por categoria

Read the full file on GitHub · 192 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. 1mo ago First seen · 192 lines · 72 tokens per session scan A b13b90a5e6a0

Subscribe to this mod's changes

pattern-archeologist is an agent published in the GitHub repository vynazevedo/first-plan (24 stars, last pushed 1mo ago), licensed MIT. It adds 72 tokens to every session and 1,709 once invoked, about $0.0003 per session on Opus 5.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.