-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Open
crichalchemist
wants to merge
12
commits into
obra:main
Choose a base branch
from
crichalchemist:feature/gemini-cli-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+680
−7
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3f6784d
feat(gemini): add support for Gemini CLI integration
crichalchemist b25a18b
fix: mitigate path traversal vulnerability in skill loading
crichalchemist d0522a0
docs(gemini): fix nested list indentation in GEMINI.md
crichalchemist 6b56e71
docs(gemini): use text identifier for code block in README.md
crichalchemist b6646e6
feat(gemini): add extension-based installation with install command
crichalchemist c0ac22d
Update superpowers-bootstrap.md
crichalchemist ea6d64e
Update INSTALL.md
crichalchemist 502a7fc
Update superpowers-gemini
crichalchemist e3fe54f
Update hooks.json
crichalchemist 7aaa7ff
docs(gemini): recommend 'install' over 'link' for better reliability
crichalchemist e4b214c
feat: enhance critical directives for skill adherence and add package…
crichalchemist e0cee21
feat: add bin entry for superpowers-gemini in package.json
crichalchemist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # Installing Superpowers for Gemini CLI | ||
|
|
||
| Enable Superpowers skills in your Gemini CLI environment using the extensions system. | ||
|
|
||
| ## Quick Install (For Agents) | ||
|
|
||
| If you're an AI agent being asked to install superpowers, run this command: | ||
|
|
||
| ```bash | ||
| run_shell_command ~/superpowers/.gemini/superpowers-gemini install | ||
| ``` | ||
|
|
||
| Or if the repository path is known: | ||
|
|
||
| ```bash | ||
| run_shell_command <repo-path>/.gemini/superpowers-gemini install | ||
| ``` | ||
|
|
||
| Then follow the instructions it provides. | ||
|
|
||
| ## Manual Installation | ||
|
|
||
| ### 1. Clone the repository | ||
|
|
||
| ```bash | ||
| git clone https://github.com/obra/superpowers.git ~/superpowers | ||
| cd ~/superpowers | ||
| ``` | ||
|
|
||
| ### 2. Install the extension | ||
|
|
||
| ```bash | ||
| gemini extensions install ~/superpowers | ||
| ``` | ||
|
|
||
| **For development** (if you need changes immediately reflected): | ||
| ```bash | ||
| gemini extensions link ~/superpowers | ||
| ``` | ||
|
|
||
| Note: Using `install` (recommended) copies files to `~/.gemini/extensions/` for better reliability. | ||
| Using `link` creates a symlink, which may cause issues finding skills. | ||
|
|
||
| ### 3. Verify installation | ||
|
|
||
| ```bash | ||
| gemini extensions list | ||
| ``` | ||
|
|
||
| You should see `superpowers` in the list with all skills shown. | ||
|
|
||
| ### 4. (Optional) Create personal skills directory | ||
|
|
||
| For your own custom skills: | ||
|
|
||
| ```bash | ||
| mkdir -p ~/.gemini/skills | ||
| ``` | ||
|
|
||
| ## Testing | ||
|
|
||
| Start a Gemini session and ask: | ||
| ``` | ||
| List all available superpowers skills | ||
| ``` | ||
|
|
||
| The agent should recognize and use the skills system. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Function calling error | ||
|
|
||
| If you see: | ||
| ``` | ||
| Please ensure that the number of function response parts is equal to the number of function call parts | ||
| ``` | ||
|
|
||
| This happens when hooks have wrong variable names: | ||
|
|
||
| 1. Edit `~/.gemini/skills/superpowers/hooks/hooks.json` | ||
crichalchemist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 2. Replace `${CLAUDE_PLUGIN_ROOT}` with `${extensionPath}` | ||
| 3. Restart Gemini | ||
|
|
||
| ### Extension not loading | ||
|
|
||
| Verify the extension: | ||
| ```bash | ||
| gemini extensions validate ~/superpowers | ||
| ``` | ||
|
|
||
| ### Skills not appearing | ||
|
|
||
| Check extension status: | ||
| ```bash | ||
| gemini extensions list | ||
| ``` | ||
|
|
||
| Look for "Enabled (User): true" and "Enabled (Workspace): true" | ||
|
|
||
| ## Updating | ||
|
|
||
| ```bash | ||
| cd ~/superpowers | ||
| git pull | ||
| gemini extensions update superpowers | ||
| ``` | ||
|
|
||
| ## Need Help? | ||
|
|
||
| https://github.com/obra/superpowers/issues | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Superpowers Bootstrap for Gemini | ||
|
|
||
| <EXTREMELY_IMPORTANT> | ||
| You have superpowers. | ||
|
|
||
| **Tool for running skills:** | ||
| - `~/superpowers/.gemini/superpowers-gemini use-skill <skill-name>` | ||
| (Execute this using `run_shell_command`) | ||
|
|
||
| **Tool Mapping for Gemini:** | ||
| When skills reference tools you don't have, substitute your equivalent tools: | ||
| - `TodoWrite` → Create or update a `TODOS.md` file using `write_file` to track your progress. | ||
| - `Task` tool with subagents → Use `delegate_to_agent` if available. If not, perform the work yourself. | ||
| - `Skill` tool → Run `~/superpowers/.gemini/superpowers-gemini use-skill <skill-name>` using `run_shell_command`. | ||
| - `Read`, `Write`, `Edit`, `Bash` → Use your native tools (`read_file`, `write_file`, `replace`, `run_shell_command`). | ||
|
|
||
| **Skills naming:** | ||
| - Superpowers skills: `superpowers:skill-name` (from ~/.gemini/superpowers/skills/) | ||
crichalchemist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Personal skills: `skill-name` (from ~/.gemini/skills/) | ||
| - Personal skills override superpowers skills when names match | ||
|
|
||
| **Critical Rules:** | ||
| - Before ANY task, review the skills list (shown below). | ||
| - If a relevant skill exists, you MUST use `superpowers-gemini use-skill` to load it. | ||
| - Announce: "I've read the [Skill Name] skill and I'm using it to [purpose]". | ||
| - Skills with checklists require adding items to `TODOS.md`. | ||
| - NEVER skip mandatory workflows (brainstorming before coding, TDD, systematic debugging). | ||
|
|
||
| **Skills location:** | ||
| - Superpowers skills: ~/.gemini/superpowers/skills/ | ||
crichalchemist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Personal skills: ~/.gemini/skills/ (override superpowers when names match) | ||
|
|
||
| IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT. | ||
| </EXTREMELY_IMPORTANT> | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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
linkeasily but notinstall, bet it has to do with my policy. Small friction, but I'll modify~/.gemini/settings.jsonand try again.