Skip to content

ctx v0.6.0: Convert shell hooks to Go plugin#14

Merged
josealekhine merged 3 commits intomainfrom
feat/plugin-conversion
Feb 16, 2026
Merged

ctx v0.6.0: Convert shell hooks to Go plugin#14
josealekhine merged 3 commits intomainfrom
feat/plugin-conversion

Conversation

@josealekhine
Copy link
Member

Replace 6 shell hook scripts (.claude/hooks/*.sh) with native Go subcommands under ctx system *. Ship hooks and skills as a Claude Code plugin (plugin/ctx-plugin/) built by make plugin. ctx init becomes tool-agnostic — no longer scaffolds .claude/hooks/ or .claude/skills/. ctx hook claude-code now redirects to plugin install instructions.

New: internal/cli/system/ package (6 subcommands + tests)
New: internal/tpl/claude/plugin/ (plugin.json, hooks.json)
New: .claude-plugin/marketplace.json
New: make plugin target
Removed: internal/claude/{hook,matcher,script}.go
Removed: internal/tpl/claude/hooks/*.sh (6 shell scripts)
Removed: createClaudeHooks, createClaudeSkills from init
Updated: 20+ docs pages to reflect plugin model
Bumped: VERSION 0.4.0 → 0.6.0

Replace 6 shell hook scripts (.claude/hooks/*.sh) with native Go
subcommands under `ctx system *`. Ship hooks and skills as a Claude
Code plugin (plugin/ctx-plugin/) built by `make plugin`. ctx init
becomes tool-agnostic — no longer scaffolds .claude/hooks/ or
.claude/skills/. `ctx hook claude-code` now redirects to plugin
install instructions.

New: internal/cli/system/ package (6 subcommands + tests)
New: internal/tpl/claude/plugin/ (plugin.json, hooks.json)
New: .claude-plugin/marketplace.json
New: `make plugin` target
Removed: internal/claude/{hook,matcher,script}.go
Removed: internal/tpl/claude/hooks/*.sh (6 shell scripts)
Removed: createClaudeHooks, createClaudeSkills from init
Updated: 20+ docs pages to reflect plugin model
Bumped: VERSION 0.4.0 → 0.6.0

Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
@josealekhine josealekhine self-assigned this Feb 16, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 16, 2026

Deploying ctx with  Cloudflare Pages  Cloudflare Pages

Latest commit: 71e6ff7
Status: ✅  Deploy successful!
Preview URL: https://cea08b2a.ctx-bhl.pages.dev
Branch Preview URL: https://feat-plugin-conversion.ctx-bhl.pages.dev

View logs

The plugin directory (skills, hooks, manifest) now lives at
internal/tpl/claude/ in the correct layout, removing the copy step.
marketplace.json points there directly. Docs updated accordingly.

Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
Plugin hooks (check-context-size, check-persistence, check-journal,
post-commit) now silently exit when .context/ lacks essential files,
preventing creation of partial state before initialization. ctx init
treats a directory with only logs as uninitialized.

Also fixes CodeQL int64→int truncation in persistence state parser.

Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
@josealekhine josealekhine merged commit 076723b into main Feb 16, 2026
9 checks passed
@josealekhine josealekhine deleted the feat/plugin-conversion branch February 16, 2026 19:31
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