Use when installing, updating, or explaining how skills, always-on rules, and memory templates sync into Codex, Claude, Cursor, OpenCode, Gemini, Hermes, or Copilot. Trigger for "同步 skill", "同步规则", "个人原则", "装到 Cursor", "更新 huashu", "更新女娲", "skill-sync", or a request to refresh upstream/huashu-design or upstream/nuwa-skill. Do not use to author a skill, edit application code, or commit.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Skill Sync?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tobemagic-skill-sync)
---
name: skill-sync
description: Use when installing, updating, or explaining how skills, always-on rules, and memory templates sync into Codex, Claude, Cursor, OpenCode, Gemini, Hermes, or Copilot. Trigger for "同步 skill", "同步规则", "个人原则", "装到 Cursor", "更新 huashu", "更新女娲", "skill-sync", or a request to refresh upstream/huashu-design or upstream/nuwa-skill. Do not use to author a skill, edit application code, or commit.
category: operate
subcategory: skill-sync
tags:
- skills
- sync
- agents
compatibility:
tools: [bash]
requires: This repository checkout, Node 18+, and permission to write the selected AI skill directory
---
# Skill Sync
Install the skills listed in `sync-manifest.yaml`, the always-on rules in `rules/owned`, and a missing memory template. The script is the installer. Read this file to decide the host, scope, and whether a write is allowed, then run the script.
Inside this repository, read third-party skills from their submodules. Do not copy `upstream/huashu-design` or `upstream/nuwa-skill` into `skills/owned`.
## When To Run
Run this skill when the user asks to install or refresh skills for an AI host, to explain where a host loads skills, or to pull the latest huashu-design or nuwa-skill.
Do not run it for ordinary coding, for editing one skill's instructions, or as a step before an unrelated commit.
## Workflow
1. Choose scope and targets.
- `global` writes under the user home. `project` writes under the project directory given with `--project` (default: current directory).
- Name only the hosts the user asked for. When they do not name a host, plan all seven: `codex`, `claude`, `opencode`, `gemini`, `hermes`, `cursor`, `copilot`.
2. Refresh upstream only when the user wants the latest huashu-design or nuwa-skill, or a plan reports `missing-source` for those paths.
```bash
node skills/owned/skill-sync/scripts/sync.mjs update-upstream
```
3. Preview. This command does not write.
```bash
node skills/owned/skill-sync/scripts/sync.mjs plan --target cursor --scope global
```
4. Read every operation. `create` and `overwrite` change managed copies. `skip` with reason `unmanaged` means a directory already exists and this tool did not create it; leave it alone. `remove` deletes only a directory this tool previously marked. `missing-source` means the manifest path is absent; run `update-upstream` for the two submodules, or fix the path, then plan again.
5. Apply only after the user has confirmed the preview.
```bash
node skills/owned/skill-sync/scripts/sync.mjs apply --target cursor --scope global --yes
```
`apply` without `--yes` prints the same preview and writes nothing. `plan` never writes, even if `--yes` is present.
## Safety
- Exit `0` when the preview or the write succeeds. Exit `1` when a write or submodule update fails. Exit `2` when the command line or manifest is invalid.
- The script writes only inside the host roots in `references/hosts.md`.
- A skill directory that has no `.skill-sync.json` marker is unmanaged. Do not delete it and do not overwrite it.
- Rules are personal principles, not skills. File hosts receive one managed file per rule. Gemini `GEMINI.md` and Copilot `copilot-instructions.md` receive one marked block. A file without that marker is left untouched.
- Global scope seeds `~/.skillbird/memory/memory.md` only when that file is missing. Project scope does the same for `.planning/memory/memory.md`. An existing memory file is never overwritten or removed.
- Copies drop `.git`, `node_modules`, caches, and `references/_external_repos`.
- A later apply updates and prunes only directories carrying this tool's marker.
- Do not point the script at a host directory by inventing a path. Use `--home` only to redirect a whole home, such as a test home.
## Upstream Skills
| Need | Read |
|---|---|
| HTML prototypes, slides, motion, visual design | `upstream/huashu-design/SKILL.md` |
| Distill how a person thinks | `upstream/nuwa-skill/SKILL.md` (installed as `nuwa-skill`; the file names itself `huashu-nuwa`) |
After `update-upstream`, plan again before applying. Quote the script's destination paths in the reply. Do not claim a host was updated unless the command exited `0` and `wrote=true`.
Host paths, project versus global layout, and the Gemini extension shape are in `references/hosts.md`.