migrate

A command for bringing an older project into a studio workspace. It removes tracked workflow files from Git without rewriting history, then runs the usual setup.

In plain words
What is it for?
Use it to migrate a legacy project, stop workflow state from being tracked by Git, and apply the studio workspace setup.
Why use it?
It helps when an existing project has workflow files scattered through it or already committed to Git. The command keeps the files on disk and can be run again safely.

Command

Part of the studio plugin — 4 commands shipped together

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/koolamusic/claudefiles/migrate
Clone the repo
git clone --depth 1 https://github.com/koolamusic/claudefiles

Or install studio, the plugin that ships this one along with the rest of its 4 commands.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,956 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00020 $0.02956
Opus 5 $0.00010 $0.01478
Sonnet 5 $0.00004 $0.00591
Haiku 4.5 $0.00002 $0.00296

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

Security

Grade A, and why

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

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.

plugins/studio/commands/migrate.md · 125 lines

How it starts

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

/studio:migrate

For legacy projects that pre-exist with scattered workflow state AND may have that state committed to git. Untracks tracked state via git rm --cached -r (preserves history — does NOT rewrite it), then delegates to the same setup steps as /studio:setup. Safe to run more than once.

Preflight

This section is READ-ONLY. No filesystem or git index mutations occur here. Every branch decision that affects later sections is recorded as a named flag or set (SYMLINK_NAMES, PROJECT_ROOT, SLUG, TRACKED_STATE, SKIP_SYMLINK_CREATION).

  1. Locate config. Read ${CLAUDE_PLUGIN_ROOT}/templates/studio.yaml. Parse the following fields and use them by name throughout. Do not bake any of these values into the command logic:

    • symlinks (map of link_nametarget_name). The set of link_name keys is what subsequent steps refer to as SYMLINK_NAMES: the paths at project root to detect, untrack, and symlink.
    • gitignore.marker_start and gitignore.marker_end (consumed by the managed-block re-sync in "## Setup (shared)").

    Every literal that appears below as .jira, .project, .warden is illustrative; the command's decision source is the parsed YAML, not the inline examples. A future contributor adding a fifth managed directory in studio.yaml should not need to edit this command.

  2. Verify project context. Run git rev-parse --show-toplevel. If it fails (not inside a git repo), stop with: "Not a git repository — run git init first. Studio workspaces are keyed to a git repo's basename." On success, record the stdout as PROJECT_ROOT and use it for every subsequent path.

  3. Derive slug. Same algorithm as /studio:setup:

    • If the command was invoked with --slug <name>, use that literal.
    • Else SLUG=$(basename "$PROJECT_ROOT").
    • If ~/.studio/$SLUG/ already exists AND contains a .setup-owner marker that names a DIFFERENT project, offer a collision suffix ($SLUG-2, then $SLUG-3, ...) via AskUserQuestion. Do not auto-overwrite.

Read the full file on GitHub · 125 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 · 125 lines · 20 tokens per session scan A 4171b99b64fa

Subscribe to this mod's changes

migrate is a command published in the GitHub repository koolamusic/claudefiles (132 stars, last pushed 4d ago), licensed MIT. It adds 20 tokens to every session and 2,956 once invoked, about $0.0001 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-30.