Conversation
The existing hooks.json uses the Claude Code hooks format. This adds hooks-cursor.json with the Cursor hooks format and points plugin.json to it so session-start hooks work correctly in Cursor.
📝 WalkthroughWalkthroughThe pull request updates the Cursor plugin configuration to reference a new hooks manifest file and introduces that manifest file. The new hooks-cursor.json defines a session start hook pointing to session-start.sh, establishing the hook trigger mechanism for the Cursor environment. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@hooks/hooks-cursor.json`:
- Line 6: The "command" value "./hooks/session-start.sh" refers to a
non-existent file; update the hook entry (the "command" field in
hooks-cursor.json) to point to the actual executable "hooks/session-start"
(remove the .sh extension) so the session-start hook will run correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 021c0894-252b-488f-a143-19ff81024d1d
📒 Files selected for processing (2)
.cursor-plugin/plugin.jsonhooks/hooks-cursor.json
|
Thanks for identifying this! The core idea is right — Cursor needs its own hooks file with camelCase event names ( We've merged an improved version to dev that addresses several issues in this PR: Bugs fixed:
What we merged:
Closing in favor of our dev implementation. Thank you for the contribution! |
Add hooks/hooks-cursor.json with Cursor's camelCase format (sessionStart,
version: 1) and update .cursor-plugin/plugin.json to reference it. Uses
${CURSOR_PLUGIN_ROOT} and run-hook.cmd for cross-platform support.
Fix session-start platform detection: check CURSOR_PLUGIN_ROOT first
(Cursor may also set CLAUDE_PLUGIN_ROOT), ensuring correct output format
for each platform.
Based on PR #709 with fixes for: wrong filename (.sh extension), missing
Windows support, fragile relative paths, and incorrect platform detection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add hooks/hooks-cursor.json with Cursor's camelCase format (sessionStart,
version: 1) and update .cursor-plugin/plugin.json to reference it. Uses
${CURSOR_PLUGIN_ROOT} and run-hook.cmd for cross-platform support.
Fix session-start platform detection: check CURSOR_PLUGIN_ROOT first
(Cursor may also set CLAUDE_PLUGIN_ROOT), ensuring correct output format
for each platform.
Based on PR obra#709 with fixes for: wrong filename (.sh extension), missing
Windows support, fragile relative paths, and incorrect platform detection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Problem
The superpowers plugin's
sessionStarthook doesn't fire in Cursor. The currenthooks.jsonuses the Claude Code hooks format (SessionStart,matcher, nestedhooksarray), which Cursor doesn't recognize. Cursor expects a different schema —sessionStart(camelCase) with a flatcommandfield.Changes
hooks/hooks-cursor.jsonusing Cursor's hooks formatplugin.jsonto reference the new Cursor-compatible hooks filehooks.jsonis unchanged for Claude Code compatibility