migrate-isparto

migrate-isparto is a command for coding agents from BinaryHB0916/iSparto. It costs 0 tokens per session (1,413 once invoked), scanned B, original, MIT.

A setup command that migrates an existing project to the iSparto workflow. It first scans the project, reports gaps, proposes changes, and can execute the migration after confirmation.

In plain words
What is it for?
Use it to assess and migrate a project to iSparto, or preview the migration with the dry-run option.
Why use it?
It shows what will change before migration and protects existing content by not deleting or overwriting it. A dry-run lets you inspect the plan without making changes.

Command

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 commands/binaryhb0916/isparto/migrate-isparto
Clone the repo
git clone --depth 1 https://github.com/BinaryHB0916/iSparto

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-isparto

README.md
[![agentmods](https://agentmods.dev/badge/commands/binaryhb0916/isparto/migrate-isparto.svg)](https://agentmods.dev/commands/binaryhb0916/isparto/migrate-isparto)
Your own site
<a href="https://agentmods.dev/commands/binaryhb0916/isparto/migrate-isparto"><img src="https://agentmods.dev/badge/commands/binaryhb0916/isparto/migrate-isparto.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 1,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.01413
Opus 5 $0.00000 $0.00707
Sonnet 5 $0.00000 $0.00283
Haiku 4.5 $0.00000 $0.00141

Measured 3d ago against content hash 70a3369391d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

migrate-isparto scanned grade B 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Verify user-level Bash safety hook is registered in ~/.claude/settings.json:
commands/migrate-isparto.md · 86 lines

How it starts

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

You are the Setup Assistant. The user has run /migrate-isparto, asking you to migrate an existing project to the iSparto workflow.

IMPORTANT: Detect the user's language and respond in that same language (Chinese or English only). All generated documentation content must also be in the user's language.

Your job: scan the current project, report what exists and what's missing, propose a migration plan, and execute after user confirmation. Never delete or overwrite existing content.

Dry-run mode: If the user passes --dry-run (e.g., /migrate-isparto --dry-run), complete steps 1–2 (scan + propose plan) and then STOP. Do not ask for confirmation, do not execute anything. End by clearly informing the user (in user's language) that this was a dry-run and no changes were made. This lets the user safely preview the migration plan before committing to it.

Pre-flight environment check (required since v0.8.0): Before step 1, verify tmux is installed via command -v tmux. If missing, halt the migration and inform the user (in user's language) that tmux is required since iSparto v0.8.0 — the Independent Reviewer is invoked via codex exec in a tmux pane. Suggest brew install tmux (macOS) and ask the user to re-run /migrate-isparto after installing. Do not proceed.

  1. Scan the current project:

    • Read CLAUDE.md (does it exist? what sections does it have?)
    • Read .claude/settings.json (does it exist? what settings are already configured?)
    • Read docs/ (what files exist? do naming conventions match iSparto's -spec pattern?)
    • Check git status (is git initialized? what branch?)
    • Map existing files to iSparto equivalents (e.g., requirements.md → product spec, architecture.md → tech spec)
  2. Report findings and propose a migration plan:

    • List what was found with ✓ (exists) and ✘ (missing)
    • For each missing iSparto component, propose what to do:
      • CLAUDE.md: keep existing content, append iSparto collaboration mode sections (role definitions, trigger condition table, branching strategy, operational guardrails)
      • Existing spec-like docs: keep original files, optionally rename or create aliases — let the user choose
      • plan.md: if missing, generate a first version by analyzing current codebase state (what appears complete, what's in progress, what's TODO)
      • Missing spec templates: offer to create empty templates (design-spec.md, tech-spec.md) only if relevant to the project
    • Clearly state (in user's language) that no existing files will be deleted or overwritten
  3. Wait for user confirmation before executing anything

  4. Before executing any changes, create a snapshot of the current project state:

    • Compile the list of files you are about to create or modify (from the migration plan in step 2)
    • Run the snapshot command with those files:
      bash ~/.isparto/lib/snapshot.sh create migrate "$(pwd)" <file1> <file2> ...
      
      For example, if you plan to modify CLAUDE.md and .claude/settings.json, and create docs/plan.md:
      bash ~/.isparto/lib/snapshot.sh create migrate "$(pwd)" CLAUDE.md .claude/settings.json docs/plan.md
      
    • Report the snapshot ID to the user (in user's language), noting they can restore to the pre-migration state with /restore-isparto <id> at any time
    • If the snapshot script is not found at ~/.isparto/lib/snapshot.sh, warn the user (in user's language) that the snapshot script is missing and suggest running ~/.isparto/install.sh --upgrade to update iSparto. Then proceed without a snapshot — do not block on this.
  5. Execute the confirmed migration plan:

    • Create or merge project-level .claude/settings.json with iSparto required settings:
      {
        "env": {
          "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
        },
        "teammateMode": "tmux"
      }
      
      If .claude/settings.json already exists, merge these entries without removing existing settings. Also merge iSparto workflow hooks into the project-level .claude/settings.json (Edit/Write/Codex matchers only — Bash safety hook is at user level, managed by install.sh):
      {
        "hooks": {
          "PreToolUse": [
            { "matcher": "Edit", "hooks": [{ "type": "command", "command": "bash ~/.isparto/hooks/process-observer/scripts/pre-tool-check.sh" }] },
            { "matcher": "Write", "hooks": [{ "type": "command", "command": "bash ~/.isparto/hooks/process-observer/scripts/pre-tool-check.sh" }] },
            { "matcher": "mcp__codex-dev__codex", "hooks": [{ "type": "command", "command": "bash ~/.isparto/hooks/process-observer/scripts/pre-tool-check.sh" }] }
          ]
        }
      }
      
      If .claude/settings.json already has these hooks, skip. Do not duplicate entries.
    • Verify user-level Bash safety hook is registered in ~/.claude/settings.json:
      • Check if ~/.claude/settings.json contains a PreToolUse hook with Bash matcher
      • If missing: inform the user to run ~/.isparto/install.sh --upgrade to register the Bash safety hook
    • Append iSparto sections to CLAUDE.md (do not replace existing content)
    • Create missing docs from templates
    • Generate plan.md based on current project state
    • Initialize git if not already done

Read the full file on GitHub · 86 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. 3d ago First seen · 86 lines · 0 tokens per session scan B 70a3369391d8

Subscribe to this mod's changes

migrate-isparto is a command published in the GitHub repository BinaryHB0916/iSparto (59 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,413 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.