claude-code-migration

claude-code-migration is a skill for Claude Code from rushengzhou/sid-code. It costs 100 tokens per session (4,106 once invoked), scanned A, original, MIT.

A guided tool for copying Claude Code settings and project configuration into sid-code. It checks what can be moved, asks before writing, and records what was transferred.

In plain words
What is it for?
Use it to migrate Claude Code settings, MCP servers, commands, skills, agents, hooks, memory, output styles, and permissions to sid-code.
Why use it?
It helps avoid losing settings or overwriting existing sid-code files when changing coding tools. It also keeps secrets, login data, and unsupported files out of the migration.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Good fit Use it to migrate Claude Code settings, MCP servers, commands, skills, agents, hooks, memory, output styles, and permissions to sid-code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rushengzhou/sid-code/claude-code-migration
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.

Any agent
npx skills add rushengzhou/sid-code --skill claude-code-migration
Clone the repo
git clone --depth 1 https://github.com/rushengzhou/sid-code

Made for: Claude Code.

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 claude-code-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/rushengzhou/sid-code/claude-code-migration/github.svg)](https://agentmods.dev/skills/rushengzhou/sid-code/claude-code-migration)
Your own site
<a href="https://agentmods.dev/skills/rushengzhou/sid-code/claude-code-migration"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/claude-code-migration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-code-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/rushengzhou/sid-code/claude-code-migration"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/claude-code-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00100 $0.04106
Opus 5.5 $0.00040 $0.01642
Sonnet 5.5 $0.00020 $0.00821
Haiku 4.5 $0.00010 $0.00411

Measured 1mo ago against content hash 2819ea7e12de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-code-migration 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/apply-migration.mjs, scripts/inspect-migration.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

packages/core/src/skill/builtin/claude-code-migration/SKILL.md · 147 lines

How it starts

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

Claude Code 到 sid-code 迁移

只用于 Claude Code -> sid-code。首要目标是保护用户现有环境:只 copy,不 move;不删除源文件;不静默覆盖目标文件。

不可违反的规则

  • 先做只读检查。 展示迁移计划前,不写文件、不运行安装命令。
  • 默认使用用户启动 sid-code 的当前目录作为项目上下文。如果 ~/.claude.json 里有多个项目条目匹配,先让用户选择。
  • 所有写入前都要用户确认。 高风险资源单独确认:permissions、hooks、MCP secrets/env/headers、env 字段,以及所有冲突。
  • 迁移计划和确认问题必须按 scope 拆开说明:用户级、项目共享级、项目本地级分别迁移哪些、跳过哪些、写到哪里。
  • 不迁移 auth state、OAuth/session 文件、managed/policy settings、trust caches 或未知 state/cache 文件。
  • 只写入 references/mapping.md 列出的目标文件;不要创建未列出的 sid-code 配置文件。
  • 允许写入迁移状态文件 ~/.sid-code/state/cc-migration-state.json(inspector 的默认 --state 路径)。它是本 skill 的记账文件,不是 sid-code 运行时配置;只记录已迁移项的标识(scope、目标路径或 目标#mcpServers.name、时间戳、项目路径),绝不写入 secret / env / headers 值。绝不触碰 ~/.sid-code/state/migrations.json——那是 sid-code 内核 schema 迁移的版本水位线文件。
  • 未知、不支持、无效和空字段默认只报告;除非 references/mapping.md 明确写了迁移方式。
  • 无论是否实际写入,最后都要生成迁移报告。

写入 settings.json 的硬性约束

绝不整体覆盖写 sid-code 的 settings.json。 只做「新增缺失的顶层字段/嵌套键」的 patch 式合并:读入现有 JSON → 只添加计划里确认的字段 → 写回。原因:sid-code 的 settings 经 Zod round-trip 整体重写会 strip 掉嵌套字段(如 availableModels[].apiKey)并把 ${ENV} 占位符展开成明文落盘。若目标字段已存在,走冲突流程,不覆盖。

JSON 合并的硬性约束(settings.json / .mcp.json)

绝不即兴写临时脚本(如 /tmp/*.mjs、/tmp/*.js)来做 JSON 合并。 这类做法反复出问题:临时脚本用错模块系统(.mjs 里写 require 直接崩)、或改走 write 工具把整段 JSON 当字符串塞进去被参数校验拒绝。JSON 的 patch 合并、type→transport 转换等确定性变换一律交给 skill 自带的确定性脚本,你只负责调用它、传参、读它的 JSON 结果:

# settings.json patch 合并(只新增缺失键,冲突默认跳过并报告,不覆盖已有键与嵌套 apiKey)
node <skill-dir>/scripts/apply-migration.mjs --op merge-settings --target <settings.json> --patch '<json>'
# MCP 合并(自动做 type→transport、disabled→enabled、丢弃不支持字段;已存在的 server 名算冲突跳过)
node <skill-dir>/scripts/apply-migration.mjs --op merge-mcp --target <.mcp.json 或 settings.json> --servers '<json>'
  • patch/servers 过长时改用 --patch-file <path> / --servers-file <path> 从文件读,避免超长命令行。
  • 想先看结果不落盘:加 --dry-run,脚本会把合并后的完整对象放在返回 JSON 的 result 字段里。
  • 需要覆盖已有键时(仅在用户明确选择"覆盖"冲突处理方式后):加 --on-conflict overwrite。
  • 脚本返回 JSON:{ ok, written, added:[], conflicts:[], transforms:[] }。据 conflicts 走冲突确认流程,据 transforms 向用户交代做了哪些转换。
  • 与 inspector 一样,脚本用 node 或 bun 都能跑(见下方运行时探测)。

Read the full file on GitHub · 147 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 147 lines · 100 tokens per session scan A 2819ea7e12de

Subscribe to this mod's changes

claude-code-migration is a skill published in the GitHub repository rushengzhou/sid-code (2 stars, last pushed 1mo ago), licensed MIT. It adds 100 tokens to every session and 4,106 once invoked, about $0.0004 per session on Opus 5.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-31.

Related

Other skills, from other repositories

sls-dashboard-builder

A tool for creating and modifying importable JSON dashboards for Alibaba Cloud SLS, a service for searching and monitoring logs. It maps checked queries and analysis needs to dashboard charts.

alibaba/loongsuite-pilot · 72 tokens

loongsuite-pilot-insight

A reporting workflow for turning LoongSuite Pilot and AI coding-agent logs into structured reports about events, teams, data quality, development efficiency, and AI use. It defines the meaning of the log fields and the measurements used in dashboards.

alibaba/loongsuite-pilot · 91 tokens

loongsuite-pilot-ops

Skill "loongsuite-pilot-ops" from alibaba/loongsuite-pilot, covering loongsuite-pilot-ops, quick start, todo: add quick start commands and usage.

alibaba/loongsuite-pilot · 15 tokens

design-skill

Use BEFORE building or restyling anything a user will see — web/mobile UIs, landing pages, dashboards, components, emails, AND creative work like Three.js/WebGL/canvas/SVG scenes, data-viz, games, and animations — to make it look intentional and polished, not generic; covers tokens, type, color, layout, motion…

Overbrilliant/ob-1 · 82 tokens

loongsuite-pilot-ops

An installer and operations guide for LoongSuite Pilot, a tool that collects and reports AI coding activity for development teams.

alibaba/loongsuite-pilot · 169 tokens

write-terva-skill

Author a new terva skill, a reusable SKILL.md instruction set that terva loads on demand. Install it where terva discovers it, in the project .terva/skills/ or the global $TERVAHOME/skills/. Use for create/add/write-a-skill requests, not extensions.

terva-sh/terva · 71 tokens