@light-merlin-dark/skill-sync 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +295 -0
- package/SKILL.md +78 -0
- package/dist/index.js +1713 -0
- package/package.json +66 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
- Add source-topology diagnostics for duplicate skill slugs in configured project roots
|
|
5
|
+
- Surface resolved duplicates as warnings and unresolved duplicates as blocking errors in `check` and `sources`
|
|
6
|
+
- Limit backups to `SKILL.md` snapshots plus manifest/state metadata
|
|
7
|
+
- Fix backup traversal loops when harness installs point through chained symlinks
|
|
8
|
+
|
|
9
|
+
## 0.1.0
|
|
10
|
+
- Initial release of `skill-sync`
|
|
11
|
+
- Source discovery for top-level and nested `SKILL.md`
|
|
12
|
+
- Harness discovery, drift checks, sync, backup, and restore
|
|
13
|
+
- Agent-friendly JSON output and dry-run support
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Merlin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
```
|
|
2
|
+
███████╗██╗ ██╗██╗██╗ ██╗ ███████╗██╗ ██╗███╗ ██╗ ██████╗
|
|
3
|
+
██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝╚██╗ ██╔╝████╗ ██║██╔════╝
|
|
4
|
+
███████╗█████╔╝ ██║██║ ██║ ███████╗ ╚████╔╝ ██╔██╗ ██║██║
|
|
5
|
+
╚════██║██╔═██╗ ██║██║ ██║ ╚════██║ ╚██╔╝ ██║╚██╗██║██║
|
|
6
|
+
███████║██║ ██╗██║███████╗███████╗ ███████║ ██║ ██║ ╚████║╚██████╗
|
|
7
|
+
╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═════╝
|
|
8
|
+
|
|
9
|
+
Sync local repo-backed agent skills across Codex, Claude Code, Cursor, Gemini, Hermes, and more.
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`skill-sync` keeps local `SKILL.md` sources installed into agent harnesses as symlinks, with drift checks, source-topology diagnostics, conflict detection, and restoreable backups.
|
|
13
|
+
|
|
14
|
+
## Why This Exists
|
|
15
|
+
|
|
16
|
+
`npx skills` is excellent for public and package-based skill workflows.
|
|
17
|
+
|
|
18
|
+
`skill-sync` solves a different problem:
|
|
19
|
+
|
|
20
|
+
- Your skills live in local source repos, not `node_modules`
|
|
21
|
+
- You want one source of truth per skill repo
|
|
22
|
+
- You use multiple harnesses with different skill roots
|
|
23
|
+
- You want safe sync, dry runs, machine-readable output, and backups before anything gets clobbered
|
|
24
|
+
|
|
25
|
+
## What It Does
|
|
26
|
+
|
|
27
|
+
- Scans one or more projects roots such as `~/_dev`
|
|
28
|
+
- Discovers:
|
|
29
|
+
- top-level `SKILL.md`
|
|
30
|
+
- nested `skills/*/SKILL.md`
|
|
31
|
+
- Detects installed harness skill roots
|
|
32
|
+
- Plans drift without changing anything
|
|
33
|
+
- Syncs symlinked installs into harnesses
|
|
34
|
+
- Warns when the same skill slug appears multiple times in your configured project roots
|
|
35
|
+
- Refuses to overwrite unmanaged conflicts silently
|
|
36
|
+
- Creates harness `skills` backups and restores them later
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
Install globally:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g @light-merlin-dark/skill-sync
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Initialize config:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
skill-sync config init
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Inspect detected harnesses:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
skill-sync harnesses
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Inspect discovered skill sources:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
skill-sync sources
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Check drift:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
skill-sync check
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Sync:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
skill-sync
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Shortcut:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
ss
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Default Model
|
|
83
|
+
|
|
84
|
+
By default `skill-sync` uses:
|
|
85
|
+
|
|
86
|
+
- config and state home: `~/.skill-sync`
|
|
87
|
+
- default projects root: `~/_dev`
|
|
88
|
+
- symlink-first installs
|
|
89
|
+
|
|
90
|
+
It complements `npx skills`; it does not replace it.
|
|
91
|
+
|
|
92
|
+
## Commands
|
|
93
|
+
|
|
94
|
+
Core:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
skill-sync check
|
|
98
|
+
skill-sync
|
|
99
|
+
skill-sync sync
|
|
100
|
+
skill-sync sources
|
|
101
|
+
skill-sync harnesses
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Backups:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
skill-sync backup create
|
|
108
|
+
skill-sync backup list
|
|
109
|
+
skill-sync backup restore <backup-id>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Config:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
skill-sync config init
|
|
116
|
+
skill-sync roots list
|
|
117
|
+
skill-sync roots add /path/to/projects
|
|
118
|
+
skill-sync roots remove /path/to/projects
|
|
119
|
+
skill-sync harness list
|
|
120
|
+
skill-sync harness add my-tool ~/.my-tool/skills
|
|
121
|
+
skill-sync harness remove my-tool
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Agent-friendly options:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
skill-sync check --json
|
|
128
|
+
skill-sync sync --dry-run --json
|
|
129
|
+
skill-sync backup restore <id> --dry-run
|
|
130
|
+
skill-sync check --projects-root /path/to/projects --harness codex
|
|
131
|
+
skill-sync check --home /tmp/fake-home
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Supported Harness Model
|
|
135
|
+
|
|
136
|
+
Built-in harness roots currently include:
|
|
137
|
+
|
|
138
|
+
| Harness | Global skills root |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| Codex | `~/.codex/skills` |
|
|
141
|
+
| Agents / Cline / Warp | `~/.agents/skills` |
|
|
142
|
+
| Claude Code | `~/.claude/skills` |
|
|
143
|
+
| Cursor | `~/.cursor/skills` |
|
|
144
|
+
| GitHub Copilot | `~/.copilot/skills` |
|
|
145
|
+
| Gemini CLI | `~/.gemini/skills` |
|
|
146
|
+
| Antigravity | `~/.gemini/antigravity/skills` |
|
|
147
|
+
| Droid / Factory | `~/.factory/skills` |
|
|
148
|
+
| Hermes | `~/.hermes/skills` |
|
|
149
|
+
| Plain skills root | `~/.skills` |
|
|
150
|
+
|
|
151
|
+
You can add more:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
skill-sync harness add codex-beta ~/.codex-beta/skills
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Safety Rules
|
|
158
|
+
|
|
159
|
+
- `check` never mutates
|
|
160
|
+
- `sync` only replaces entries the tool owns or missing entries
|
|
161
|
+
- unmanaged conflicts are reported, not overwritten
|
|
162
|
+
- duplicate `_dev` slugs are surfaced before harness-level sync planning
|
|
163
|
+
- backups snapshot harness `skills` directories before or after risky changes
|
|
164
|
+
- restore can recreate symlinks when the original source still exists
|
|
165
|
+
- restore falls back to minimal backed-up `SKILL.md` content when the source no longer exists
|
|
166
|
+
|
|
167
|
+
## Backup and Restore
|
|
168
|
+
|
|
169
|
+
Create a backup:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
skill-sync backup create
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
List backups:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
skill-sync backup list
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Restore one:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
skill-sync backup restore 2026-03-25T13-45-00-000Z
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Dry run a restore:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
skill-sync backup restore 2026-03-25T13-45-00-000Z --dry-run
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Backups live under:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
~/.skill-sync/backups/
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Each backup includes:
|
|
200
|
+
|
|
201
|
+
- a manifest of harness roots and entries
|
|
202
|
+
- original symlink targets when present
|
|
203
|
+
- backed-up `SKILL.md` snapshots for restore fallback
|
|
204
|
+
- a state snapshot for managed entries
|
|
205
|
+
|
|
206
|
+
## JSON Output
|
|
207
|
+
|
|
208
|
+
`skill-sync` is designed for agents first.
|
|
209
|
+
|
|
210
|
+
Example:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
skill-sync check --json
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Returns structured data for:
|
|
217
|
+
|
|
218
|
+
- discovered sources
|
|
219
|
+
- source warnings and source errors
|
|
220
|
+
- selected harness roots
|
|
221
|
+
- planned actions
|
|
222
|
+
- conflicts
|
|
223
|
+
- changes and ok counts
|
|
224
|
+
|
|
225
|
+
## How Source Discovery Works
|
|
226
|
+
|
|
227
|
+
For every immediate child repo under each configured projects root, `skill-sync` looks for:
|
|
228
|
+
|
|
229
|
+
- `<repo>/SKILL.md`
|
|
230
|
+
- `<repo>/skills/*/SKILL.md`
|
|
231
|
+
|
|
232
|
+
Canonical install names default to:
|
|
233
|
+
|
|
234
|
+
- `slugify(frontmatter name)` when `name:` exists
|
|
235
|
+
- otherwise a folder-derived fallback
|
|
236
|
+
|
|
237
|
+
You can override install names per source and per harness in `~/.skill-sync/config.json`.
|
|
238
|
+
|
|
239
|
+
You can also exclude or prefer project paths during discovery:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"discovery": {
|
|
244
|
+
"ignorePathPrefixes": [
|
|
245
|
+
"/Users/you/_dev/some-upstream-clone"
|
|
246
|
+
],
|
|
247
|
+
"preferPathPrefixes": [
|
|
248
|
+
"/Users/you/_dev/packages/stack"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Local Development
|
|
255
|
+
|
|
256
|
+
Install dependencies:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
bun install
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Run the CLI directly:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
bun run src/index.ts check
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Run tests:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
bun test tests/unit tests/integration
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Build:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
bun run build
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Positioning
|
|
281
|
+
|
|
282
|
+
Use `npx skills` when:
|
|
283
|
+
|
|
284
|
+
- you are installing public or package-provided skills
|
|
285
|
+
- your source of truth is a GitHub repo or package ecosystem workflow
|
|
286
|
+
|
|
287
|
+
Use `skill-sync` when:
|
|
288
|
+
|
|
289
|
+
- your source of truth is local repos on disk
|
|
290
|
+
- you want symlinked installs into multiple harnesses
|
|
291
|
+
- you need backup and restore around those installs
|
|
292
|
+
|
|
293
|
+
## License
|
|
294
|
+
|
|
295
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-sync
|
|
3
|
+
description: Sync local repo-backed agent skills across installed harnesses such as Codex, Claude Code, Cursor, Gemini, Hermes, and related tools. Use when a user wants one source of truth for local SKILL.md files, needs drift checks or backup/restore for harness skill roots, or wants to inspect which harnesses and skills are currently detected.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Sync
|
|
7
|
+
|
|
8
|
+
Use `skill-sync` as the default interface for local skill-harness maintenance.
|
|
9
|
+
|
|
10
|
+
## Core Workflow
|
|
11
|
+
1. Inspect harness detection and discovered skill sources.
|
|
12
|
+
2. Run a dry check before making changes.
|
|
13
|
+
3. Create a backup before risky cleanup or restore work.
|
|
14
|
+
4. Sync or restore.
|
|
15
|
+
5. Verify the resulting symlinks or restored content.
|
|
16
|
+
|
|
17
|
+
Start with:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
skill-sync harnesses
|
|
21
|
+
skill-sync sources
|
|
22
|
+
skill-sync check
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Apply changes:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
skill-sync
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or explicitly:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
skill-sync sync
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Backup Workflow
|
|
38
|
+
|
|
39
|
+
Create a backup:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
skill-sync backup create
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
List backups:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
skill-sync backup list
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Dry-run a restore:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
skill-sync backup restore <backup-id> --dry-run
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Restore:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
skill-sync backup restore <backup-id>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Agent-Friendly Usage
|
|
64
|
+
|
|
65
|
+
Use JSON when the output will be consumed by another tool or agent:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
skill-sync check --json
|
|
69
|
+
skill-sync sources --json
|
|
70
|
+
skill-sync harnesses --json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Safety Rules
|
|
74
|
+
|
|
75
|
+
- Prefer `check` before `sync`.
|
|
76
|
+
- Do not overwrite unmanaged conflicts by hand; inspect why they exist first.
|
|
77
|
+
- Use `--home` for isolated testing against a fake home directory.
|
|
78
|
+
- Use `--projects-root` when you need to constrain discovery to a specific source tree.
|