Skip to content

feat: add Gemini CLI extension support (150+ skills via gemini-extension.json + GEMINI.md) - #512

Merged
wshobson merged 59 commits into
wshobson:mainfrom
mhenke:feature/gemini-cli-integration
May 9, 2026
Merged

wshobson merged 59 commits into
wshobson:mainfrom
mhenke:feature/gemini-cli-integration

Conversation

@mhenke

@mhenke mhenke commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds native Gemini CLI extension support so that all 153 skills across 80 plugins are auto-discoverable in Gemini CLI — without touching any existing agents, commands, or skills.

Impact: 6 files changed (+515 / -13) | Risk: Low — no changes to existing plugin logic | Type: New capability

Closes #511

What Changed

New Files (3)

  • gemini-extension.json — Extension manifest; registers the extension as claude-code-workflows and points Gemini CLI at GEMINI.md for bootstrap context
  • GEMINI.md — Persistent session context loaded by Gemini CLI; explains skill navigation, opt-in slash commands, platform differences from Claude Code, and safety mandates
  • tools/generate_gemini_commands.py — Reads each plugin's commands/*.md files and generates TOML slash commands for Gemini CLI on-demand (not committed to repo)

Modified Files (3)

  • README.md — Adds Gemini CLI badge alongside Smithery badge, adds NOTE callout for Gemini CLI users, and adds new "Gemini CLI Extension Support (NEW)" section in What's New with installation, features, and usage; all existing Claude Code content unchanged
  • Makefile — Adds four new targets: generate-plugin, generate-all-commands, sync-commands, clean-commands; also hardens shell variables with single quotes for safety
  • .gitignore — Added .worktrees/ and commands/**/*.toml (generated slash commands stay local, never committed)

Architecture

Lightweight, zero-friction extension model:

  1. Auto-discovery: gemini-extension.json + GEMINI.md give Gemini CLI enough context to activate skills automatically when a user describes a matching task — no slash commands required
  2. Opt-in slash commands: Users who want explicit /commands generate them locally per plugin via make generate-plugin PLUGIN=; TOMLs are never committed, keeping the repo clean
  3. Protocol Orchestrator: Generated slash commands read their full protocol from the source .md file at runtime and pause at checkpoints for user approval — same disciplined flow as Claude Code
  4. No existing files modified: All 153 skills, 185 agents, and 100 commands are platform-agnostic markdown — zero changes required

Slash Command Workflow

# Enable commands for one plugin
cd ~/.gemini/extensions/claude-code-workflows
make generate-plugin PLUGIN=javascript-typescript

# Update extension + refresh commands in one step
gemini extensions update claude-code-workflows && cd ~/.gemini/extensions/claude-code-workflows && make sync-commands

# Remove generated commands without uninstalling
make clean-commands

# Full uninstall
gemini extensions uninstall claude-code-workflows

Checklist

  • No changes to existing agents, skills, or commands
  • gemini-extension.json is valid JSON
  • Marketplace JSON and all plugin.json files unmodified
  • README preserves all existing Claude Code documentation unchanged
  • TOMLs are gitignored — no committed derived files
  • Generated slash commands verified to match Claude Code /plugin:command naming

Installation (after merge)

gemini extensions install https://github.com/wshobson/agents

mhenke and others added 11 commits April 30, 2026 20:18
Isolate git worktrees from version control to keep repository clean.

Co-authored-by: Copilot <[email protected]>
- Declare claude-agents as a Gemini CLI extension
- Point to GEMINI.md for bootstrap context
- Enable auto-discovery via gemini-cli-extension topic

Co-authored-by: Copilot <[email protected]>
- Document 150+ skills ecosystem for Gemini users
- Explain differences from Claude Code platform
- Provide plugin navigation and skill usage guidance
- Link to tool mapping and plugin catalog

Co-authored-by: Copilot <[email protected]>
Add comprehensive docs/gemini-tool-mapping.md guide for users migrating from
Claude Code to Gemini CLI. Includes:

- Core Tools: Direct Equivalents (table format)
- Platform-Specific Features: Claude Code Only (slash commands, subagents, model tiers)
- Claude Code Specific: MCP Servers (description and migration guidance)
- Platform Differences: Behavior & Constraints (context limits, tool availability)
- Skill Design Guidelines (DO's and DON'Ts for Gemini compatibility)
- Migration Path (step-by-step guide for adapting Claude Code skills)
- Common Patterns (side-by-side code examples)
- FAQ (troubleshooting and common questions)

Document provides practical, self-contained guidance without requiring other docs,
though cross-references to GEMINI.md and plugins.md are included.

Co-authored-by: GitHub Copilot <[email protected]>
- Lines 177-189: Convert Python pseudocode to valid bash for skill examples
- Line 347: Remove invalid read_file() function call; use sed for line extraction
- Lines 365-372: Replace mixed Python/bash with proper bash conditionals using exit codes

All code examples now syntactically valid and follow Gemini CLI bash patterns.

Co-authored-by: GitHub Copilot <[email protected]>
- Explain Gemini CLI extension availability and installation
- Link to GEMINI.md for navigation and tool mapping for platform differences
- Clarify multi-platform support (Claude Code primary, Gemini CLI skills)
- List all 79 plugins organized by category with skill names
- Include natural-language trigger examples for Gemini auto-activation
- Complement GEMINI.md with detailed skill discovery navigation
- Point plugin catalog navigation to gemini-plugin-guide.md for Gemini users
- Keep reference to plugins.md as full technical catalog fallback
- Point install URL to upstream wshobson/agents (not fork)
- Set extension version to 1.0.0 (initial release)
- Fix .gitignore: restore .claude entry, add .worktrees/
- Fix broken @./plugins.md references → @./docs/plugins.md in tool-mapping doc
Copilot AI review requested due to automatic review settings May 1, 2026 02:45
…plicate plugin listing, fix pseudo-code, update README plugin count

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Gemini CLI extension support so the repo’s skills ecosystem can be discovered/activated in Gemini CLI via a manifest + Gemini-focused docs.

Changes:

  • Added gemini-extension.json manifest pointing Gemini CLI at GEMINI.md as the extension context.
  • Added Gemini CLI onboarding and discovery docs (GEMINI.md, plugin guide, and Claude→Gemini tool mapping reference).
  • Updated README.md with Gemini install instructions and .gitignore to ignore .worktrees/.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
gemini-extension.json Introduces a Gemini CLI extension manifest that links the repository to GEMINI.md context.
GEMINI.md Adds Gemini-specific “bootstrap” context: navigation, behavioral differences, and usage guidance.
docs/gemini-tool-mapping.md Documents tool equivalences and migration guidance from Claude Code to Gemini CLI.
docs/gemini-plugin-guide.md Provides a Gemini-optimized plugin/skill discovery catalog with natural-language triggers.
README.md Adds a “Gemini CLI Support” section with installation and links to Gemini docs.
.gitignore Ignores .worktrees/ for worktree-based development.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/gemini-tool-mapping.md Resolved
Comment thread docs/gemini-tool-mapping.md Resolved
Comment thread docs/gemini-tool-mapping.md Resolved
Comment thread GEMINI.md Resolved
Comment thread docs/gemini-plugin-guide.md Resolved
Comment thread docs/gemini-plugin-guide.md Resolved
Comment thread docs/gemini-plugin-guide.md Resolved
web-flow and others added 10 commits May 1, 2026 08:51
Generated programmatically from each plugin's agents/commands/skills
frontmatter. Covers all three component types per plugin, providing
scoped context for Gemini CLI slash commands and developer workflows
inside the repo tree.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Documents the four options considered, why hierarchical GEMINI.md
scanning and per-repo splitting were rejected, and the key findings
(slash commands are supported in Gemini; install granularity is a
hard platform limit). Records pending Phase A work.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Creates commands/<plugin>/<cmd>.toml for each of the 100 Claude Code
commands across 50 plugins, mapping /plugin:command to Gemini CLI's
TOML command format. Prompts are self-contained (no extension-relative
file inclusion) following confirmed patterns from real extension examples.

Includes generator script at tools/generate_gemini_commands.py.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…cision

- 2026-05-01-gemini-slash-commands.md: documents TOML format, directory
  structure, self-contained prompt decision (no extension-relative @{path}),
  and auto-discovery. Includes primary source citations.
- 2026-05-01-per-plugin-gemini-md-distribution.md: documents why per-plugin
  GEMINI.md files are kept in the repo despite not auto-loading for extension
  users. Refutes size/security liability claims with verified data.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Delete all 79 per-plugin GEMINI.md files (plugins/*/GEMINI.md)
- Delete per-plugin file generator (tools/generate_plugin_gemini_md.py)
- Eliminates false power user workflow benefit (files never auto-loaded)
- Keeps TOML slash commands for real discovery mechanism
- Single root GEMINI.md with bootstrap context remains

Rationale: Per-plugin files were in wrong location for Gemini CLI auto-discovery.
Power user benefit was fictional. Slash commands provide real discovery UX.

Co-authored-by: Copilot <[email protected]>
…iles)

ADR Updates:
- 2026-04-30-gemini-cli-integration.md: Explain Option C choice, document false power user claim
- 2026-05-01-gemini-slash-commands.md: Clarify slash commands are primary power user feature
- 2026-05-01-architecture-simplification.md (NEW): Document decision to remove per-plugin files
- docs/decisions/README.md: Updated to reflect final decision
- Archived: 2026-05-01-per-plugin-gemini-md-distribution.md

Rationale:
Audit revealed per-plugin GEMINI.md files don't auto-load (were positioned at root,
not in .gemini/ subdirectory). False power user benefit justification invalidated the
design. Slash commands (which do work) are the real power user feature.

Simplified architecture removes 79 files, 1 generator script, keeps all functionality.

Co-authored-by: Copilot <[email protected]>
…ng doc, fix status claim

Critical fixes addressing three document contradictions:

1. GEMINI.md: Remove false auto-loading claim
   - Line 42 claimed: 'Power users (repo cloned) | Auto-loaded when you cd plugins/<name>/'
   - Audit + ADRs concluded this was INVALID (files never auto-loaded)
   - Yet GEMINI.md still published the lie as fact
   - Replaced with accurate description: slash commands are primary discovery mechanism

2. docs/gemini-tool-mapping.md: Correct slash commands status
   - Listed slash commands as 'Claude Code only' without noting Gemini TOML support
   - ADR 1 flagged: 'docs/gemini-tool-mapping.md requires correction (pending)'
   - Correction never happened
   - Updated to accurately describe Gemini's custom command support via TOML
   - Clarified difference: Gemini has extension-specific commands, not global shortcuts

3. docs/decisions/README.md: Fix 'IMPLEMENTED' status claim
   - Claimed: 'Status: IMPLEMENTED (2026-05-01)'
   - Reality: All work on feature/gemini-cli-integration, not merged to main
   - Main branch at c15b108 has zero Gemini files
   - Changed to: 'Status: IN REVIEW' + noted 'Merged to main: NO'

These fixes ensure architecture docs match implementation reality.

Co-authored-by: Copilot <[email protected]>
- Configure Stitch MCP via HTTP endpoint (https://stitch.googleapis.com/mcp)
- Follows pattern from VSCode MCP config and factory template
- Enables AI-powered UI/UX design capabilities via Google Stitch
- MCP server type: http with standard Accept header

Co-authored-by: Copilot <[email protected]>

@wshobson wshobson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the substantial work here — the documentation is detailed and the generator script in tools/ is a sensible direction. Before we can talk about merging, though, two things need to be addressed.


First: the strategic question.

This repo is described in CLAUDE.md and README.md as a Claude Code plugin marketplace. Multi-IDE / Gemini CLI support is a directional decision I haven't publicly signaled wanting to make. Even with a clean implementation, this needs a yes from me on the direction before any code can merge — and that yes isn't there yet. Worth a separate issue to discuss the platform-support question.


Second: the PR description doesn't match the diff.

The PR body lists 4 new files plus README/.gitignore changes ("lightweight extension model — no code changes to existing agents, commands, or skills"). The actual diff is 133 files / +4610 / -7 — roughly 21× the documented scope.

group files lines
Described in PR body
gemini-extension.json 1 6
GEMINI.md 1 105
docs/gemini-tool-mapping.md 1 503
docs/gemini-plugin-guide.md 1 233
README.md / .gitignore (modified) 2 ~30
Not described in PR body
commands/<plugin>/*.toml (97 generated) 97 ~3000
commands/<plugin>.toml (15 dup mirrors) 15 (subset)
tools/generate_gemini_commands.py 1 244
docs/decisions/*.md (11 working notes) 11 ~1390
docs/plans/2026-04-30-...md 1 927

Two parts of the undocumented scope need attention regardless of the strategic answer:

1. 97 committed TOML mirrors → drift surface. I read the generator: it walks plugins/*/commands/*.md, parses frontmatter, extracts the first paragraph after the H1, and writes a corresponding TOML. Those TOMLs are derived files. Committing derived output without a sync-check creates a permanent maintenance gap — every future change to a .md command requires regenerating + recommitting all the TOMLs, or they desync. If Gemini CLI strictly requires committed TOMLs in-repo, please add a CI check that fails when commands/ is out of sync with the canonical .md files. Better, if it's possible: run the generator at install time and .gitignore commands/.

2. docs/decisions/* and docs/plans/2026-04-30-...md are working notes. Filenames include AUDIT_REPORT.md, SKEPTICISM_AUDIT.md, DECISION_POINT_power_user_files.md, archive/2026-05-01-per-plugin-gemini-md-distribution.md. Those are your own design process — interesting to you, noise here. Please drop them.

A workable subset would look like:

keep drop
gemini-extension.json all 97 commands/<plugin>/*.toml
GEMINI.md all 15 commands/<plugin>.toml duplicates
docs/gemini-tool-mapping.md docs/decisions/* (11 files)
docs/gemini-plugin-guide.md docs/plans/2026-04-30-... (927 lines)
README.md / .gitignore changes
tools/generate_gemini_commands.py

(The generator script itself is reasonable — escapes TOML strings, walks the plugin dirs sensibly, no extra deps.)

Two questions for you:

  • Does Gemini CLI strictly require committed TOML files in the repo, or is install-time / on-demand generation acceptable?
  • Is the tools/generate_gemini_commands.py script intended to be the source of truth?

Holding off on any merge subset until both the directional question and the scope question are resolved.


Generated by Claude Code

web-flow and others added 3 commits May 2, 2026 20:25
Upgraded the Gemini CLI integration to address maintenance and functional gaps identified during review.

Key Improvements:
- Protocol Orchestrator: Slash commands now treat Markdown files as executable protocols, achieving functional parity with Claude Code's interactive checkpoints and multi-step workflows.
- Sync Engine: Replaced the simple generator with a robust Python utility in tools/ that handles validation, pruning of stale TOMLs, and cross-platform path resolution.
- Local-Opt-In Workflow: Users can now selectively generate slash commands for specific plugins via the Makefile, eliminating repository drift.
- Fail-Safe Build Tools: Updated the Makefile with robust cleanup and sync targets.
- Documentation: Comprehensive updates to GEMINI.md and README.md, including a Windows compatibility guide (Git Bash/WSL).

PR Cleanup:
- Removed all 97+ derived TOML files and duplicates.
- Deleted all design process working notes and internal plans.

Strategic Note:
This PR provides the technical foundation for Gemini CLI support but defers to the maintainer on the directional decision of officially supporting multiple harnesses. All Gemini-specific features are designed to be lightweight and opt-in, preserving the core identity of the repository as a Claude Code marketplace.
web-flow and others added 6 commits May 3, 2026 12:07
…orkflows'

Extension installs as claude-code-workflows, not agents. All cd paths
and TOML cleanup references in README and GEMINI.md were pointing to a
directory that does not exist.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Remove ## Gemini CLI section and Gemini CLI Quick Start collapsible
- Unwrap Claude Code Quick Start from collapsible (back to original format)
- Restore 'Plugins vs Agents' heading (no Claude Code only qualifier needed)
- Add Gemini CLI badge next to Smithery badge pointing to GEMINI.md

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Badge alone is easy to miss. The [!NOTE] callout renders visually
distinct on GitHub and gives Gemini users enough context to find
GEMINI.md without disrupting Claude Code content.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- gemini-extension.json: 79 plugins/150+ skills → 80/153 (matches upstream)
- GEMINI.md: skills don't auto-activate silently; Gemini CLI asks first
- README callout: 'auto-discovered' → 'discoverable on-demand' (accurate)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@mhenke

mhenke commented May 3, 2026

Copy link
Copy Markdown
Contributor Author

@wshobson I think I cleaned up any issues. I like the readme now. I kept is Claude Code-centric with a call out to the gemini cli option.

@mhenke

mhenke commented May 3, 2026

Copy link
Copy Markdown
Contributor Author

The Gemini CLI integration has been fully hardened and synchronized:

  • Security & Quality: The Makefile is now hardened against command injection, and the generator script (tools/generate_gemini_commands.py) has been rewritten using pathlib for cross-platform robustness (Linux/Mac/Windows/WSL).
  • Verified Behavior: Confirmed that gemini extensions uninstall correctly removes all generated files for managed extensions.
  • Accurate Documentation: GEMINI.md has been updated with a Safety and System Integrity section and reconciled counts (80 plugins, 153 skills) to match the current upstream state.
  • Clean Diff: All derived files and redundant documentation have been removed. The PR is now a surgical addition of the extension support infrastructure.

The PR is verified and ready for final review.

@mhenke
mhenke force-pushed the feature/gemini-cli-integration branch from 2e3d3ec to 1594d9c Compare May 3, 2026 18:36
web-flow and others added 4 commits May 3, 2026 13:36
- tools/generate_gemini_commands.py: only sync existing plugins by default (Smart Sync)
- tools/generate_gemini_commands.py: add --all flag for explicit full generation
- Makefile: update generate-all-commands to use --all
- Makefile: improve clean-commands to remove directories
…d library summary

- Verified 80 plugins, 153 skills, 185 agents, and 100 commands against actual codebase.
- Re-added audited Skill Library summary for improved discovery.
- Corrected Plugin Catalog link and verified all technical examples.
- Reinforced Safety and System Integrity section.
…mmand names

Gemini CLI does not support the /plugin:command namespace syntax used by
Claude Code. Updated Protocol Orchestrator example and Slash Commands
section to use flat /command-name format.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…mples

Gemini CLI derives command names from file paths — subdirectory separators
become colons, so commands/tdd-workflows/tdd-cycle.toml → /tdd-workflows:tdd-cycle.
The colon syntax is correct and matches the Claude Code namespace pattern.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@wshobson

wshobson commented May 9, 2026

Copy link
Copy Markdown
Owner

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented May 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Gemini CLI Extension Support with on-demand skill discovery, opt-in slash command generation, and Protocol Orchestrator checkpoint flow for task execution.
  • Documentation

    • Updated to reflect latest model versions (Opus 4.7, Sonnet 4.6, Haiku 4.5).
    • Added comprehensive Gemini CLI Skills Ecosystem documentation covering the 80-plugin ecosystem with 153 specialized skills.

Walkthrough

This PR adds native Gemini CLI extension support by introducing a manifest file, comprehensive user documentation, build system targets for command generation, and a Python CLI tool that scans plugin metadata to generate executable TOML command files.

Changes

Gemini CLI Extension Support

Layer / File(s) Summary
Extension Manifest & Ignore Configuration
gemini-extension.json, .gitignore
Extension manifest declares name claude-code-workflows, version 1.6.0, references GEMINI.md as context. .gitignore updated to exclude .worktrees/ and generated commands/**/*.toml files.
Gemini CLI User & Developer Guide
GEMINI.md
Comprehensive documentation covering skills ecosystem overview (counts of skills/agents/commands), task-based skill discovery, opt-in slash command setup, protocol-driven execution with checkpoints, skill categories grouped by plugin, command examples, comparison with Claude Code, and contribution guidance.
Project Documentation Updates
README.md
Added "Gemini CLI users" callout linking to GEMINI.md. Updated model versions and added "What's New" subsection documenting extension installation, on-demand skill discovery, opt-in slash commands, and checkpoint workflow.
Build System Integration
Makefile
Added four new targets: generate-plugin (single plugin), sync-commands (prune stale), generate-all-commands (all plugins), clean-commands (remove all generated TOML). Updated header, help text, and .PHONY list. Quoted variable values in YouTube extractor recipes.
Command Generation Implementation
tools/generate_gemini_commands.py
CLI tool (352 lines) that scans plugins/ for plugin metadata and generates TOML command files under commands/. Supports --plugin, --all, and --prune flags. Parses plugin plugin.json, extracts command descriptions from Markdown frontmatter/headings, builds orchestrator prompts embedding protocol paths and available skills/agents, escapes strings for TOML, writes per-plugin entry TOML and per-command subcommand TOML files, tracks creation/deletion/error counts, exits non-zero if any writes fail.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hop, hop! The agents now bloom—
Gemini sees our skills in every room,
One hundred fifty tasks to explore,
Protocol checkpoints keep progress secure,
Extensions unite, ecosystem's more.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main change: adding Gemini CLI extension support with a new manifest and documentation file covering 150+ skills.
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset, explaining what was added, why, architecture, and usage workflows.
Linked Issues check ✅ Passed The PR implements all core objectives from issue #511: extension manifest (gemini-extension.json), persistent context (GEMINI.md), optional TOML generation, README updates, and .gitignore entries. No existing skills were modified.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #511 objectives. No unrelated modifications detected; Makefile changes support the Gemini workflow, and all modifications serve the extension support goal.
Docstring Coverage ✅ Passed Docstring coverage is 92.31% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
GEMINI.md (1)

71-76: 💤 Low value

Add language specifier to fenced code block.

The code block is missing a language identifier, which affects syntax highlighting and linter compliance.

Proposed fix
-```
+```bash
 /security-scanning:security-sast          # SAST vulnerability scan
 /backend-development:feature-development  # End-to-end feature orchestration
 /tdd-workflows:tdd-cycle                  # Full TDD red-green-refactor
 /python-development:python-scaffold       # Python project scaffolding
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @GEMINI.md around lines 71 - 76, The fenced code block containing the list
entries starting with "/security-scanning:security-sast",
"/backend-development:feature-development", "/tdd-workflows:tdd-cycle", and
"/python-development:python-scaffold" is missing a language specifier; update
the opening triple-backtick to include an appropriate language (e.g., bash) so
the block becomes ```bash, preserving the content of the block to enable proper
syntax highlighting and satisfy the linter.


</details>

</blockquote></details>
<details>
<summary>tools/generate_gemini_commands.py (2)</summary><blockquote>

`109-112`: _💤 Low value_

**Truncation may split mid-word; consider word-boundary truncation.**

Slicing at character 297 could cut a word awkwardly (e.g., "implementa..."). A minor readability improvement would be to find the last space before position 297.



<details>
<summary>Optional improvement</summary>

```diff
     # Cap at ~300 chars for prompt brevity
     if len(text) > 300:
-        text = text[:297] + "..."
+        cutoff = text.rfind(" ", 0, 297)
+        if cutoff > 200:  # Ensure we don't cut too short
+            text = text[:cutoff] + "..."
+        else:
+            text = text[:297] + "..."
     return text
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/generate_gemini_commands.py` around lines 109 - 112, The current
truncation in generate_gemini_commands.py hard-cuts text at 297 characters which
can split words; update the truncation logic in the block handling text (the
variables text and the length check) to compute a max_len (300), take a
tentative cut at max_len-3, then search backwards for the last whitespace (e.g.,
using rfind) before that cut and trim to that word boundary; if no whitespace is
found, fall back to the original hard cut and append "..." so the function
returns a readable, word-boundary-safe truncated string.
```

</details>

---

`136-138`: _💤 Low value_

**TOML escaping handles basic cases but may miss edge cases.**

The `escape_toml_string` function handles backslashes and double quotes. TOML basic strings also require escaping control characters (e.g., `\n`, `\t`). Since the input is typically clean Markdown descriptions, this is unlikely to cause issues in practice.



<details>
<summary>More complete escaping (optional)</summary>

```diff
 def escape_toml_string(s: str) -> str:
     """Escape for TOML basic string (double-quoted)."""
-    return s.replace('\\', '\\\\').replace('"', '\\"')
+    return (s.replace('\\', '\\\\')
+             .replace('"', '\\"')
+             .replace('\n', '\\n')
+             .replace('\t', '\\t'))
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/generate_gemini_commands.py` around lines 136 - 138, escape_toml_string
currently only escapes backslashes and double quotes but misses TOML
basic-string control escapes (e.g., newline, tab, carriage return, backspace,
formfeed); update the escape_toml_string function to also replace control
characters (\n -> \\n, \t -> \\t, \r -> \\r, \b -> \\b, \f -> \\f) in addition
to escaping backslashes and double quotes so TOML basic strings remain valid,
e.g., perform the control-char replacements (or use a small mapping/translate)
before/alongside the existing .replace calls in escape_toml_string.
```

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @GEMINI.md:

  • Around line 71-76: The fenced code block containing the list entries starting
    with "/security-scanning:security-sast",
    "/backend-development:feature-development", "/tdd-workflows:tdd-cycle", and
    "/python-development:python-scaffold" is missing a language specifier; update
    the opening triple-backtick to include an appropriate language (e.g., bash) so
    the block becomes ```bash, preserving the content of the block to enable proper
    syntax highlighting and satisfy the linter.

In @tools/generate_gemini_commands.py:

  • Around line 109-112: The current truncation in generate_gemini_commands.py
    hard-cuts text at 297 characters which can split words; update the truncation
    logic in the block handling text (the variables text and the length check) to
    compute a max_len (300), take a tentative cut at max_len-3, then search
    backwards for the last whitespace (e.g., using rfind) before that cut and trim
    to that word boundary; if no whitespace is found, fall back to the original hard
    cut and append "..." so the function returns a readable, word-boundary-safe
    truncated string.
  • Around line 136-138: escape_toml_string currently only escapes backslashes and
    double quotes but misses TOML basic-string control escapes (e.g., newline, tab,
    carriage return, backspace, formfeed); update the escape_toml_string function to
    also replace control characters (\n -> \n, \t -> \t, \r -> \r, \b -> \b, \f
    -> \f) in addition to escaping backslashes and double quotes so TOML basic
    strings remain valid, e.g., perform the control-char replacements (or use a
    small mapping/translate) before/alongside the existing .replace calls in
    escape_toml_string.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Organization UI

**Review profile**: CHILL

**Plan**: Pro Plus

**Run ID**: `f6fdf43c-1980-4e04-991a-215ade0d1647`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between ece811f23310a37ceb43496dbac0e244fe6845b6 and c5744d25b5a4904d29468850e0ab8d9a59653c09.

</details>

<details>
<summary>📒 Files selected for processing (6)</summary>

* `.gitignore`
* `GEMINI.md`
* `Makefile`
* `README.md`
* `gemini-extension.json`
* `tools/generate_gemini_commands.py`

</details>

</details>

<details>
<summary>📜 Review details</summary>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>📓 Path-based instructions (1)</summary>

<details>
<summary>**/*.md</summary>


**📄 CodeRabbit inference engine (GEMINI.md)**

> Slash commands should follow a sequential, multi-step protocol model where the agent reads the full protocol from repository source Markdown, pauses at checkpoints for approval, and tracks progress locally

Files:
- `GEMINI.md`
- `README.md`

</details>

</details><details>
<summary>🧠 Learnings (1)</summary>

<details>
<summary>📓 Common learnings</summary>

```
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-05-09T13:08:50.016Z
Learning: Agents will never log, print, or commit secrets, API keys, or sensitive credentials
```

```
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-05-09T13:08:50.016Z
Learning: Changes are never staged or committed unless specifically requested by the user
```

```
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-05-09T13:08:50.016Z
Learning: Complex workflows should pause at critical checkpoints for user approval
```

```
Learnt from: CR
Repo: wshobson/agents

Timestamp: 2026-05-09T13:08:50.016Z
Learning: Work is confined to the project directory; system-level configurations are protected
```

</details>

</details><details>
<summary>🪛 checkmake (0.3.2)</summary>

<details>
<summary>Makefile</summary>

[warning] 10-10: Target body for "help" exceeds allowed length of 5 lines (32).

(maxbodylength)

---

[warning] 9-9: Required target "all" is missing from the Makefile.

(minphony)

---

[warning] 9-9: Required target "test" is missing from the Makefile.

(minphony)

</details>

</details>
<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

<details>
<summary>GEMINI.md</summary>

[warning] 71-71: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (11)</summary><blockquote>

<details>
<summary>GEMINI.md (2)</summary><blockquote>

`13-16`: **LGTM! Safety guidelines correctly documented.**

The safety section accurately reflects the repository's operational constraints: credential protection, no auto-commit, checkpoint pauses, and project directory isolation. Based on learnings from the repository's established patterns.

---

`36-42`: **Protocol Orchestrator flow aligns with coding guidelines.**

The checkpoint/resume model described here correctly implements the required pattern: reading from source Markdown, pausing at checkpoints for approval, and tracking progress locally. As per coding guidelines for `**/*.md` files.

</blockquote></details>
<details>
<summary>.gitignore (1)</summary><blockquote>

`27-28`: **LGTM! Correctly ignores generated Gemini command artifacts.**

The glob pattern `commands/**/*.toml` properly excludes all generated TOML files from version control, aligning with the opt-in local generation workflow described in the PR objectives.

</blockquote></details>
<details>
<summary>tools/generate_gemini_commands.py (3)</summary><blockquote>

`18-23`: **LGTM with note: Silent failure on file read.**

Returning an empty string on `OSError` is acceptable for this use case since missing/unreadable files produce empty content that downstream logic handles gracefully. The caller in `context_paragraph` and frontmatter parsing tolerates empty strings.

---

`231-257`: **Security check for path traversal is well implemented.**

The `is_relative_to()` guard at line 234 correctly prevents deleting files outside `COMMANDS_OUT`, protecting against symlink or path manipulation attacks during pruning.

---

`141-175`: **Orchestrator prompt correctly implements protocol checkpoint flow.**

The generated prompt instructs the agent to read the protocol from source Markdown (line 155), pause at checkpoints (line 158), and track progress - aligning with the coding guidelines for slash command behavior.

</blockquote></details>
<details>
<summary>Makefile (2)</summary><blockquote>

`97-97`: **LGTM! Shell quoting hardened against injection.**

The single-quoted variables (`'$(URL)'`, `'$(INTERVAL)'`, `'$(ENGINE)'`, `'$(OUTPUT)'`) properly protect against shell injection from malicious input values.




Also applies to: 105-105, 113-113, 121-121

---

`133-148`: **Gemini CLI targets are well-structured.**

The targets correctly delegate to the Python generator with appropriate flags. The `clean-commands` target uses `-rm` to continue on errors, which is appropriate for cleanup operations.

</blockquote></details>
<details>
<summary>README.md (2)</summary><blockquote>

`11-12`: **LGTM! Clear callout for Gemini CLI users.**

The NOTE block effectively directs Gemini CLI users to the dedicated documentation without disrupting the Claude Code-first flow of the README.

---

`137-150`: **Gemini CLI section accurately describes the integration.**

The documentation correctly explains:
- On-demand skill discovery (line 145)
- Opt-in local generation with gitignored outputs (line 146)
- Platform-agnostic markdown files (line 147)
- Protocol Orchestrator checkpoint flow (line 148)

This aligns with the PR objectives and coding guidelines for slash command behavior.

</blockquote></details>
<details>
<summary>gemini-extension.json (1)</summary><blockquote>

`1-6`: **LGTM! Extension manifest is correctly configured.**

The manifest properly defines the extension name, version, description, and points `contextFileName` to `GEMINI.md` for persistent session context. The counts (80 plugins, 153 skills) match the PR documentation, and the configuration follows the Gemini CLI extension schema.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@wshobson

wshobson commented May 9, 2026

Copy link
Copy Markdown
Owner

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

@wshobson
wshobson self-requested a review May 9, 2026 13:17
@wshobson

wshobson commented May 9, 2026

Copy link
Copy Markdown
Owner

@mhenke Thanks! Looks great!

@wshobson
wshobson merged commit a935f69 into wshobson:main May 9, 2026
2 checks passed
@mhenke
mhenke deleted the feature/gemini-cli-integration branch May 26, 2026 14:00
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.

Gemini CLI extension support -- 150+ skills via gemini-extension.json + GEMINI.md

4 participants