Skip to content

SK-312: Remove settings.json hook injection, move hook to plugin#16

Merged
saif-at-scalekit merged 2 commits into
mainfrom
sk-312-plugin-version-hook
May 15, 2026
Merged

SK-312: Remove settings.json hook injection, move hook to plugin#16
saif-at-scalekit merged 2 commits into
mainfrom
sk-312-plugin-version-hook

Conversation

@saif-at-scalekit
Copy link
Copy Markdown
Contributor

What

Removes the CLI's direct modification of ~/.claude/settings.json for hook installation. The UserPromptSubmit version-check hook will instead ship with the plugin in the auth stack repo.

Why

The CLI shouldn't write to another tool's config file. The hook is a plugin concern — it checks if the plugin is outdated — so it belongs with the plugin. Claude Code's plugin hook system (hooks/hooks.json) is the correct mechanism.

Changes

  • Removed src/core/hooks.ts — the settings.json merge/write logic
  • Removed hook wiring from src/commands/setup.ts — setup no longer calls installHook()
  • Removed hookSupported from Stack interface and claude.ts
  • Removed test/core/hooks.test.ts and hook tests from setup.test.ts
  • Bumped version to 0.3.5

What stays

  • sk ext status [stack] command — the plugin hook will call this via npx @scalekit-inc/cli extension status claude --hook
  • --hook flag — silent when up to date, one-line message when outdated, always exit 0
  • Version check logic (checkVersion(), cache, GitHub API with symlink resolution)

Companion PR

Auth stack repo: adds UserPromptSubmit hook to plugins/agentkit/hooks/hooks.json pointing to the CLI.

Tests

  • 123 tests passing
  • Lint clean
  • Build clean

…for plugin hooks

The CLI no longer writes to ~/.claude/settings.json. The UserPromptSubmit
hook will ship with the plugin in the auth stack repo instead, calling
`npx @scalekit-inc/cli extension status claude --hook`.

- Remove src/core/hooks.ts and its tests
- Remove hook wiring from setup.ts
- Remove hookSupported from Stack interface
- Bump version to 0.3.5
@saif-at-scalekit saif-at-scalekit merged commit a4b86af into main May 15, 2026
1 check passed
@saif-at-scalekit saif-at-scalekit deleted the sk-312-plugin-version-hook branch May 15, 2026 11:58
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.

2 participants