skillctl 是做什么的?
Operational playbook for managing Agent Skills with the skillctl CLI. Run real commands; do not simulate output or copy SKILL.md files between agent directories by hand.
Golden rules
- One canonical store — skills live in
~/.skillctl/skills/<name>/; agents get symlinks viasync. - Commit manifest + lock — track
agent-skills.jsonandagent-skills.lockin git for team reproducibility. - Portable specifiers only — use
file:./<path>,local:imported/<name>,github:,npm:, orskills.sh/; never commit absolute homedir paths. - Install before sync —
installmaterializes the store;synconly re-links agents. - Verify after changes — run
skillctl doctor(andskillctl auditin CI). - Prefer import over manual copy — use
import from-projectorimport from-npxinstead of duplicating skill folders.
Decision tree
| Situation | Command |
|---|---|
| New project, no manifest | skillctl init or skillctl init --with-skill |
| Add a remote or local skill | skillctl add <specifier> then skillctl install |
Skills already in .claude/skills, .codex/skills, etc. | skillctl import from-project |
Migrating from npx skills | skillctl import from-npx |
| Re-link only (lock unchanged) | skillctl sync |
| Re-fetch from upstream | skillctl update or skillctl update <name> |
| CI reproducible install | skillctl install --frozen then skillctl audit --strict |
| Non-portable paths in lock | skillctl install to rewrite; check skillctl doctor warnings |
Quick recipes
# Bootstrap
skillctl init --with-skill
skillctl add github:vercel-labs/agent-skills#web-design-guidelines
skillctl install
# Project-local skill
skillctl add file:./my-skill
skillctl install
skillctl sync
# Import existing agent dirs
skillctl import from-project --dry-run
skillctl import from-project
# Inspect
skillctl list
skillctl doctor
skillctl audit --json
Expected after add file:./my-skill + install: manifest specifier file:./my-skill, lock canonicalPath like ~/.skillctl/skills/my-skill.
Portability (0.3.1+)
- Portable:
file:./rel,local:imported/<name>, remote specifiers,canonicalPath: ~/.skillctl/skills/<name>. - Not portable: absolute
file:/Users/...,local:/abs/path, absolutecanonicalPathfrom another machine. - If
doctorwarns about non-portable paths, runskillctl installto rewrite lock from manifest.
Failure modes
| Symptom | Action |
|---|---|
canonical path missing | skillctl install |
| Integrity mismatch | skillctl update <name> or skillctl install |
| Symlink fails (Windows) | doctor notes; config defaultMode: copy |
| No agents linked | skillctl sync; enable agents in ~/.skillctl/config.json |
Frozen install failed | Store out of sync; run install without --frozen |
References
- commands.md — full command cheat sheet
- specifiers.md — specifier grammar
- manifest-lock.md — manifest and lock semantics
- workflows.md — team onboarding, migration, CI
- troubleshooting.md — doctor, Windows, coexistence