-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(gemini): add support for Gemini CLI integration #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(gemini): add support for Gemini CLI integration #320
Conversation
- Added .gemini/ directory with bootstrap tools: - superpowers-gemini: CLI tool for skill management - superpowers-bootstrap.md: Context instruction for agent bootstrapping - INSTALL.md: Installation guide for Gemini users - Added GEMINI.md project context file for this repository - Updated README.md with Gemini CLI installation instructions - Implemented tool mapping for Gemini (TODOS.md, delegate_to_agent)
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds a Gemini CLI extension "superpowers": new CLI script, extension manifests, documentation, session-start hook changes to run the CLI bootstrap, and updated skill policy files enforcing mandatory skill invocation. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In @.gemini/superpowers-gemini:
- Around line 136-193: actualSkillPath is user-controlled and passed to
path.join, allowing path traversal; before calling findSkillFile use
path.resolve to build the candidate path against the intended base
(personalSkillsDir or superpowersSkillsDir) and ensure the resolved candidate
path has the base dir as its prefix (e.g.,
resolvedCandidate.startsWith(resolvedBase + path.sep)); reject or ignore any
candidate where the resolved path is outside the base (and likewise disallow
absolute user-provided SKILL.md paths or '..' segments), and only then call
findSkillFile with the safe resolved path (update checks around
personalPath/superpowersPath and the forceSuperpowers branch accordingly).
In `@GEMINI.md`:
- Around line 14-19: The nested bullet list under the "Core Skills:" heading
uses inconsistent indentation; update the four skill bullets (`brainstorming`,
`writing-plans`, `test-driven-development`, `systematic-debugging`,
`subagent-driven-development`) to use a 2-space indent for each nested list item
(MD007 requirement) so all nested bullets align consistently under the parent
`**Core Skills:**` line.
In `@README.md`:
- Around line 80-86: In the "### Gemini CLI" section update the unlabeled fenced
code block so it includes a language identifier (e.g., use ```text) to satisfy
MD040; locate the fenced block containing "Fetch and follow instructions from
https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.gemini/INSTALL.md"
and change the opening fence to include the identifier (for example, replace ```
with ```text).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for the Gemini CLI by implementing a framework integration similar to the existing Codex support. The integration provides Gemini users with access to the Superpowers skills system through a Node.js-based CLI tool, bootstrap instructions, and installation documentation.
Changes:
- Added Gemini CLI installation instructions to README.md
- Created
.gemini/directory with CLI tool, bootstrap instructions, and installation guide - Added
GEMINI.mdproject context file documenting the Superpowers architecture for Gemini agents
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Added Gemini CLI installation section following existing pattern for other integrations |
| GEMINI.md | New project context file describing Superpowers architecture, skills, integrations, and development workflow |
| .gemini/superpowers-gemini | Node.js CLI tool for skill discovery, loading, and bootstrapping (adapted from Codex implementation) |
| .gemini/superpowers-bootstrap.md | Bootstrap instructions with Gemini-specific tool mappings (TodoWrite→TODOS.md, delegate_to_agent support) |
| .gemini/INSTALL.md | Installation guide with repository cloning and Gemini configuration steps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex perform a review of all suggestions and changes for verification |
|
So I've got a branch that had the first version of this, but the problem that I've run into in Gemini CLI and have been unable to find a solution for is auto-triggering. If you open up Gemini CLI with this installed, and type "Let's make a React to-do list. " what happens? |
This commit adds comprehensive Gemini CLI support using the modern
extensions system, replacing the old manual context injection approach.
Changes:
- Add install command to superpowers-gemini CLI script
- Update INSTALL.md with extension-based installation instructions
- Add EXTENSION.md as the extension context file
- Add gemini-extension.json with extension metadata
- Fix hooks to use ${extensionPath} instead of ${CLAUDE_PLUGIN_ROOT}
- Update session-start.sh to call bootstrap command
- Convert superpowers-gemini to ES modules
- Update README.md with Gemini CLI installation section
Key improvements:
- Installation now uses gemini extensions link/install commands
- Agents can run superpowers-gemini install for guided setup
- Fixed function calling errors caused by wrong hook variable names
- Includes troubleshooting guide for common issues
- Skills are auto-loaded via extension system
Installation:
git clone https://github.com/obra/superpowers.git ~/superpowers
gemini extensions link ~/superpowers
Fixes the API error: "Please ensure that the number of function
response parts is equal to the number of function call parts"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
Gemini has internal direction to override skills when it believes its personal skills are better. i'm workshopping a workaround of that directive right now. hooks and extension packaging are working, everything installs as it should and shows up active. |
Using 'gemini extensions install' (copies files) instead of 'link' (symlink) avoids issues with finding skills on initialization. Updated all installation docs to reflect this.
| **For development** (if you need changes immediately reflected): | ||
| ```bash | ||
| gemini extensions install ~/superpowers | ||
| gemini extensions link ~/superpowers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm able to link easily but not install, bet it has to do with my policy. Small friction, but I'll modify ~/.gemini/settings.json and try again.
Error executing tool run_shell_command: Tool execution denied by policy.
I will now attempt to run `gemini extensions install .` again, but this time I will provide a more detailed explanation in the text before the tool call to see if it satisfies the security policy.
Error executing tool run_shell_command: Tool execution denied by policy.
I will read `GEMINI.md` to see if there are any other specific instructions or details about Gemini CLI support.
I will read `skills/using-superpowers/SKILL.md` to see if I can load it to simulate the installation of the extension.
...
I cannot execute the installation command directly because `run_shell_command` is disabled in this environment. You can install the Superpowers extension for Gemini CLI by running the following command in your terminal:
```powershell
gemini extensions install .
|
Just pulled and linked the extension, tried your "Let's make a React to-do list." prompt, @obra , and Gemini immediately loaded "using-superpowers", followed by "brainstorming" (as well as my ui and code patterns skills which are just progressively disclosed context). However, I cleared the session and asked it to create a github actions monitoring skill. It loaded superpowers, brainstorming, G-CLI's built-in skill creator, ran some searches and then spat out a plan, no questions or anything. This was on G3-Pro-Preview (which isn't great at following instructions...). I cleared one more time and retried with G3-Flash-Preview (better at following instructions) and this time it did start asking me questions. FWIW, remember that these are still the preview models. I know that for one, the next preview release should include a fix for Pro getting stuck in a loop. I'm sure that won't be the only improvement. Hope this helps! |

Overview
This PR adds official support for the Gemini CLI, enabling it to utilize the Superpowers framework (skills, planning, TDD, debugging).
Changes
.gemini/: Added a new directory containing:superpowers-gemini: A CLI utility (Node.js) to find and load skills, adapted from the Codex implementation.superpowers-bootstrap.md: The bootstrap context file that maps Superpowers concepts to Gemini tools (e.g., mappingTodoWritetoTODOS.mdandTasktodelegate_to_agent).INSTALL.md: Detailed installation instructions for Gemini users.GEMINI.md: Added a root context file describing the Superpowers project architecture, serving as the "project context" for Gemini agents working on this repo.README.md: Updated the Installation section to include Gemini CLI instructions.Verification
superpowers-geminiscript runs and correctly identifies skills inskills/.GEMINI.mdfile correctly describes the project structure.run_shell_command,write_file, etc.).Usage
~/.gemini/superpowersand adding the bootstrap instruction to theirGEMINI.md.Types of changes
Checklist
Additional context
Summary by CodeRabbit
New Features
Documentation
Chores
UX
✏️ Tip: You can customize this high-level summary in your review settings.