feat: add ccmanager-config skill installable via claude/codex - #329
Draft
kbwo wants to merge 1 commit into
Draft
Conversation
CCManager reports nothing when a config file is wrong: an unparseable
`.ccmanager.json` is discarded whole and unknown keys are ignored silently, so
a typo is indistinguishable from a feature that does not work. This adds an
agent skill that knows the schema and can check a file for those failures.
The repository doubles as a plugin marketplace, so the skill installs from it
with either CLI (Codex reads the `.claude-plugin/` manifests too):
claude plugin marketplace add kbwo/ccmanager
claude plugin install ccmanager-config@ccmanager
codex plugin marketplace add kbwo/ccmanager
codex plugin add ccmanager-config@ccmanager
The skill carries a per-key reference, goal-oriented recipes, a JSON Schema for
both config files, and a dependency-free validator that also catches what the
schema cannot express: a `defaultPresetId` matching no preset, a detection
strategy that does not match the command, an `args` entry with spaces in it, a
shortcut that can never fire, a config placed inside a linked worktree.
`validate-examples.test.ts` runs the validator over every example the skill
ships so documentation and validator cannot drift.
Also corrects three claims in the existing docs that the source contradicts:
the per-project example used a `command` key no config reader reads, the
auto-approval timeout is `autoApproval.timeout` (default 120s, not a fixed
60s), and `{branch-name}` is never substituted in a worktree directory pattern
because the placeholder regex matches word characters only.
Co-Authored-By: Claude Opus 5 (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.
Why
CCManager stays silent when its configuration is wrong. An unparseable
.ccmanager.jsonis discarded whole (ProjectConfigManager.loadProjectConfigswallows the parse error), and keys it does not know are never read — so a typo is indistinguishable from a feature that does not work. Getting a config right today means reading the TypeScript types.This adds an agent skill that carries the schema and can check a file for exactly those silent failures, so
.ccmanager.jsoncan be written or repaired by asking for it in plain language.What
plugins/ccmanager-config/is a plugin holding one skill: the procedure inSKILL.md, a per-key reference, goal-oriented recipes, a JSON Schema covering both config files, and a dependency-free validator. The plugin README describes the layout.Beyond schema shape, the validator reports the mistakes JSON cannot express: an unknown key (with a did-you-mean), a
defaultPresetIdmatching no preset, duplicate preset ids, anargsentry holding several tokens in one string, adetectionStrategycontradictingcommand, a shortcut that can never fire, a hook left disabled, anautoDirectoryPatternwithout{branch}, and a.ccmanager.jsonplaced inside a linked worktree — which CCManager resolves back to the main checkout, so the file is never read..claude-plugin/marketplace.jsonat the repository root turns this repo into a plugin marketplace. Codex accepts Claude's plugin manifests, so one set of files installs from either CLI; the commands are in the READMEs.Incidental doc fixes
Three claims in
docs/that the source contradicts, corrected because the skill would otherwise contradict the documentation:docs/project-config.mdshowed acommandkey. No config reader reads it;commandPresetsis the supported shape.docs/auto-approval.mdstated a fixed 60 s timeout. It isautoApproval.timeout, defaulting toDEFAULT_TIMEOUT_SECONDS(120).docs/worktree-auto-directory.mdlisted{branch-name}as a placeholder. The substitution regex matches word characters only, so a dashed placeholder is left in the path verbatim.Verification
bun run lint,bun run typecheck: pass.bun run test: passes, including the newvalidate-examples.test.ts, which runs the shipped validator over every configuration example in the skill so the docs and the validator cannot drift apart. Six pre-existing*.submodule.test.*suites fail locally because the sandbox blocksgit config --global; they are unrelated to this change and untouched by it.claude plugin installandcodex plugin addagainst throwaway config homes: the skill is discovered by both, with every file copied.🤖 Generated with Claude Code