Migrate logo

Migrate

Community
dsifry
migrate

Migrate from npm-installed metaswarm to the marketplace plugin — removes redundant files with safety checks

Overview

Publisherdsifry
Repositorymetaswarm
Skill namemigrate
Stars
421
Forks
54
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dsifry on GitHub. Read the source before you install it.

Installation

Install the Migrate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dsifry/metaswarm/tree/main/skills/migrate
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dsifry/metaswarm.git /tmp/metaswarm
mkdir -p .claude/skills
cp -r /tmp/metaswarm/skills/migrate .claude/skills/migrate
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Migrate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Migrate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Migrate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Migration Skill

Migrate a project from npm-installed metaswarm (npx metaswarm init) to the marketplace plugin. Removes redundant embedded files with a safety protocol that prevents data loss.

When to use: The SessionStart hook detects .claude/plugins/metaswarm/.claude-plugin/plugin.json (legacy embedded plugin) and recommends running this skill.


IMPORTANT: Safety & Messaging Guidelines

The user MUST understand this before any file list is shown:

Before presenting any migration preview or file list, ALWAYS lead with this framing:

What this migration does: The marketplace plugin now provides all the skills, commands, rubrics, and guides that were previously copied into your project directory. This migration simply removes those redundant copies — the originals now live in the plugin itself.

Nothing is lost: Your project-specific files (CLAUDE.md, .coverage-thresholds.json, .beads/, bin/, scripts/) are NEVER touched. Only duplicate metaswarm framework files are removed.

Fully reversible: All removals are staged with git rm (not permanently deleted). Before you commit:

  • Undo everything: git restore --staged . && git checkout -- .
  • After committing: git revert HEAD

No commit is made automatically — you review and commit when you're satisfied.

Tone: Be reassuring, not alarming. Say "cleaning up XX redundant copies" not "deleting XX files". Say "these files now live in the plugin" not "these files will be removed". Frame the migration as housekeeping, not destruction.

When showing file counts: If there are many files (e.g., 40+), explain that the large count is because the old npm installer copied the entire plugin framework into .claude/plugins/metaswarm/ — that one directory accounts for most of the count, and it's all framework code that's now served directly by the plugin.


Step 1: Pre-flight Check

  1. Confirm this skill is running from the marketplace plugin (if this skill loaded, the plugin is active)
  2. Read .metaswarm/project-profile.json -- if "distribution": "plugin" is already set, inform the user migration was already completed and exit
  3. Verify .claude/plugins/metaswarm/.claude-plugin/plugin.json exists -- if not, there is nothing to migrate; inform the user and exit

If the plugin is not loaded, the user needs to install it first: /plugin marketplace add dsifry/metaswarm-marketplace


Step 2: Inventory Legacy Files

Scan for files installed by npx metaswarm init that are now provided by the marketplace plugin.

Candidates for removal:

CategoryPath pattern
Embedded plugin.claude/plugins/metaswarm/ (entire directory)
Rubrics.claude/rubrics/*.md
Guides.claude/guides/*.md
Old commands.claude/commands/metaswarm-setup.md, .claude/commands/metaswarm-update-version.md

NEVER removed (project-local files): CLAUDE.md, .coverage-thresholds.json, .metaswarm/project-profile.json, .beads/, bin/, scripts/, .github/workflows/, .claude/commands/ shims.


Step 3: Content Verification

For each removal candidate, verify it is an unmodified metaswarm file using SHA-256 hash comparison.

Hash protocol:

  1. Read file content
  2. Normalize line endings to LF (\r\n -> \n, \r -> \n)
  3. Strip trailing whitespace from each line
  4. Strip trailing newlines
  5. Compute SHA-256 of normalized content
  6. Compare against hash of the corresponding file from the marketplace plugin's own directories (rubrics/, guides/, etc.)

Computing hashes from the plugin's live files ensures the hash list stays current -- no hardcoded hashes that drift.

Classification:

ResultAction
Hash matchesUnmodified -- add to deletion list
Hash differsUser-modified -- flag for user decision, never auto-delete
Not in hash listUnknown file -- skip entirely

Step 4: Dry Run Preview

Display the complete migration plan before any changes. Lead with the safety framing from the guidelines above, then show the preview:

## Migration Preview

These are redundant copies of framework files that are now provided by the plugin.
All removals are staged (not committed) — you can undo everything before committing.

### Redundant framework files to clean up (XX files)
These are unmodified copies that the plugin now provides directly:
- .claude/plugins/metaswarm/ (embedded plugin copy — XX files, now served by marketplace plugin)
- .claude/rubrics/<each matching file> (now in plugin's rubrics/)
- .claude/guides/<each matching file> (now in plugin's guides/)
- .claude/commands/metaswarm-setup.md (replaced by plugin command)
- .claude/commands/metaswarm-update-version.md (replaced by plugin command)

### Files you've customized (require your decision)
- .claude/rubrics/code-review-rubric.md (MODIFIED — your changes are preserved until you decide)

### Your project files (NEVER touched)
- CLAUDE.md, .coverage-thresholds.json, .metaswarm/, .beads/, bin/, scripts/

### What gets added
- 6 command shims in .claude/commands/ (thin wrappers that route to plugin commands)
- .metaswarm/project-profile.json updated with "distribution": "plugin"

### How to undo (before committing)
git restore --staged . && git checkout -- .

Step 5: User Confirmation

Use AskUserQuestion:

  • Remind the user: "This stages the cleanup — nothing is committed yet. You can undo with git restore --staged . && git checkout -- ."
  • Ask: "Ready to clean up the redundant framework files?" (not "Ready to delete files?")
  • For each user-modified file, ask individually: keep, remove, or show diff
  • If the user chooses "diff", display the difference between their version and the plugin's, then re-ask

Step 6: Git Safety

Before executing removals:

  1. Run git status to check for uncommitted changes
  2. If uncommitted changes exist, warn: "Recommended to commit or stash before migrating so changes are in their own commit. Continue anyway?"
  3. If the user declines, exit

Step 7: Cleanup

Announce what you're doing: Before running any commands, say:

"Staging the redundant files for removal. These are all framework copies — your project files are untouched. Nothing is committed yet."

Git-tracked files -- use git rm (staged, reversible via git checkout):

bash
git rm -rf .claude/plugins/metaswarm/
git rm .claude/rubrics/<each confirmed file>
git rm .claude/guides/<each confirmed file>
git rm .claude/commands/metaswarm-setup.md
git rm .claude/commands/metaswarm-update-version.md

After running: Reassure: "Done — XX files staged for removal. These are only staged, not committed. Run git status to see the staged changes, or git restore --staged . && git checkout -- . to undo."

Untracked files -- use rm -f (unlikely but handle gracefully).

Empty directories -- remove .claude/rubrics/ and .claude/guides/ if empty after cleanup. Do NOT remove .claude/commands/ (shims remain).


Step 8: Command Shim Creation

Write 6 shims to .claude/commands/ (same as setup skill):

ShimRoutes to
start-task.md/metaswarm:start-task
prime.md/metaswarm:prime
review-design.md/metaswarm:review-design
self-reflect.md/metaswarm:self-reflect
pr-shepherd.md/metaswarm:pr-shepherd
brainstorm.md/metaswarm:brainstorm

Each shim:

markdown
<!-- Created by metaswarm setup. Routes to the metaswarm plugin. Safe to delete if you uninstall metaswarm. -->
Invoke the `/metaswarm:<command-name>` skill with any arguments the user provided.

If a shim already exists with different content, ask before overwriting.


Step 9: Profile Update

Merge these fields into .metaswarm/project-profile.json (preserve existing fields):

json
{
  "distribution": "plugin",
  "migrated_at": "<ISO 8601 timestamp>",
  "migrated_from": "npm"
}

Step 10: Post-Migration Summary

Display what was done and next steps:

## Migration Complete

Cleaned up XX redundant framework files that are now provided by the marketplace plugin.
Your project files (CLAUDE.md, .coverage-thresholds.json, .beads/, etc.) were not touched.

### What changed
- Removed XX redundant framework copies (now served by plugin)
- Added 6 command shims to .claude/commands/
- Updated project profile to "distribution": "plugin"

### Next steps
1. Review staged changes: `git diff --cached --stat`
2. Commit when satisfied: `git commit -m "chore: migrate metaswarm from npm to marketplace plugin"`
3. Verify everything works: try `/start-task`

### If anything seems wrong
- Undo before committing: `git restore --staged . && git checkout -- .`
- Undo after committing: `git revert HEAD`
- Full re-install: `npx metaswarm install` (npm package still available)

Rollback (Nothing Is Permanent)

All removals use git rm, which only stages changes — files are NOT deleted from git history. The migration never auto-commits, so the user always has a chance to review and undo:

  • Before committing (full undo): git restore --staged . && git checkout -- .
  • After committing (full undo): git revert HEAD
  • Single file recovery: git checkout HEAD~1 -- <path>
  • Full re-install of old approach: npx metaswarm install (npm package still published)

Error Handling

ErrorAction
.metaswarm/project-profile.json missingCreate with minimal fields, proceed
git rm fails on a fileLog error, skip file, continue
Permission deniedWarn user, skip file, continue
Plugin not loadedExit with install instructions
metaswarm_version < 0.8.0Warn manual intervention may be needed

Anti-Patterns

Anti-PatternDo Instead
Auto-deleting modified filesFlag and ask explicitly
Deleting before confirming plugin worksPre-flight check first
Using rm -rf on tracked filesUse git rm (reversible)
Skipping dry run previewAlways show full preview
Removing project-local filesNever touch CLAUDE.md, .beads/, bin/, scripts/
Saying "deleting XX files" or "removing XX files"Say "cleaning up XX redundant copies"
Showing file list without safety contextAlways lead with the safety framing
Jumping straight to git rm commandsExplain what you're doing and why it's safe first

Frequently asked questions

What does the Migrate AI skill do?

Migrate from npm-installed metaswarm to the marketplace plugin — removes redundant files with safety checks

Why use Migrate on TypingMind?

Because you install it once and use it with any model. Migrate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Migrate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dsifry/metaswarm/tree/main/skills/migrate. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Migrate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Migrate?

As many as you like. As long as a model supports skills, you can use Migrate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Migrate AI skill free?

Yes. It is published on GitHub by dsifry under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇