claude-md-migrate

claude-md-migrate is a command for Claude Code from fablerlabs/claude-md-templates. It costs 31 tokens per session (983 once invoked), scanned A, original, MIT.

A command for shortening and verifying a repository's CLAUDE.md or AGENTS.md instruction file while preserving its project facts and hard rules.

In plain words
What is it for?
Use it to migrate an existing instruction file, check whether its commands still work, and identify when a new file or an audit would be more appropriate.
Why use it?
It removes generic advice and stale references so the file remains a concise, trustworthy map of the repository.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-md-kit plugin — 3 commands shipped together

Good fit Use it to migrate an existing instruction file, check whether its commands still work, and identify when a new file or an audit would be more appropriate.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add fablerlabs/claude-md-templates
Claude Code
/plugin install claude-md-kit

Made for: Claude Code.

Or install claude-md-kit, the plugin that ships this one along with the rest of its 3 commands.

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 claude-md-migrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/fablerlabs/claude-md-templates/claude-md-migrate/github.svg)](https://agentmods.dev/commands/fablerlabs/claude-md-templates/claude-md-migrate)
Your own site
<a href="https://agentmods.dev/commands/fablerlabs/claude-md-templates/claude-md-migrate"><img src="https://agentmods.dev/badge/commands/fablerlabs/claude-md-templates/claude-md-migrate/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 claude-md-migrate

Your own site · 80×15
<a href="https://agentmods.dev/commands/fablerlabs/claude-md-templates/claude-md-migrate"><img src="https://agentmods.dev/badge/commands/fablerlabs/claude-md-templates/claude-md-migrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 983 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.00031 $0.00983
Opus 5 $0.00015 $0.00491
Sonnet 5 $0.00006 $0.00197
Haiku 4.5 $0.00003 $0.00098

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

Security

Grade A, and why

claude-md-migrate 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 12d 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.

commands/claude-md-migrate.md · 84 lines

How it starts

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

Migrate this repository's agent rules file (CLAUDE.md, or AGENTS.md if that's what exists; the user may pass an explicit path in arguments) to the lean template style. Follow these steps exactly.

0. Guard

If neither CLAUDE.md nor AGENTS.md exists, say so and suggest /claude-md-new, then stop. If the file is already ≤80 lines AND every command in it verifies in step 2, tell the user it doesn't need a migration and suggest /claude-md-audit for a graded check instead — unless they explicitly asked for a rewrite in their arguments.

1. Read the current file and classify every line

Sort each line/section into exactly one bucket:

  • Facts — commands, paths, conventions, invariants specific to THIS repo.
  • Hard rules — security, legal, safety, or "never do X" constraints the user wrote. These are sacred: carry them over VERBATIM, never paraphrased, never dropped.
  • Wishes — generic advice ("write clean code", "follow best practices", "be thorough"). Each of these is negative signal; they will be dropped.
  • Stale / unverifiable — references to paths, scripts, or tools you cannot confirm in step 2. Candidates for dropping, with the reason recorded.

2. Verify the facts against reality

For every command and path the file claims, check the ground truth: package.json scripts, pyproject.toml, Cargo.toml, Makefile, justfile, Taskfile.yml, docker-compose.yml, CI workflows in .github/workflows/, and the actual tree.

  • Command found in a manifest/CI/README → keep (correct it if the flags drifted).
  • Path exists → keep. Path gone → drop as stale.
  • Claim you cannot verify either way → drop it; a rules file that lies is worse than none. If it looks important, note it as a question for the user instead of keeping it on faith.

While you're in the manifests, note any REAL run / test / single-test / lint / build commands the old file was missing — the migration should add them.

3. Restructure to the template style

Read ${CLAUDE_PLUGIN_ROOT}/CLAUDE.starter.md for the target structure, and skim ${CLAUDE_PLUGIN_ROOT}/FIELD-GUIDE.md for register and altitude. Rebuild the file:

Read the full file on GitHub · 84 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. 12d ago First seen · 84 lines · 31 tokens per session scan A dc4a92b88ba0

Subscribe to this mod's changes

claude-md-migrate is a command published in the GitHub repository fablerlabs/claude-md-templates (2 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 983 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-08-31.