Add chunk skills command with embedded chunk-review skill#9
Merged
michael-webster merged 2 commits intomainfrom Feb 27, 2026
Merged
Add chunk skills command with embedded chunk-review skill#9michael-webster merged 2 commits intomainfrom
michael-webster merged 2 commits intomainfrom
Conversation
added 2 commits
February 26, 2026 18:11
Add the chunk-review SKILL.md to skills/ (embedded into the binary at build time) and .claude/skills/ (installed to the agent config directory when running chunk skills install).
Introduce src/core/skills.ts and src/commands/skills.ts to implement install/status/list subcommands that manage skills in agent config directories (~/.claude/skills/, ~/.codex/skills/). Skill content is read from skills/ and embedded into the binary via Bun's text loader (--loader .md:text added to all build targets). Register commands in src/index.ts under the Commander.js program. Add 15 unit tests covering idempotency, outdated-skill updates, and per-agent skipping. Fix .gitignore to anchor chunk-* at root so the skills/ directory is not accidentally ignored.
d38d6b9 to
a9c09d4
Compare
danmux
reviewed
Feb 27, 2026
| // Skill content is imported at build time. Bun's text loader inlines the file | ||
| // content as a string literal in the compiled binary (requires --loader .md:text | ||
| // in build commands). | ||
| import chunkReviewContent from "../../skills/chunk-review/SKILL.md"; |
Contributor
There was a problem hiding this comment.
could we just embed them from the .clude/skills directory? Or do we think the ones in there may diverge from the ones we embed
Contributor
Author
There was a problem hiding this comment.
we certainly could, i started doing that. i was a little concerned about embedding all of the skills in our binary. not that's it's secret, more i expect we end up with additional customizations. let me look around at other projects and how they handle it, bun might let us be selective on what actually get's included.
danmux
reviewed
Feb 27, 2026
| skills: SkillStatus[]; | ||
| } | ||
|
|
||
| const home = process.env.HOME ?? process.env.USERPROFILE ?? "~"; |
Contributor
There was a problem hiding this comment.
os.homedir() would be safer here — the ~ fallback isn't a valid absolute path and would create a literal ~ directory in cwd.
— Claude Code (dm)
This comment was marked as off-topic.
This comment was marked as off-topic.
danmux
approved these changes
Feb 27, 2026
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
chunk skillscommand withinstall,status, andlistsubcommandschunk-reviewskill in the binary using Bun's text loader (--loader .md:text)~/.claude/skills/and~/.codex/skills/for any agent whose config directory already existsskills/at the repo root as the canonical source for embedded skill files (.claude/skills/is kept for in-repo Claude Code usage).gitignoreanchor sochunk-*only ignores root-level binariesReproduction steps
Install skills and verify the file structure:
List bundled skills:
Test plan
bun test src/**/*.unit.test.ts— 23 tests pass (15 new coveringlistSkills,installSkills,getSkillsStatus)bun run typecheck— no errorsbun run lint— no warnings