Skip to content

feat: hs skill install — bundle the hearthstone-deck skill with the CLI#14

Merged
say8425 merged 12 commits into
mainfrom
feat/skill-install
May 29, 2026
Merged

feat: hs skill install — bundle the hearthstone-deck skill with the CLI#14
say8425 merged 12 commits into
mainfrom
feat/skill-install

Conversation

@say8425

@say8425 say8425 commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a channel-agnostic way to install the hearthstone-deck Claude Code skill alongside the hs CLI, plus publishes/advertises it cross-agent. Implements the D + C + B design (spec + plan committed under docs/superpowers/).

D — hs skill install subcommand

  • Installs the embedded skill into agent skills dirs: claude, cursor, codex, copilot, opencode (matches the npx skills directory convention). --global (default) or --project.
  • Skill files (SKILL.md + recipes) are embedded into the binary via Bun text imports — no network, no Node/npx needed (preserves the brew/binary "no runtime" benefit). Single source of truth stays at plugins/hs-cli/skills/hearthstone-deck/; a test asserts byte-equality between bundle and disk.
  • Interactive @clack/prompts multiselect (rendered to stderr so -f json stdout stays pipeable) or non-interactive --agent claude,cursor. Non-TTY without --agent → guard error + exit 1 (safe for agents that pipe the CLI).
  • Hybrid --use-npx: short-circuits to npx skills add say8425/hs-cli when npx is available.
  • Convergent project targets (cursor/codex/copilot/opencode all map to .agents/skills) are de-duplicated — one install + one outcome per physical dir.

C — skills.sh publishing

  • Verified npx skills add say8425/hs-cli discovers hearthstone-deck via the existing .claude-plugin/marketplace.json layout. Zero restructure needed.

B — advertise (no new files)

  • brew formula gains a caveats block (in release.yml formula render); install instructions added to all READMEs (en/ko/ja/zh/es + plugin README). No new README (would duplicate SKILL.md).

Architecture

Four focused pure services + a thin citty command:

  • agent-dirs.ts — agent→directory map + path resolver
  • skill-bundle.ts — embedded skill files
  • skill-installer.ts — pure fs writer (writeBundle, skillExists)
  • skill-select.ts — pure selection resolver (validation + non-TTY guard)
  • commands/skill.ts — clack/npx I/O glue; output via formatSkillOutcomes in formatter.ts

Test Plan

  • bun run check — lint (0 errors), fmt:check, tsc, 58 tests pass
  • e2e: non-TTY guard exits 1; embedded install into temp dirs (claude+cursor); idempotent --force; node-target build (dist/index.js) carries embedded skill files (EMBED OK)
  • convergent --agent claude,cursor,codex --project → 2 outcomes, not 3
  • npx skills add say8425/hs-cli --list discovers hearthstone-deck
  • CI: 5-platform compiled binaries run hs skill install (compiled-binary execution not runnable locally on macOS codesign; validated on node target + bundler embed)

🤖 Generated with Claude Code

@say8425 say8425 force-pushed the feat/skill-install branch 2 times, most recently from c2eef8e to b826800 Compare May 29, 2026 05:49
@say8425 say8425 force-pushed the feat/skill-install branch from b826800 to 6b78f41 Compare May 29, 2026 06:24
@say8425 say8425 force-pushed the feat/skill-install branch from ff3676f to 36cf360 Compare May 29, 2026 06:36
@say8425 say8425 merged commit a5b0f31 into main May 29, 2026
6 checks passed
@say8425 say8425 deleted the feat/skill-install branch May 29, 2026 06:42
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