SK-312: Remove settings.json hook injection, move hook to plugin#16
Merged
Conversation
…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
vamsidhar-ramanathi
approved these changes
May 15, 2026
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.
What
Removes the CLI's direct modification of
~/.claude/settings.jsonfor hook installation. TheUserPromptSubmitversion-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
src/core/hooks.ts— the settings.json merge/write logicsrc/commands/setup.ts— setup no longer callsinstallHook()hookSupportedfromStackinterface andclaude.tstest/core/hooks.test.tsand hook tests fromsetup.test.tsWhat stays
sk ext status [stack]command — the plugin hook will call this vianpx @scalekit-inc/cli extension status claude --hook--hookflag — silent when up to date, one-line message when outdated, always exit 0checkVersion(), cache, GitHub API with symlink resolution)Companion PR
Auth stack repo: adds
UserPromptSubmithook toplugins/agentkit/hooks/hooks.jsonpointing to the CLI.Tests