|
| 1 | +**English** | [简体中文](../zh/sync-skills.md) |
| 2 | + |
| 3 | +# ar sync-skills |
| 4 | + |
| 5 | +Sync platform Skills to local AI tool skill directories (Claude Code or Codex). |
| 6 | + |
| 7 | +``` |
| 8 | +ar sync-skills [tool] [scope] [options] |
| 9 | +``` |
| 10 | + |
| 11 | +## Options |
| 12 | + |
| 13 | +| Flag | Type | Required | Default | Description | |
| 14 | +|------|------|----------|---------|-------------| |
| 15 | +| `--claude-code` | flag | yes* | | Sync to Claude Code skill directory. | |
| 16 | +| `--codex` | flag | yes* | | Sync to Codex skill directory. | |
| 17 | +| `--user` | flag | yes** | | Sync to user-level directory. | |
| 18 | +| `--project` | flag | yes** | | Sync to project-level directory. | |
| 19 | +| `--workspace` | multi | no | all | Workspace filter, repeatable. | |
| 20 | +| `--delete-unmanaged` | flag | no | false | Delete local skills outside selected workspace scope (with confirmation). | |
| 21 | +| `-y`, `--yes` | flag | no | false | Skip confirmation prompts. | |
| 22 | + |
| 23 | +\* Exactly one of `--claude-code` or `--codex` is required. |
| 24 | +\** Exactly one of `--user` or `--project` is required. |
| 25 | + |
| 26 | +## Behavior |
| 27 | + |
| 28 | +- By default, all platform skills are selected (unless `--workspace` is provided). |
| 29 | +- Before downloading/updating skills, the CLI asks for confirmation. |
| 30 | +- Sync checks local metadata and only downloads skills that are missing or outdated. |
| 31 | +- When `--delete-unmanaged` is enabled, local skill directories not in the selected |
| 32 | + managed scope can be removed after confirmation. |
| 33 | + |
| 34 | +## Examples |
| 35 | + |
| 36 | +```bash |
| 37 | +# Sync skills from workspace abc + def into user-level Claude Code skills |
| 38 | +ar sync-skills --claude-code --user --workspace abc --workspace def |
| 39 | + |
| 40 | +# Sync skills from workspace abc into project-level Codex skills |
| 41 | +ar sync-skills --codex --project --workspace abc |
| 42 | + |
| 43 | +# Sync all skills and also remove unmanaged local skills |
| 44 | +ar sync-skills --claude-code --project --delete-unmanaged |
| 45 | +``` |
0 commit comments