Skip to content

feat: add skill installation via hook install#14

Merged
jung-thomas merged 1 commit intomainfrom
feature/skill-install
Apr 22, 2026
Merged

feat: add skill installation via hook install#14
jung-thomas merged 1 commit intomainfrom
feature/skill-install

Conversation

@jung-thomas
Copy link
Copy Markdown
Contributor

Summary

  • Adds skills.yaml as a new content type in packs, parallel to hook.yaml and mcp.yaml
  • sap-devs hook install tutorial copies the /tutorial skill to ~/.claude/skills/tutorial/SKILL.md
  • sap-devs hook install (no args) installs all hooks AND all skills for the active profile
  • hook list, hook status, and hook uninstall extended to handle skills alongside hooks
  • Ships the tutorial instructor skill as the first distributable skill in the base pack

New files

  • internal/content/skill.goFlattenSkills(), FindSkillDef() helpers
  • internal/adapter/skill_wire.goWriteSkillFile(), RemoveSkillFile(), SkillFileInstalled()
  • content/packs/base/skills.yaml — tutorial skill definition
  • content/packs/base/skills/tutorial/SKILL.md — tutorial skill content
  • content/schemas/skills.schema.json — JSON Schema for validation

Modified files

  • internal/content/pack.goSkillDef struct, Skills field, loading in LoadPack()
  • internal/content/merge.gomergeSkills() for additive layer support
  • internal/adapter/adapter.goSkillConfig struct and field on Adapter
  • content/adapters/claude-code.yamlskill_config: path: "~/.claude/skills"
  • cmd/hook.go — install/uninstall/list/status extended for skills
  • internal/schema/schema.go — registered skills.yaml schema
  • internal/i18n/catalogs/en.json — 6 skill i18n strings

Test plan

  • go build ./... && go vet ./... passes clean
  • sap-devs hook list --all shows tutorial skill in a separate skills table
  • sap-devs hook install tutorial --dry-run prints expected write path
  • sap-devs hook install tutorial creates ~/.claude/skills/tutorial/SKILL.md
  • sap-devs hook status shows tutorial skill as installed
  • sap-devs hook uninstall tutorial removes the skill file
  • sap-devs hook install (no args) installs hooks AND the tutorial skill
  • /tutorial in Claude Code triggers the skill correctly

Skills (e.g. the /tutorial skill) can now be distributed through content
packs and installed to AI tools via `sap-devs hook install <id>`.
The install-all flow (`hook install` with no args) installs both hooks
and skills for the active profile. List and status commands show skills
alongside hooks.

New content type: skills.yaml per pack, referencing markdown skill files.
Adapter config gains skill_config with a target path (e.g. ~/.claude/skills).
@jung-thomas jung-thomas merged commit 1488b47 into main Apr 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant