legacy

legacy is a command for Claude Code from luanpdd/kit-mcp. It costs 44 tokens per session (3,153 once invoked), scanned A, original, MIT.

A coordinator for safely improving old Feathers code, a Node.js framework, by first recording its current behavior and identifying safe places to change it.

In plain words
What is it for?
Use it to create characterization tests, find seams where dependencies can be separated, audit refactoring safety, and run a guided refactor.
Why use it?
It reduces the risk of breaking behavior that existing tests do not fully describe.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

Good fit Use it to create characterization tests, find seams where dependencies can be separated, audit refactoring safety, and run a guided refactor.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/luanpdd/kit-mcp/legacy
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/luanpdd/kit-mcp

Made for: Claude Code.

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 legacy

README.md
[![agentmods](https://agentmods.dev/badge/commands/luanpdd/kit-mcp/legacy.svg)](https://agentmods.dev/commands/luanpdd/kit-mcp/legacy)
Your own site
<a href="https://agentmods.dev/commands/luanpdd/kit-mcp/legacy"><img src="https://agentmods.dev/badge/commands/luanpdd/kit-mcp/legacy.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,153 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.00044 $0.03153
Opus 5 $0.00022 $0.01577
Sonnet 5 $0.00009 $0.00631
Haiku 4.5 $0.00004 $0.00315

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

Security

Grade A, and why

legacy 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 4d 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.

kit/commands/legacy.md · 264 lines

How it starts

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

Subcomandos cobrem capítulos do livro Feathers:

  • caracterizar — characterization tests (cap 13 + 23)
  • encontrar-seams — dependency-breaking via cap 25
  • auditar-refactor — gate canônico pre-refactor (cap 1 — cover-and-modify)
  • refactor — orquestrador completo de refactor (chain de tudo acima + execução)

Cria/Atualiza: o que cada agent invocado cria (characterization tests, SEAM-ANALYSIS.md, REFACTOR-SAFETY.md).

Após: o usuário tem o output do agent (suite de tests + análise de seams + veredito do gate + execução de refactor).

<execution_context> Skills consultadas pelos agents: kit/skills/legacy-characterization-tests/SKILL.md, kit/skills/legacy-seams-and-test-harness/SKILL.md, kit/skills/legacy-sprout-wrap-techniques/SKILL.md, kit/skills/legacy-effect-analysis/SKILL.md, kit/skills/legacy-monster-methods/SKILL.md, kit/skills/pre-refactor-characterization/SKILL.md + glossário em kit/skills/_shared-legacy/glossary.md.

Agents disponíveis:

Subcomandos suportados (sinônimos PT-BR/EN):

Subcomando Sinônimos Comando subjacente Cap livro
caracterizar characterize, char, gen-tests /caracterizar 13 + 23
encontrar-seams find-seams, seams, break-deps /encontrar-seams 25
auditar-refactor audit-refactor, audit, gate /auditar-refactor 1 + 13
refactor refactor-seguro, refactor-safe, refator /refactor-seguro (chain — todos)
capturar-payloads capture, capture-payloads /capturar-payloads (modernização)
caracterizar-prompt char-prompt, prompt-char /caracterizar-prompt (modernização)
storytelling story, story-do-codigo /storytelling 16-17 (modernização IA)
detectar-duplicacao dup, shotgun, detect-duplicates /detectar-duplicacao 21 (modernização IA)
audit-coverage cobertura, coverage-audit /auditar-observabilidade-cobertura (modernização cross-suite)
help ajuda, ? exibe esta tabela inline

Roteamento de flags por subcomando:

  • caracterizar <target_file> — flags --symbol --min-inputs --gap-fill --fixtures-dir --no-mutation
  • encontrar-seams <target_file> — flags --symbol --prefer --output
  • auditar-refactor <target_file> — flags --change-kind --mode --ticket --reason
  • refactor <target_file> — flags --mode (full|sprout|safe-extract|override) --ticket --reason --skip-seams --skip-characterize --symbol

Exemplos:

/legacy caracterizar src/orders/handler.ts                  # characterization tests
/legacy seams supabase/functions/webhook/index.ts           # análise de seams
/legacy auditar-refactor src/api/v1/orders.ts               # gate antes de PR de refactor
/legacy refactor src/orders/handler.ts                      # chain completo
/legacy refactor src/orders/handler.ts --mode=sprout        # adicionar feature sem tocar legado
/legacy help                                                 # exibe tabela de subcomandos

Read the full file on GitHub · 264 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. 4d ago First seen · 264 lines · 44 tokens per session scan A ed8ebe42fc5c

Subscribe to this mod's changes

legacy is a command published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 3,153 once invoked, about $0.0002 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.