Skip to content

feat: add ccmanager-config skill installable via claude/codex - #329

Draft
kbwo wants to merge 1 commit into
mainfrom
feature/ccmanager-config-skill
Draft

feat: add ccmanager-config skill installable via claude/codex#329
kbwo wants to merge 1 commit into
mainfrom
feature/ccmanager-config-skill

Conversation

@kbwo

@kbwo kbwo commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Why

CCManager stays silent when its configuration is wrong. An unparseable .ccmanager.json is discarded whole (ProjectConfigManager.loadProjectConfig swallows 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.json can be written or repaired by asking for it in plain language.

What

plugins/ccmanager-config/ is a plugin holding one skill: the procedure in SKILL.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 defaultPresetId matching no preset, duplicate preset ids, an args entry holding several tokens in one string, a detectionStrategy contradicting command, a shortcut that can never fire, a hook left disabled, an autoDirectoryPattern without {branch}, and a .ccmanager.json placed inside a linked worktree — which CCManager resolves back to the main checkout, so the file is never read.

.claude-plugin/marketplace.json at 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.md showed a command key. No config reader reads it; commandPresets is the supported shape.
  • docs/auto-approval.md stated a fixed 60 s timeout. It is autoApproval.timeout, defaulting to DEFAULT_TIMEOUT_SECONDS (120).
  • docs/worktree-auto-directory.md listed {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 new validate-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 blocks git config --global; they are unrelated to this change and untouched by it.
  • Installed the plugin end-to-end with both claude plugin install and codex plugin add against throwaway config homes: the skill is discovered by both, with every file copied.

🤖 Generated with Claude Code

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>
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