migrate-nanoclaw
Extracts user customizations from a fork, generates a replayable migration guide, and upgrades to upstream by reapplying customizations on a clean base. Replaces merge-based upgrades with intent-based migration.
Install / Use
npx skills add nanocoai/nanoclaw --skill migrate-nanoclawInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of migrate-nanoclaw
migrate-nanoclaw scores 90/100 on our quality scale, 496th of 2,860 Development & Engineering skills we index (top 18%).
Its SKILL.md is 23 KB long, well organised into 47 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.
With 30,846 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 3 days ago, so migrate-nanoclaw is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
migrate-nanoclaw compared with similar skills
All 4 of these similar skills score higher than migrate-nanoclaw; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| migrate-nanoclaw (this skill)by nanocoai | 90 | 30.8k | 3d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 85.7k | 12d ago | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 1d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install migrate-nanoclaw?
- Run
npx skills add nanocoai/nanoclaw --skill migrate-nanoclaw. The install tabs above show the steps for each supported agent. - Which AI agents does migrate-nanoclaw work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is migrate-nanoclaw safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is migrate-nanoclaw still maintained?
- The repository was last updated 3 days ago, so migrate-nanoclaw is actively maintained.
Skill content
View source on GitHubname: migrate-nanoclaw description: Extracts user customizations from a fork, generates a replayable migration guide, and upgrades to upstream by reapplying customizations on a clean base. Replaces merge-based upgrades with intent-based migration.
Context
NanoClaw users fork the repo and customize it — changing config values, editing source files, modifying personas, adding skills. When upstream ships updates or refactors, git merge produces painful conflicts because the same core files were changed on both sides.
This skill extracts the user's customizations into a migration guide — capturing both the intent (what they want) and the implementation details (how they did it, with code snippets, API calls, and specific configurations). On upgrade, it checks out clean upstream in a worktree, then reapplies customizations using the guide. No merge conflicts because there's nothing to merge.
The migration guide is markdown, not structured data. It needs to capture the full range of what a user might customize, with enough implementation detail that a fresh Claude session can reapply it without having seen the original code. Standard changes (config values, simple logic) can be described briefly. Non-standard changes (specific APIs, custom integrations, unusual patterns) need code snippets and precise instructions.
Two phases: Extract (build the migration guide) and Upgrade (use it). If a guide already exists, offer to skip to Upgrade.
Principles
- Never proceed with a dirty working tree.
- Always create a rollback point (backup branch + tag) before touching anything.
- The migration guide is the source of truth, not diffs.
- Use a worktree to validate before affecting the live install.
- Data directories (
groups/,store/,data/,.env) are never touched — only code. - Be helpful: offer to do things (stash, commit, stop services) rather than telling the user to do them.
- Use sub-agents for exploration. Spawn haiku sub-agents to explore the codebase, trace skill merges, diff files, and identify customizations. This keeps the main context focused on the user conversation and decision-making.
- Always use absolute paths in worktrees. The Bash tool resets the working directory between calls. Never use relative
cd .upgrade-worktree— always use the full absolute path:cd /absolute/path/.upgrade-worktree && <command>. Store the worktree absolute path in a variable at creation time and reference it throughout. - Balance exploration and asking. Don't bombard the user with questions when you can figure things out from the code. Don't burn endless tokens exploring when the user could clarify in one sentence. Use sub-agents to explore first, then ask the user targeted questions about things that are ambiguous or where intent isn't clear from the code alone.
- Scale effort to complexity. Not every migration needs the full process. Assess the scope early and take the lightest path that fits.
Phase 0: Refresh this skill first
The migration process itself evolves, so run its newest version before doing anything else:
- Ensure the
upstreamremote exists (defaulthttps://github.com/nanocoai/nanoclaw.git) and fetch:git fetch upstream --prune. Detect the upstream branch (mainormaster). - Refresh this skill from upstream:
git checkout upstream/<branch> -- .claude/skills/migrate-nanoclaw/ - Re-read
.claude/skills/migrate-nanoclaw/SKILL.md. If it changed, follow the updated version from the top instead of this one.
This is the only working-tree change expected before the preflight check below; changes limited to .claude/skills/migrate-nanoclaw/ are this self-refresh — ignore them in the 1.0 clean-tree check and proceed.
Phase 1: Extract
1.0 Preflight
Run git status --porcelain. If non-empty, offer to stash or commit for them (AskUserQuestion: "Stash changes" / "Commit changes" / "I'll handle it"). If they want to commit, stage and commit with a descriptive message. If they want to stash, run git stash push -m "pre-migration stash".
Check remotes with git remote -v. If upstream is missing, ask for the URL (default: https://github.com/nanocoai/nanoclaw.git), add it, then git fetch upstream --prune.
Detect upstream branch: check git branch -r | grep upstream/ for main or master. Store as UPSTREAM_BRANCH.
1.1 Assess scope and determine path
Quickly assess the scale of divergence, check for an existing guide, and determine the right approach — all before asking the user anything.
BASE=$(git merge-base HEAD upstream/$UPSTREAM_BRANCH)
# Divergence stats
git rev-list --count $BASE..upstream/$UPSTREAM_BRANCH # upstream commits
git rev-list --count $BASE..HEAD # user commits
git diff --name-only $BASE..HEAD | wc -l # user changed files
git diff --stat $BASE..HEAD | tail -1 # insertions/deletions
git diff --name-only $BASE..upstream/$UPSTREAM_BRANCH | wc -l # upstream changed files
Check for existing guide: .nanoclaw-migrations/guide.md or .nanoclaw-migrations/index.md.
Determine the tier based on the total diff from base:
Tier 1: Lightweight — suggest /update-nanoclaw instead
Conditions (any of):
- Very few upstream changes (< ~5 commits) AND few user changes (< ~3 changed files)
- User recently updated/migrated (merge-base is close to upstream HEAD)
Tell the user the scope is small and suggest /update-nanoclaw might be simpler. Let them choose.
Tier 2: Standard
Conditions:
- Moderate total diff (3-15 changed files, no large number of new files)
- Manageable scope that fits in a single guide file
Tier 3: Complex
Conditions (any of):
- Many new files added (indicates many skills applied) — discount files that a skill's own apply owns when assessing complexity; a fork with 3 skills and no other changes is simpler than it looks by file count alone
- Deep source changes to core files (
src/index.ts,src/container-runner.ts, etc.) beyond what skills introduced - Lots of insertions/deletions in user-authored code (not skill-owned code)
- Many skills applied (3+) AND the user confirms or sub-agents find customizations on top of them
Use the full process: multiple sub-agents in parallel, directory-based guide, migration plan.
Now combine the scope assessment with initial user input in one interaction. Present the scope summary (how many commits, files, which tier) and ask (AskUserQuestion):
For Tier 1:
- Use /update-nanoclaw — simpler merge-based approach
- Proceed with full migration — continue
For Tier 2/3 (with or without existing guide):
- If guide exists and is current: Skip to upgrade / Update guide (add new changes) / Re-extract from scratch
- If guide exists but is stale: Update guide (recommended) / Re-extract from scratch / Skip to upgrade anyway
- If no guide: Yes, let me describe my customizations first / Just figure it out / A bit of both
Present the scope summary, gather the user's input, and resolve the existing-guide choice in this single interaction.
1.2 Update existing guide (if applicable)
If the user chose to update an existing guide rather than re-extract:
- Read the existing guide
- Find commits made since the guide was generated (compare guide's recorded base hash against current HEAD)
- Spawn a haiku sub-agent to analyze only the new changes:
Diff HEAD against
<guide-recorded-hash>. For each changed file, summarize what changed and why. - Present the new changes to the user for confirmation
- Append new customizations to the existing guide, update the header hashes
- Skip to Phase 2
1.3 Explore the codebase
Spawn a haiku sub-agent (Agent tool, model: haiku) for initial exploration:
Explore this NanoClaw fork to identify all changes from the upstream base. Run these commands and report back:
git diff --name-only $BASE..HEAD— all changed filesgit log --oneline $BASE..HEAD— all commitsls .claude/skills/— installed skills, then for eachadd-*skill read itsSKILL.mdto learn which files it fetches/writes (e.g.src/channels/<name>.ts,import './<name>.js';in a barrel, pinned deps)Report: (a) list of installed
add-*skills and the files each one owns, (b) list of all changed files, (c) any custom skill directories under.claude/skills/not matching an upstreamadd-*skill.
From the sub-agent results, identify:
- Which files an
add-<name>skill owns — these are reapplied by re-running that skill's own apply in Phase 2 - Everything else — all remaining changes are customizations to analyze (whether they're on skill-owned files or not)
Don't try to distinguish "user modified a skill-owned file" from "user made their own change" at this stage. The sub-agents in 1.4 will look at all non-skill changes together and surface what matters.
1.4 Analyze customizations
For each applied skill, ask the user in a single batched question (AskUserQuestion, multiSelect):
"I found these applied skills. Select any you customized further after applying:"
Options: one per skill, plus "None — all used as-is".
Then spawn sub-agents to analyze all non-skill changes. For Tier 2, one or two agents. For Tier 3, run in parallel by area:
- Config + build files — one sub-agent
- Source files (
src/*.ts) — one sub-agent - Skills the user flagged as modified (or all of them for Tier 3) — one sub-agent per skill, comparing the user's current skill-owned files against the pristine version the skill fetches. For a file the skill writes from
origin/<branch>, diff the working copy against that source:diff <(git show origin/<branch>:<path>) <path> - Container files — one sub-agent (if changes exist)
Each sub-agent task:
Read these diffs and the current file contents. For each change:
git diff $BASE..HEAD -- <file>(ordiff <(git show origin/<branch>:<file>) <file>for skill-owned files)- Read the full current file for context
- Summarize: what changed, what the likely intent is
- Assess detail level: could a fresh Claude session reproduce this from intent alone, or does it need specific code snippets, API details, import paths?
- For non-standard changes, extract the key code, imports, API calls, and configurations verbatim.
Inter-skill conflicts: If multiple skills are applied, spawn an additional sub-agent to check for interactions between them. Look for:
- Duplicate declarations (same variable/constant defined by two skills)
- Conflicting approaches (one skill throws on missing env var, another provides a fallback)
- Shared files modified by multiple skills
Document any findings in the "Skill Interactions" section of the migration guide so they can be resolved after the skills are reapplied during upgrade.
1.5 Confirm with user
After sub-agents report back, compile the findings and present to the user.
For customizations where the intent is clear (config values, simple modifications): present as a batch for confirmation. Use AskUserQuestion with multiSelect to let the user flag any entries that need correction.
For customizations where the intent is ambiguous: ask specific questions. Don't ask "what did you do?" — instead ask "I see you added X in this file. Was this for Y or something else?"
The user can select "Other" on any question to provide their own description.
1.6 Migration plan (Tier 3 only)
For complex migrations, before writing the guide, create a migration plan:
- Order of operations: which customizations depend on others, which skills must be applied first
- Staging: whether the migration should happen in stages (e.g. apply skills first, validate, then apply source customizations)
- Risk areas: customizations that touch files heavily changed by upstream — these may need manual review
- Interactions: customizations that interact with each other (e.g. a so
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.7kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ai-job-search
44.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
