Library workflows
Library commands change the canonical Git repository. Use --dry-run where available, and keep the library remote protected like any other source repository.
Connect an existing repository
Section titled “Connect an existing repository”skill-sync init git@github.com:you/ai-skills.gitUse --branch <branch> when the library lives on a non-default branch. The remote may use HTTPS or SSH, but credentials cannot be embedded in its URL. When the remote is empty, initialization requires confirmation before creating the library metadata and skill root.
Create a GitHub repository
Section titled “Create a GitHub repository”skill-sync init \ --create you/ai-skills \ --visibility private \ --transport ssh \ --branch mainRepository creation requires an authenticated gh installation. --visibility accepts private, public, or internal; --transport accepts https or ssh. Those two options apply only with --create.
Add a new skill
Section titled “Add a new skill”Validate and preview a local skill before adding it:
skill-sync validate ./review-uiskill-sync add ./review-ui --group frontend --dry-runskill-sync add ./review-ui --group frontendThe source directory must be outside the canonical checkout and contain a valid SKILL.md. add creates a new ID only. If frontend/review-ui already exists, edit a tracked project copy and use publish.
Publish edits to existing skills
Section titled “Publish edits to existing skills”skill-sync statusskill-sync diff frontend/review-uiskill-sync publish frontend/review-ui --from codex --dry-runskill-sync publish frontend/review-ui --from codexYou may pass several IDs or --all. When multiple installed targets for the same skill differ, --from codex or --from claude identifies the intended source. Publishing validates the complete library result and stops on unsafe remote races.
Organize groups
Section titled “Organize groups”skill-sync group listskill-sync group create frontendskill-sync group rename frontend user-interfaceskill-sync group remove frontendgroup create writes an explicit marker so an empty group persists. Rename moves the full subtree and reports every affected qualified skill ID. A nonempty group cannot be removed unless both --recursive and confirmation are provided:
skill-sync group remove legacy --recursive --dry-runskill-sync group remove legacy --recursive--yes can answer the confirmation but does not replace --recursive.
Remove a canonical skill
Section titled “Remove a canonical skill”skill-sync library remove frontend/review-ui --dry-runskill-sync library remove frontend/review-uiRemoval requires confirmation. Existing project copies remain on disk and become orphaned so that canonical deletion does not silently delete local files. Use normal Git history if the library content must be restored.
Inspect before and after
Section titled “Inspect before and after”Use these read-only commands around library changes:
skill-sync list --group frontendskill-sync info frontend/review-uiskill-sync validate frontend/review-uiskill-sync doctorFor exact arguments and options, see the library command reference.