ctx v0.6.0: Convert shell hooks to Go plugin#14
Merged
josealekhine merged 3 commits intomainfrom Feb 16, 2026
Merged
Conversation
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>
Deploying ctx with
|
| 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 |
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>
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.
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 bymake plugin. ctx init becomes tool-agnostic — no longer scaffolds .claude/hooks/ or .claude/skills/.ctx hook claude-codenow 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 plugintargetRemoved: 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