Skip to content

Add Cursor plugin compatibility and install docs#467

Merged
arittr merged 1 commit intoobra:mainfrom
ericzakariasson:cursor-plugin-support
Feb 17, 2026
Merged

Add Cursor plugin compatibility and install docs#467
arittr merged 1 commit intoobra:mainfrom
ericzakariasson:cursor-plugin-support

Conversation

@ericzakariasson
Copy link
Contributor

@ericzakariasson ericzakariasson commented Feb 13, 2026

Summary

  • add a root .cursor-plugin/plugin.json manifest so Superpowers is discoverable as a Cursor plugin without changing existing Claude packaging
  • update hooks/session-start.sh to emit both Cursor (additional_context) and Claude (hookSpecificOutput.additionalContext) response shapes for cross-platform hook compatibility
  • add Cursor installation instructions to README.md with Claude-first wording in shared guidance

Test plan

  • Run bash hooks/session-start.sh and assert output JSON contains both additional_context and hookSpecificOutput.additionalContext
  • Parse .cursor-plugin/plugin.json with python3 JSON load to verify manifest validity
  • Install via Cursor marketplace command and verify skill auto-invocation in a fresh session

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Added support for plugin marketplace installation via Cursor.
  • Documentation

    • Updated installation instructions for Claude Code, Cursor, Codex, and OpenCode environments.
    • Added Cursor-specific plugin marketplace section with setup guidance.
    • Enhanced verification steps for triggering plugin functionality.

Enable native Cursor plugin discovery with a .cursor-plugin manifest, and make the SessionStart hook emit both Cursor and Claude response shapes so context injection works across both platforms. Document Cursor install usage in the README while keeping Claude-first wording.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

The pull request adds plugin configuration for Cursor integration, updates documentation with IDE-specific installation instructions, and refactors the session startup hook to externalize context variables for better maintainability.

Changes

Cohort / File(s) Summary
Plugin Configuration
.cursor-plugin/plugin.json
New plugin manifest defining metadata, version (4.3.0), author info, repository references, and resource paths for the superpowers plugin.
Documentation
README.md
Updates installation guidance to distinguish between automated marketplace installation (Claude Code, Cursor) and manual setup (Codex, OpenCode); adds Cursor-specific plugin marketplace and admin command instructions.
Hook Scripts
hooks/session-start.sh
Extracts introductory content and warnings into a session_context variable; adds top-level additional_context field alongside existing hookSpecificOutput structure for Cursor compatibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A plugin manifest now takes flight,
Docs guide the way, both left and right,
Context variables dance with grace,
Superpowers find their resting place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Cursor plugin compatibility and install docs' directly matches the PR's main objectives: adding a Cursor plugin manifest and updating installation documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericzakariasson ericzakariasson marked this pull request as ready for review February 17, 2026 18:10
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
hooks/session-start.sh (1)

18-18: ⚠️ Potential issue | 🟡 Minor

2>&1 causes cat's stderr to leak into the content on failure.

If cat fails (e.g., file missing), 2>&1 redirects the error message to stdout, which gets captured in the variable. Then || fires and the echo output is also captured. The result is both messages concatenated. Drop the 2>&1 so only the fallback echo is captured on failure:

Proposed fix
-using_superpowers_content=$(cat "${PLUGIN_ROOT}/skills/using-superpowers/SKILL.md" 2>&1 || echo "Error reading using-superpowers skill")
+using_superpowers_content=$(cat "${PLUGIN_ROOT}/skills/using-superpowers/SKILL.md" 2>/dev/null || echo "Error reading using-superpowers skill")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@hooks/session-start.sh` at line 18, The variable using_superpowers_content is
capturing both cat's stdout and stderr because of the "2>&1" redirection,
causing error messages to be concatenated with the fallback; remove the "2>&1"
from the cat invocation so only cat's stdout is captured and the || echo
fallback runs alone (i.e., call cat
"${PLUGIN_ROOT}/skills/using-superpowers/SKILL.md" without 2>&1 so
using_superpowers_content only gets the file contents or the fallback message).
🧹 Nitpick comments (1)
README.md (1)

56-56: Verification guidance could mention what "success" looks like.

The existing Claude-only text was similarly vague, but now that two platforms are covered, it may help users to know a concrete indicator — e.g., seeing the <EXTREMELY_IMPORTANT> context block or the "You have superpowers" message in the session output.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 56, The README's instruction "Start a new session..." is
missing concrete verification guidance; update that paragraph to tell users what
success looks like by naming specific indicators to check for (e.g., the
presence of the "<EXTREMELY_IMPORTANT>" context block or the "You have
superpowers" message in the session output) and include examples for both Claude
and Cursor so users can confirm the skill invoked correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.cursor-plugin/plugin.json:
- Line 5: The plugin version is hardcoded in .cursor-plugin/plugin.json
("version": "4.3.0") which causes drift across multiple plugin.json files;
refactor to source the version from a single location (e.g., VERSION file or
build config) and update the project build/release script to inject or generate
the "version" field into .cursor-plugin/plugin.json and
.claude-plugin/plugin.json at release time; locate the "version" key in both
plugin.json files and replace hardcoded values with the injection point (or
generation step) so both files are always produced from the single source of
truth.
- Around line 14-17: Update the manifest keys "skills", "agents", "commands",
and "hooks" so their paths point to the repository root instead of the manifest
directory; replace the current "./skills/", "./agents/", "./commands/", and
"./hooks/hooks.json" values with "../skills/", "../agents/", "../commands/", and
"../hooks/hooks.json" respectively so Cursor resolves them to the correct
root-level directories.

In `@README.md`:
- Around line 46-52: Remove the incorrect "/plugin-add superpowers" command from
the "Cursor (via Plugin Marketplace)" section and replace it with the real
installation instructions: explain the CLI method (tell users to install the
"code" shell command via Command Palette → Install "code" to shell and then run
code --install-extension publisher.extension) and the GUI method (Command
Palette → Extensions: Install from VSIX… and select the .vsix file); ensure the
section header "Cursor (via Plugin Marketplace)" remains and the text clearly
states Cursor does not support "/plugin-add" syntax.

---

Outside diff comments:
In `@hooks/session-start.sh`:
- Line 18: The variable using_superpowers_content is capturing both cat's stdout
and stderr because of the "2>&1" redirection, causing error messages to be
concatenated with the fallback; remove the "2>&1" from the cat invocation so
only cat's stdout is captured and the || echo fallback runs alone (i.e., call
cat "${PLUGIN_ROOT}/skills/using-superpowers/SKILL.md" without 2>&1 so
using_superpowers_content only gets the file contents or the fallback message).

---

Nitpick comments:
In `@README.md`:
- Line 56: The README's instruction "Start a new session..." is missing concrete
verification guidance; update that paragraph to tell users what success looks
like by naming specific indicators to check for (e.g., the presence of the
"<EXTREMELY_IMPORTANT>" context block or the "You have superpowers" message in
the session output) and include examples for both Claude and Cursor so users can
confirm the skill invoked correctly.

"name": "superpowers",
"displayName": "Superpowers",
"description": "Core skills library: TDD, debugging, collaboration patterns, and proven techniques",
"version": "4.3.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if there's a version defined elsewhere in the project
rg -n '"version"' --type json | head -20
rg -n 'version' package.json Cargo.toml pyproject.toml setup.py 2>/dev/null | head -10

Repository: obra/superpowers

Length of output: 42


🏁 Script executed:

#!/bin/bash
# List the root directory to understand project structure
echo "=== Root directory structure ==="
ls -la | head -20

echo -e "\n=== Search for version in all files ==="
rg -i "version" -l | head -20

echo -e "\n=== Check for common version config files ==="
find . -maxdepth 2 -type f \( -name "package.json" -o -name "*.toml" -o -name "setup.py" -o -name "version.txt" -o -name "_version.py" \) 2>/dev/null

echo -e "\n=== Content of plugin.json ==="
cat -n ".cursor-plugin/plugin.json" 2>/dev/null

Repository: obra/superpowers

Length of output: 2667


🏁 Script executed:

#!/bin/bash
echo "=== All plugin.json files and their versions ==="
find . -name "plugin.json" -type f | while read f; do
    echo -e "\n--- $f ---"
    cat -n "$f" | grep -i version
done

echo -e "\n=== Recent entries in RELEASE-NOTES.md ==="
head -50 RELEASE-NOTES.md

Repository: obra/superpowers

Length of output: 3299


🏁 Script executed:

#!/bin/bash
echo "=== All plugin directories ==="
find . -maxdepth 2 -type d -name ".*-plugin" -o -name ".opencode"

echo -e "\n=== All plugin.json files ==="
find . -name "plugin.json" -type f

echo -e "\n=== Search for release/version scripts ==="
find . -maxdepth 2 -type f \( -name "*release*" -o -name "*version*" \) ! -path "./.git/*"

echo -e "\n=== Check for GitHub workflows ==="
find .github -type f 2>/dev/null

echo -e "\n=== Search for version update instructions in README ==="
rg -A5 -B5 "version|release" README.md 2>/dev/null | head -40

Repository: obra/superpowers

Length of output: 1568


Multiple plugin.json files require manual version synchronization.

The "version": "4.3.0" is hardcoded in both .cursor-plugin/plugin.json and .claude-plugin/plugin.json. With multiple plugin files requiring the same version, there's no automated mechanism to keep them in sync during releases. Consider creating a single source of truth for the version (e.g., a version.txt or build script) that all plugin.json files reference or are generated from during the release process.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor-plugin/plugin.json at line 5, The plugin version is hardcoded in
.cursor-plugin/plugin.json ("version": "4.3.0") which causes drift across
multiple plugin.json files; refactor to source the version from a single
location (e.g., VERSION file or build config) and update the project
build/release script to inject or generate the "version" field into
.cursor-plugin/plugin.json and .claude-plugin/plugin.json at release time;
locate the "version" key in both plugin.json files and replace hardcoded values
with the injection point (or generation step) so both files are always produced
from the single source of truth.

Comment on lines +14 to +17
"skills": "./skills/",
"agents": "./agents/",
"commands": "./commands/",
"hooks": "./hooks/hooks.json"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if these directories exist at the repo root vs inside .cursor-plugin/
echo "=== Repo root ==="
ls -d skills/ agents/ commands/ hooks/ 2>&1 | head -20
echo ""
echo "=== Inside .cursor-plugin/ ==="
ls -d .cursor-plugin/skills/ .cursor-plugin/agents/ .cursor-plugin/commands/ .cursor-plugin/hooks/ 2>&1
echo ""
echo "=== Check .cursor-plugin structure ==="
ls -la .cursor-plugin/ 2>&1

Repository: obra/superpowers

Length of output: 635


🌐 Web query:

Cursor plugin manifest path resolution relative paths behavior

💡 Result:

Cursor extensions use the VS Code extension model, so “manifest” paths behave like VS Code’s package.json contribution paths:

  • Paths are interpreted as files inside the extension, i.e., relative to the extension root (the folder containing package.json). VS Code examples use ./… for this (e.g., contributes.iconThemes[].path, and iconDefinitions[].iconPath). [1]
  • For some fields (notably contributes.jsonValidation[].url), VS Code uses a special rule: if the value starts with ./ (or .) it’s treated as a local file shipped with the extension; if it doesn’t (e.g., starts with /schemas/...), it’s treated like a remote URL to fetch, which fails for “local” files. [2]

Practical rule: when you mean “a file in my extension”, prefer ./path/to/file rather than /path/to/file. [1][2]


Fix relative paths—they incorrectly reference .cursor-plugin/ subdirectories instead of the repo root.

The manifest at .cursor-plugin/plugin.json uses paths like ./skills/, ./agents/, etc., which Cursor (following VS Code's extension model) resolves relative to the manifest's directory (.cursor-plugin/). These directories don't exist there. The actual directories are at the repo root. Update paths to: ../skills/, ../agents/, ../commands/, ../hooks/hooks.json.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor-plugin/plugin.json around lines 14 - 17, Update the manifest keys
"skills", "agents", "commands", and "hooks" so their paths point to the
repository root instead of the manifest directory; replace the current
"./skills/", "./agents/", "./commands/", and "./hooks/hooks.json" values with
"../skills/", "../agents/", "../commands/", and "../hooks/hooks.json"
respectively so Cursor resolves them to the correct root-level directories.

Comment on lines +46 to +52
### Cursor (via Plugin Marketplace)

In Cursor Agent chat, install from marketplace:

```text
/plugin-add superpowers
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Cursor IDE plugin-add command syntax install plugin

💡 Result:

Cursor “plugin add” / install-plugin command

Cursor doesn’t use a plugin-add command. It installs VS Code extensions.

Install an extension from the command line (recommended)

  1. In Cursor, install the code (VS Code-compatible) shell command: Command Palette → Install “code” to shell (Cursor also offers Install “cursor” to shell). [1]
  2. Then run:
code --install-extension publisher.extension
# or install from a VSIX file:
code --install-extension /path/to/extension.vsix

The CLI also supports @version (e.g., publisher.extension@1.2.3). [2]

Install a VSIX from inside Cursor (GUI)

Command Palette → Extensions: Install from VSIX… and pick the .vsix file. [3]

Sources: [1] [2] [3]


Remove the incorrect /plugin-add superpowers command from the Cursor installation section.

Cursor does not support /plugin-add syntax. Cursor installs VS Code extensions using the code CLI command or the GUI. The correct installation methods are:

  1. CLI (recommended): Install the code shell command via Command Palette → Install "code" to shell, then run code --install-extension publisher.extension
  2. GUI: Command Palette → Extensions: Install from VSIX… and select the .vsix file

Update the README to reflect the actual Cursor installation process instead of the non-existent /plugin-add command.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 46 - 52, Remove the incorrect "/plugin-add
superpowers" command from the "Cursor (via Plugin Marketplace)" section and
replace it with the real installation instructions: explain the CLI method (tell
users to install the "code" shell command via Command Palette → Install "code"
to shell and then run code --install-extension publisher.extension) and the GUI
method (Command Palette → Extensions: Install from VSIX… and select the .vsix
file); ensure the section header "Cursor (via Plugin Marketplace)" remains and
the text clearly states Cursor does not support "/plugin-add" syntax.

@arittr
Copy link
Collaborator

arittr commented Feb 17, 2026

LGTM thanks!

@arittr arittr merged commit 772ec9f into obra:main Feb 17, 2026
1 check passed
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