Open
Conversation
- cmd_hook_pre: accept both "Shell" (Cursor) and "Bash" (Claude Code)
tool names; detect runtime via `cursor_version` field and output
the appropriate response format (Cursor: `permission`/`updated_input`,
Claude Code: `hookSpecificOutput`)
- inject_cursor_hook(): new helper to inject hooks into Cursor's native
`~/.cursor/hooks.json` format (flat `{command, matcher}` entries)
- cmd_init --mode hook: now injects 3 Cursor hooks (preToolUse,
postToolUse, preCompact) alongside Claude Code and OpenCode hooks
Note: Cursor's `beforeSubmitPrompt` does not support `additional_context`
injection yet, so the prompt hook (Layer 2) is not installed for Cursor.
Made-with: Cursor
Contributor
📊 Automated PR Analysis
SummaryAdds native Cursor IDE hooks support to ICM. The pre-tool-use hook now accepts both 'Shell' (Cursor) and 'Bash' (Claude Code) tool names with runtime-appropriate response formats, and a new Review Checklist
Analyzed automatically by wshm · This is an automated analysis, not a human review. |
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.
Hi 👋
I wanted to try
icm, but it doesn't work with Cursor in hook mode.Here's a pull request to integrate Cursor into the hook mode installation.
I hope this helps.
cursor_versionfield and output the appropriate response format (Cursor:permission/updated_input, Claude Code:hookSpecificOutput)~/.cursor/hooks.jsonformat (flat{command, matcher}entries)Note: Cursor's
beforeSubmitPromptdoes not supportadditional_contextinjection yet, so the prompt hook (Layer 2) is not installed for Cursor.Made-with: Cursor