Skip to content

feat(skills): add gemini-cli delegation skill - #12246

Open
spideystreet wants to merge 1 commit into
NousResearch:mainfrom
spideystreet:feat/skill-gemini-cli
Open

feat(skills): add gemini-cli delegation skill#12246
spideystreet wants to merge 1 commit into
NousResearch:mainfrom
spideystreet:feat/skill-gemini-cli

Conversation

@spideystreet

@spideystreet spideystreet commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a bundled delegation skill for Google Gemini CLI, mirroring the existing pattern of skills/autonomous-ai-agents/claude-code and skills/autonomous-ai-agents/codex.

This lets Hermes delegate coding work to the gemini CLI the same way it already delegates to Claude Code and Codex — one-shot tasks, background long-runs, parallel worktree fixes, and PR reviews.

Distinct from PR #11270: that PR added Gemini as an inference provider (Gemini-as-a-model). This PR is orthogonal — it delegates to the gemini CLI as an autonomous agent, not using Gemini as Hermes' brain.

What Gemini brings that the existing delegation skills don't:

  • 1M-token context (whole-repo audits in one pass)
  • Native --approval-mode plan for stronger read-only guarantees than allowlists
  • No git-repo requirement (Codex needs one)
  • No PTY required for -p mode (cleaner than Codex's tmux/PTY plumbing)

Related Issue

Fixes #10036

Type of Change

  • 🎯 New skill (bundled or hub)

Changes Made

  • Add skills/autonomous-ai-agents/gemini-cli/SKILL.md (173 lines)
    • Frontmatter follows the project standard (name, description, version, author, license, metadata.hermes.tags, metadata.hermes.related_skills)
    • Documents: prerequisites, one-shot tasks, four approval modes, read-only audits with 1M context, JSON/stream-json output, background mode, worktree-based parallel work, PR-review patterns, batch reviews, model selection, subcommands, rules

How to Test

Tested end-to-end against gemini CLI v0.38.1 on macOS (Darwin 25.1.0) before opening this PR. Each documented pattern was verified individually.

# 1. Confirm Hermes discovers the skill
hermes skills list | grep gemini-cli
# Expected: gemini-cli | autonomous-ai-agents | local | local

# 2. Inspect frontmatter
hermes skills inspect autonomous-ai-agents/gemini-cli

# 3. End-to-end delegation
mkdir -p /tmp/gem-test && echo "TODO: refactor" > /tmp/gem-test/file.py
hermes chat -Q -s autonomous-ai-agents/gemini-cli --max-turns 4 \
  -q "Use the gemini-cli skill to audit /tmp/gem-test for TODO comments. Use plan mode. Report in 1 line."
# Expected: Hermes invokes `gemini -p ... --approval-mode plan` and reports the TODO

Verified working patterns from the SKILL:

  • gemini -p one-shot (no PTY, no git repo required)
  • --approval-mode plan (read-only enforced — no writes possible)
  • --approval-mode yolo (auto-approves writes; created a real file)
  • -o json / -o stream-json (parseable envelope with token + cost stats)
  • --include-directories (multi-dir workspace)
  • ✅ Background via shell & (no PTY needed for -p)
  • git worktree add + per-worktree gemini (parallel issue fixing)
  • ✅ Piped stdin (git diff | gemini -p ...)
  • gemini mcp list, extensions list, skills list subcommands

Caveat documented in SKILL: built-in -w/--worktree flag is interactive-only (silently dumps help when combined with -p). The skill documents git worktree add as the scripted alternative.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (feat(skills): ...)
  • I searched for existing PRs — no existing PR adds a gemini-cli delegation skill (PR feat(gemini): add Google Gemini CLI OAuth inference provider #11270 is the inference-provider integration, different scope)
  • My PR contains only changes related to this skill (no unrelated commits)
  • I've tested on my platform: macOS 15 (Darwin 25.1.0), Hermes Agent v0.10.0, gemini CLI v0.38.1
  • N/A — pytest tests/ -q: this PR is a bundled skill (Markdown only), no Python code paths changed
  • N/A — Tests for changes: skill is documentation; end-to-end test steps included in "How to Test"

Documentation & Housekeeping

  • N/A — No cli-config.yaml.example change needed (skill auto-discovered)
  • N/A — No CONTRIBUTING.md / AGENTS.md change needed
  • I've considered cross-platform impact: skill uses standard CLI flags; gemini CLI is npm-installable on macOS/Linux/Windows, brew on macOS/Linux. Background & syntax is bash/zsh; the rule "no PTY needed for -p" applies cross-platform
  • N/A — No tool descriptions/schemas changed

For New Skills

  • This skill is broadly useful — delegation to Gemini CLI is in the same category as claude-code and codex, both already bundled. Free-tier auth (60 req/min, 1k req/day) means most users can try it without paid keys
  • SKILL.md follows the standard format (frontmatter, prerequisites, patterns/sections, rules)
  • No external dependencies that aren't already available — only requires gemini CLI (npm or brew install) and the existing Hermes terminal + process tools
  • I've tested the skill end-to-end with hermes chat -s autonomous-ai-agents/gemini-cli -q "..." — working

Screenshots / Logs

End-to-end run on macOS, Hermes v0.10.0, model xiaomi/mimo-v2-pro:

$ hermes chat -Q -s autonomous-ai-agents/gemini-cli --max-turns 4 \
    -q "Use the gemini-cli skill to audit /tmp/gem-e2e for TODO comments. Use plan mode. Report in 1 line."
session_id: 20260418_202739_fe5b63
1 TODO found: file.py:1 — "TODO: refactor this".

Mirrors the codex/claude-code delegation pattern for Google Gemini CLI.
Documents one-shot, plan/yolo/auto_edit approval modes, JSON/stream-json
output, multi-directory context, background mode, worktree-based parallel
work, and PR-review patterns. Each pattern was verified against gemini
CLI v0.38.1 on macOS before publishing.

Closes NousResearch#10036
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) labels Apr 23, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for adding the missing Gemini CLI delegation path. Current main still has no skills/autonomous-ai-agents/gemini-cli/ skill, so the request in #10036 remains valid.

Problems

  • skills/autonomous-ai-agents/gemini-cli/SKILL.md:3 has a 180-character, multi-sentence description; AGENTS.md:888-900 requires one sentence of at most 60 characters.
  • SKILL.md:1-10 omits platforms: and credits only Hermes Agent. New skills require audited platform gating and external contributor-first credit (AGENTS.md:916-931). This matters because the examples include POSIX-oriented /tmp and shell-background usage.
  • The document omits the required modern section order and no tests/skills/test_gemini_cli_skill.py accompanies it (AGENTS.md:933-950).

Suggested changes

  • Modernize the frontmatter and section structure, add a focused skill test, and then salvage the otherwise isolated new-file change.

Automated hermes-sweeper review.

@@ -0,0 +1,173 @@
---
name: gemini-cli
description: Delegate coding tasks to Google Gemini CLI agent. Use for whole-repo audits, code reviews, refactors, batch issue fixing, and structured-output extraction. Requires the gemini CLI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please reduce this to a single sentence of at most 60 characters. New and modernized skills must meet the hardline description limit in AGENTS.md:888-900.

name: gemini-cli
description: Delegate coding tasks to Google Gemini CLI agent. Use for whole-repo audits, code reviews, refactors, batch issue fixing, and structured-output extraction. Requires the gemini CLI.
version: 1.0.0
author: Hermes Agent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For an external contribution, credit the human contributor first (for example, spideystreet + Hermes Agent), per AGENTS.md:926-931.

version: 1.0.0
author: Hermes Agent
license: MIT
metadata:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add audited platforms: metadata and metadata.hermes.category. The document includes POSIX-oriented /tmp and shell-background examples, so the supported-platform declaration needs to reflect that audit.

@teknium1 teknium1 added sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Will he use Gemini CLI? Is there a convenient way to install skills?

3 participants