feat: add playbook-library end-user CLI#9
Merged
Conversation
Introduces a separate CLI entry point for library consumers (distinct from the maintainer CLI). Libraries wire it up via a generated shim so coding agents can discover and load skills on demand. - `playbook list` — recursively traverses deps/peerDeps with bin.playbook, prints each package's skills with name, description, and full path - `playbook install` — agent-driven prompt that maps skills to project tasks, writing a <!-- playbook-skills:start/end --> block into CLAUDE.md - `playbook setup --shim` — generates bin/playbook.js shim in the library package and prints instructions to wire up the bin entry - 9 tests covering skill discovery, recursive traversal, cycle detection, peerDeps, missing skills dir, and error cases Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
commit: |
autofix.yml runs `pnpm generate-docs` but the script was never wired up, causing CI to fail with ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
autofix.ci bans modifications to .github, but pnpm run format was reformatting workflow YAMLs and staging those changes for commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The validate-skills workflow triggered (via autofix.ci reformatting the script) but this repo has no root-level skills/ dir — it's the toolkit, not a library. Exiting 0 with a message is the right behavior when there's nothing to validate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
playbook-librarybin to@tanstack/playbooks— a lean end-user CLI separate from the existing maintainer CLI@tanstack/router) wire it up by runningplaybook setup --shim, which generates abin/playbook.jsshim they commit and expose as their ownplaybookbin entryplaybook list, the CLI walks up from the shim's path to detect the home package, then recursively traversesdependencies+peerDependencieslooking for other packages withbin.playbook, collecting and printing skills from eachplaybook installprints an agent-driven prompt (likescaffold) that maps skills to project tasks and writes a<!-- playbook-skills:start/end -->block into CLAUDE.mdNew files
src/library-scanner.ts— recursive dep traversal + skill discovery, testable via optionalprojectRootparamsrc/playbook-library.ts—listandinstallcommandstests/library-scanner.test.ts— 9 tests covering skill data, recursive traversal, peerDeps, cycle detection, sub-skills, and error casesChanges
src/setup.ts— new--shimflag (on by default) generatesbin/playbook.jsshim with instructionspackage.json—playbook-librarybin entry,./playbook-librarysubpath export, updated build scriptTest plan
pnpm buildcompletes cleanlypnpm test:lib— all 127 tests passnode dist/playbook-library.mjs listprints home package + skillsnode dist/playbook-library.mjs installprints agent prompt and copies to clipboardplaybook setup --shimgeneratesbin/playbook.jswith correct content🤖 Generated with Claude Code