Skip to content

Conversation

@crichalchemist
Copy link

@crichalchemist crichalchemist commented Jan 21, 2026

  • 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)

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., mapping TodoWrite to TODOS.md and Task to delegate_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

  • Installation: Verified that superpowers-gemini script runs and correctly identifies skills in skills/.
  • Context: The GEMINI.md file correctly describes the project structure.
  • Tool Mapping: Documented specific tool mappings for Gemini's capabilities (run_shell_command, write_file, etc.).

Usage

  • Users can now install Superpowers for Gemini by cloning the repo into ~/.gemini/superpowers and adding the bootstrap instruction to their GEMINI.md.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • [ X] Documentation update

Checklist

  • [ X] I have read the MCP Documentation
  • [ X] My code follows the repository's style guidelines
  • [ X] New and existing tests pass locally
  • [ X] I have added appropriate error handling
  • [ X] I have added or updated documentation as needed

Additional context

Summary by CodeRabbit

  • New Features

    • Adds a Superpowers extension for the Gemini CLI with commands to install, discover, bootstrap, and use skills.
  • Documentation

    • Adds comprehensive installation, bootstrap, usage, and extension guides plus CLI README updates.
    • Adds policy/instruction updates mandating and guiding skill invocation and workflows.
  • Chores

    • Adds extension/package manifest and CLI entry for the Superpowers tool.
  • UX

    • Session startup now runs the extension bootstrap to surface available skills and guidance.

✏️ Tip: You can customize this high-level summary in your review settings.

- 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)
Copilot AI review requested due to automatic review settings January 21, 2026 19:43
@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Note

Other AI code review bot(s) detected

CodeRabbit 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.

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
CLI entrypoint
.gemini/superpowers-gemini
New Node.js CLI (CLI commands: install, bootstrap, find-skills, use-skill) that resolves personal vs. superpowers skills, extracts frontmatter via skills-core, enforces path-traversal safeguards, and prints structured skill output.
Extension manifests & packaging
gemini-extension.json, package.json
New extension metadata and npm package manifest (name: superpowers, version 4.0.3, author, MIT license, bin mapping to the CLI).
Bootstrap & session hook
hooks/session-start.sh
Reworked to invoke .gemini/superpowers-gemini bootstrap, capture and escape combined bootstrap+warning output, and inject it as a single additionalContext field into the session JSON.
Documentation & install guides
GEMINI.md, EXTENSION.md, README.md, .gemini/INSTALL.md, .gemini/superpowers-bootstrap.md
New and expanded docs describing architecture, installation, bootstrap workflow, tooling mappings, skill conventions, and troubleshooting.
Skill policy and command text
skills/using-superpowers/SKILL.md, commands/brainstorm.md
SKILL.md extended with mandatory invocation/override policy blocks and explicit rules; brainstorm.md text updated to remove superpowers: qualifier from invocation instruction.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Gemini as Gemini CLI (session-start hook)
participant Hook as hooks/session-start.sh
participant CLI as .gemini/superpowers-gemini
participant FS as Filesystem (skills/*, personal skills)
participant Core as lib/skills-core (frontmatter)
Gemini->>Hook: Start session
Hook->>CLI: run "bootstrap"
CLI->>FS: read available skills (personal then superpowers)
CLI->>Core: extract frontmatter / strip content
CLI->>Hook: return bootstrap output (list, bootstrap text)
Hook->>Gemini: inject JSON with additionalContext (escaped bootstrap output)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 I nibbled docs and stitched a script,

bootstrapped skills from every crypt.
Gemini calls, I hop on cue—
skills and tests, a springtime brew.
Hop, hop, superpowers, new!

🚥 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 accurately describes the main objective of the PR: adding Gemini CLI integration support to the Superpowers framework.
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.


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.

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

🤖 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).

Copy link

Copilot AI left a 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.md project 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.

@crichalchemist
Copy link
Author

@codex perform a review of all suggestions and changes for verification

@crichalchemist crichalchemist marked this pull request as draft January 21, 2026 20:07
@crichalchemist crichalchemist marked this pull request as ready for review January 21, 2026 20:16
@obra
Copy link
Owner

obra commented Jan 22, 2026

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"
@crichalchemist
Copy link
Author

gemini has experimental hooks that work the same as claude, i packaged it as a gemini extension too, much like a claude code plugin.

now when i ask it that, it launches into brainstorm.

Screenshot 2026-01-22 at 1 10 59 AM

Copy link

Copilot AI left a 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.

crichalchemist and others added 4 commits January 22, 2026 01:27
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>
Copy link

Copilot AI left a 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.

@crichalchemist
Copy link
Author

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
Copy link

@yclian yclian Jan 25, 2026

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 .

@timothyfroehlich
Copy link

timothyfroehlich commented Jan 26, 2026

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...).
Here's the log

I cleared one more time and retried with G3-Flash-Preview (better at following instructions) and this time it did start asking me questions.
I saved this log as markdown, easier to read. I figured you didn't need the entire log of creating this so I saved if after it got to Design Section 1.

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!

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.

4 participants