migrate-docs

migrate-docs is a command for Claude Code from zhyx12/projtool. It costs 43 tokens per session (709 once invoked), scanned A, original, MIT.

A command for moving an older research documentation layout into a newer thread registry. The older layout keeps plans in plans/ and experiments in exp/, while the registry organizes them into linked research threads.

In plain words
What is it for?
Use it to scan for unregistered plans, experiments, broken references, or other documentation problems. It creates a dry-run proposal and asks the user to confirm mappings before applying changes.
Why use it?
Projects with older folders may lack the records and links needed by newer research tools. The command detects mismatches and prepares a migration without guessing the project’s history.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to scan for unregistered plans, experiments, broken references, or other documentation problems. It creates a dry-run proposal and asks the user to confirm mappings before applying changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zhyx12/projtool/migrate-docs
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/zhyx12/projtool

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 migrate-docs

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhyx12/projtool/migrate-docs"><img src="https://agentmods.dev/badge/commands/zhyx12/projtool/migrate-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 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.00043 $0.00709
Opus 5.5 $0.00017 $0.00284
Sonnet 5.5 $0.00009 $0.00142
Haiku 4.5 $0.00004 $0.00071

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

Security

Grade A, and why

migrate-docs 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 2mo 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.

src/projtool/assets/project_templates/claude/commands/migrate-docs.md · 51 lines

How it starts

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

/migrate-docs — adopt an old docs layout into the registry

This project's docs may predate the registry: standing plans under plans/ and experiment scratch under exp/. This command adopts them into docs/registry/ so lineage tooling (thread_tree, edges, freezes) works. The tool never guesses history — the human confirms every decision.

Steps

  1. Scan. mcp__projtool__reconcile_docs (read-only, never raises) reports drift as findings. Present them grouped by kind, one line each: unregistered_experiment_dir, unregistered_thread_dir, unregistered_plan, invalid_record, broken_doc_ref, graph_violation, runs_index_corrupt. If it comes back clean and there are no plans/ or exp/ directories, the project is already migrated (or has nothing to adopt) — say so and stop.

  2. Dry-run. mcp__projtool__migrate_docs_layout() (no args) returns a proposal. Show it as a table:

    • threads_to_create — proposed threads, each with its source from_plan;
    • experiments — each with suggested_thread, suggestion_reason, runs_found, and suggested_status;
    • already_registered — what's left alone. The dry-run always works — dirty plan files are checked at apply time, not here.
  3. Confirm the mapping WITH THE USER. The suggested_* fields are suggestions, not decisions. Build a mapping that decides every proposed experiment — the tool refuses a partial mapping. For each <exp_slug>, the value is {"thread": <existing/proposed thread slug | thr_ id | "_scratch" | "skip">} with an optional "status" override (planned | running | finalized | abandoned). "_scratch" routes it under the built-in scratch thread; "skip" leaves it unadopted (and still counts as a decision). Walk the user through it; do not fill it in yourself.

  4. Apply. mcp__projtool__migrate_docs_layout(apply=True, mapping={...}). If it refuses because plan files have uncommitted changes, it names them — commit those first (narrow git add) and re-apply. Report the summary: created threads, imported experiments (stamped imported, with no edges and an empty frozen block — the tool never reconstructs history), runs backfilled, and plan files git-mv'd into threads/<slug>/plan.md. Then run reconcile_docs again and show it comes back clean (or exactly what remains).

Read the full file on GitHub · 51 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. 2mo ago First seen · 51 lines · 43 tokens per session scan A 86e97895c6d9

Subscribe to this mod's changes

migrate-docs is a command published in the GitHub repository zhyx12/projtool (1 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 709 once invoked, about $0.0002 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-31.

Related

migrate-docs compared with commands from other repositories

migrate-docs next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
migrate-docszhyx12/projtoolCommand12mo agoMITA43Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand148kyesterdayMITA13Claude Code
analyzegithub/spec-kitCommand148kyesterdayMITA26Claude Code
convergegithub/spec-kitCommand148kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand148kyesterdayMITA14Claude Code