Repository navigation
feat(skills): add /setup-skill to install bundled agent skills into Claude Code - #55
Merged
Merged
Conversation
…laude Code New /setup-skill command opens an interactive picker (like /config) that installs a bundled agent skill into ~/.claude/skills/ (global) or ./.claude/skills/ (project). Ships one curated skill, analyze-session-create-issue, which walks the agent through turning the current session into a well-formed GitHub issue. - src/tui/skills/catalog.ts: bundled skills as inlined TS constants (loose .md under src/ would never ship — build only emits dist/). - src/tui/skills/install.ts: skillsDir(scope) + installSkill() — writes each file under <skillsDir>/<name>/, non-destructive to other skills, idempotent (a no-op re-install reports no change). - src/tui/screens/skill.tsx: pick → scope → install screen, modeled on the setup wizard. - Wired through commands.ts (stub), app.tsx (Screen union + handler + render), and cli/index.ts (installSkill prop). Tests: skill-install.test.ts (catalog well-formedness + install FS behavior), a full picker→scope→install interaction test, and /setup-skill recognition in slash.test.ts. Full suite green (667). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
/setup-skillcommand that installs a bundled agent skill into Claude Code's skills directory via an interactive picker —~/.claude/skills/<name>/(global) or./.claude/skills/<name>/(project).Ships one curated skill to start:
analyze-session-create-issue— walks the agent through analyzing the current session, gathering repo + environment diagnostics, and opening a well-formed GitHub issue (the example from the feature request).How it works
/setup-skillopens a picker (handled in the App like/config): choose a skill → choose scope → install.src/tui/skills/catalog.ts. The build only emitsdist/andpackage.json.filesships onlydist/, so loose.mdassets undersrc/would never be published — same inline-constant patternchanges.tsuses.installSkill()writes each of a skill's files under<skillsDir>/<name>/. It's non-destructive to other skills already present and idempotent — a no-op re-install reports no change; a stale copy is overwritten (that's the intended "update to what shipped").Files
src/tui/skills/catalog.tsSkillEntry= name/title/description/files map)src/tui/skills/install.tsskillsDir(scope)+installSkill(scope, entry)→ApplyResult, mirrorssetup/apply.tssrc/tui/screens/skill.tsxSetupWizardcommands.ts,app.tsx,cli/index.tsScreenunion + handler + render,installSkillprop)Tests
tests/tui/skill-install.test.ts— catalog well-formedness (kebab id,SKILL.mdpresent, frontmattername:matches entry id) + install FS behavior (correct global/project path, idempotency, non-destructiveness, multi-file).tests/tui/app-interaction.test.tsx— full picker → scope → install → success-card flow driven through the real Ink<App>over stdin.tests/tui/slash.test.ts—/setup-skillrecognized + listed in/help/autocomplete.Full suite green: 667 tests, 75 files.
npm run buildclean.Verified the compiled installer writes
~/.claude/skills/analyze-session-create-issue/SKILL.mdwith valid discoverable frontmatter, correct path shape, and idempotent re-install.e2e scope
Local-FS + TUI feature with no proxy request/response surface — the http-e2e / cli-e2e matrices don't apply. Unit + real-
<App>interaction coverage is the gate here.Changeset: minor.