migrator

migrator is an agent for Claude Code from XRenSiu/claude-code-forge. It costs 0 tokens per session (3,582 once invoked), scanned C, original, MIT.

A migration agent updates generated persona skills when their shared component definitions change. It copies the needed components into each skill so the skill remains independent of the central library, with snapshots and rollback for each applied change.

In plain words
What is it for?
It upgrades a persona skill in place, checks that it no longer references the central system, and supports rollback of an applied migration.
Why use it?
It prevents old generated skills from becoming out of date while avoiding links back to the generation system. Reversible changes reduce the risk of damaging an existing skill.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions .claude-plugin.

Part of the persona-distill plugin — 5 skills, 16 agents shipped together

Good fit It upgrades a persona skill in place, checks that it no longer references the central system, and supports rollback of an applied migration.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/xrensiu/claude-code-forge/migrator
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/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install persona-distill, the plugin that ships this one along with the rest of its 5 skills, 16 agents.

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 migrator

README.md
[![agentmods](https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/migrator/github.svg)](https://agentmods.dev/agents/xrensiu/claude-code-forge/migrator)
Your own site
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/migrator"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/migrator/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 migrator

Your own site · 80×15
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/migrator"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/migrator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,582 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00000 $0.03582
Opus 5.5 $0.00000 $0.01433
Sonnet 5.5 $0.00000 $0.00716
Haiku 4.5 $0.00000 $0.00358

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

Security

Grade C, and why

migrator scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- If regression ≤ `regression_threshold` (default 5): **commit** — swap the live directory with staging (`mv persona_skill_path persona_skill_path.old && mv .migrating/{persona-slug} persona_skill_path && rm -rf persona_
plugins/persona-distill/skills/distill-meta/agents/migrator.md · 221 lines

How it starts

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

Role

Self-contained-preserving migration agent. When the central component library in distill-meta/references/components/ evolves, already-generated persona skills are frozen — they still work, but their components reflect an older definition. This agent upgrades them in place while enforcing the self-containment invariant: after migration, grep -r "distill-meta" {persona_skill_path}/ MUST return zero hits. Nothing is linked, symlinked, or imported back to distill-meta — only borrow-copied (per contracts/component-contract.md §4).

Migration is opt-in and reversible. Every APPLY run snapshots the pre-state; rollback is available until the one-cycle retention expires. This agent does not judge quality — it delegates to persona-judge at step 7 and surfaces the result.

See distill-meta/references/migration.md for the normative procedure, risk-level rules, and failure modes. This agent is the operational counterpart; the reference is the spec.

Inputs

Input Type Required Default
persona_skill_path absolute path to the target persona skill root YES —
distill_meta_root absolute path to plugins/persona-distill/skills/distill-meta/ YES —
mode PLAN or APPLY YES —
auto_approve_patch_bumps bool optional true
backup_retain_count int optional 1 (one cycle)
regression_threshold int (raw-score points) optional 5
loop_counter int (for distill-meta orchestration) optional 0

Procedure

Operationalizes the 7-step plan from references/migration.md. Each step below cites the reference section.

Pre-check (before step 1)

  • Confirm persona_skill_path contains SKILL.md + manifest.json. If not, return BLOCKED with reason persona-skill-malformed.
  • Confirm distill_meta_root/references/components/ is readable. If not, return BLOCKED with reason distill-meta-unavailable.
  • Grep persona_skill_path for any existing distill-meta string references before migration starts. If ANY are found, return BLOCKED with reason pre-existing-self-containment-violation and refuse to proceed (the skill was already broken; migration would mask the bug).

Read the full file on GitHub · 221 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 · 221 lines · 0 tokens per session scan C fb9cf4e996e5

Subscribe to this mod's changes

migrator is an agent published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,582 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.