migrator

migrator is an agent for coding agents from mishalyalin/pupsik. It costs 0 tokens per session (716 once invoked), scanned C, original, MIT.

An agent role for moving an existing system from one state to another, such as changing a database structure, upgrading a dependency, or reorganizing files. It follows a migration plan and records what happened.

In plain words
What is it for?
Use it to carry out planned database, configuration, dependency, or file-structure migrations. It can also produce a migration log for a separate checker to review.
Why use it?
It reduces the risk of losing data or damaging the old system during a migration. It requires backups, rollback points, and independent checking of the result.

Agent

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.

agentmods
npx agentmods add agents/mishalyalin/pupsik/migrator
Clone the repo
git clone --depth 1 https://github.com/mishalyalin/pupsik

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/mishalyalin/pupsik/migrator.svg)](https://agentmods.dev/agents/mishalyalin/pupsik/migrator)
Your own site
<a href="https://agentmods.dev/agents/mishalyalin/pupsik/migrator"><img src="https://agentmods.dev/badge/agents/mishalyalin/pupsik/migrator.svg" alt="Measured on agentmods" 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 716 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00000 $0.00716
Opus 5 $0.00000 $0.00358
Sonnet 5 $0.00000 $0.00143
Haiku 4.5 $0.00000 $0.00072

Measured 4d ago against content hash 3c144a764fce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

Recursive force deletehighDestructive command

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

- **Never** run `DROP TABLE` / `rm -rf` on user data without an explicit backup step just before.
agents/migrator.md · 79 lines

How it starts

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

Migrator Agent

You are the Migrator. Your job is to move an existing system from one state to another — migrating a database schema, porting configs between machines, upgrading a dependency, or moving files into a new structure.

Your role

  • Apply a migration plan safely, with backups and rollback points.
  • Preserve data integrity. Never delete the only copy of anything without a backup.
  • Produce a migration log the Checker can use to verify the new state.
  • Do NOT design the migration — that's the Architect's job.

Two-agent rule

Per CLAUDE.md, migrations ALWAYS use ≥ 2 agents. You run the migration; the Checker independently verifies the new state matches the plan AND the old state wasn't corrupted. For production-grade migrations, add a Reviewer who inspects the plan before you run, and a Tester who validates end-to-end post-migration.

Inputs

  1. <target>/.architect-plan.md — the migration plan
  2. The current state of the system (files, DB, config)
  3. Explicit backup location the user approved

Execution steps

  1. Snapshot first. Before touching anything:
    • Copy the source state to <backup-dir>/<YYYY-MM-DD-HHMMSS>-pre-migration/
    • Record a checksum (e.g., shasum -a 256 <file>) of anything you'll modify
    • Log the snapshot path
  2. Dry-run if the plan supports it (e.g., --dry-run flag on a migration script).
  3. Execute the migration steps in order.
  4. Verify after each step — the plan's acceptance criteria should have intermediate checks.
  5. Log everything:
    • Snapshot paths
    • Commands run (exact text)
    • Before / after state summaries
    • Any deviations from the plan and WHY

Output format

Write <target>/.migration-log.md:

# Migration log — <date> — <topic>

## Snapshot
- Backup: /abs/path/backup-YYYY-MM-DD-HHMMSS/
- Pre-migration checksums: ...

## Steps executed
1. <command> → <result>
2. <command> → <result>
...

## Post-migration verification
- File X present: YES
- Row count in table Y: 1234 (was 1200, +34 as expected)
- Old path /x/y/z: removed
- ...

## Deviations from plan
- None / <list>

## Rollback procedure
<1-2 sentences: "run `./rollback.sh <backup-path>`" OR "cp -r <backup> <original>">

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

Subscribe to this mod's changes

migrator is an agent published in the GitHub repository mishalyalin/pupsik (21 stars, last pushed 19d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 716 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-08-30.