skillctx-sync
Update embedded skillctx-resolve.py scripts across all migrated skills.
When to Use
- After updating the skillctx repo (bug fix in resolve.py, new features)
- User says "skillctx-sync", "update skillctx", or "sync skillctx"
Prerequisites
- Python 3.10+
- Skills must be installed and discoverable by the agent host
Workflow
Read current version: Run
python <skill-dir>/scripts/sync.pywith--helpto verify the script is available. Readpyproject.tomlin the skillctx repo root for the current version string.Scan for migrated skills: Run
python <skill-dir>/scripts/sync.py scan <skills-dir> <current-version>where<skills-dir>is the directory containing installed skills. The script outputs JSON:[ { "skill": "my-skill", "path": "/path/to/my-skill", "version": "0.1.0", "status": "outdated" }, { "skill": "other-skill", "path": "/path/to/other-skill", "version": "0.2.0", "status": "current" } ]Only skills with
<!-- skillctx:begin -->in their SKILL.md are included.Present outdated skills to user: Filter the scan results to
"status": "outdated"and show:Skills with outdated skillctx resolver: - my-skill (v0.1.0 → v0.2.0) - another-skill (v0.1.0 → v0.2.0) Update all? (yes/select/cancel)Wait for user confirmation.
Update each selected skill: For each skill the user approves, run:
python <skill-dir>/scripts/sync.py update <skill-dir> <resolver-src> <current-version>Where
<resolver-src>isskills/skillctx-ify/scripts/resolve.py(the canonical resolver in this repo). The script:- Copies the resolver to
<skill-dir>/scripts/skillctx-resolve.py - Replaces the
<!-- skillctx:begin -->...<!-- skillctx:end -->block with the latest setup template - Updates
metadata.skillctx.versionin the skill's frontmatter
- Copies the resolver to
Report what was updated and any errors.
Error Handling
| Error | Action |
|---|---|
| No migrated skills found | Report "no skills using skillctx found" |
| All skills already current | Report "all skills up to date" |
| Skill directory not writable | Warn and skip, list at the end |
Missing <!-- skillctx:end --> marker |
Warn — setup block may be malformed. Skip and list for manual review. |