Skip to content

feat(cli): add Gemini CLI skill support#221

Open
eliau2005 wants to merge 2 commits intoteng-lin:mainfrom
eliau2005:feat/gemini-cli-skill
Open

feat(cli): add Gemini CLI skill support#221
eliau2005 wants to merge 2 commits intoteng-lin:mainfrom
eliau2005:feat/gemini-cli-skill

Conversation

@eliau2005
Copy link
Copy Markdown

@eliau2005 eliau2005 commented Mar 24, 2026

Summary

  • Add gemini as a supported skill install target alongside claude and agents
  • Gemini CLI uses the same SKILL.md format (YAML frontmatter with name/description), so the existing file is reused — no new file needed
  • Install path: ~/.gemini/skills/notebooklm/SKILL.md (user scope) or .gemini/skills/notebooklm/SKILL.md (project scope)

Changes

  • cli/skill.py: Added "gemini" entry to TARGETS dict
  • cli/agent_templates.py: Added "gemini" to AGENT_TEMPLATE_FILES (maps to SKILL.md) and repo-root fallback
  • cli/agent.py: Added "gemini" to agent show command choices
  • Tests updated to cover the new gemini target in install/status/uninstall/show flows

Test plan

  • ruff format — clean
  • ruff check — no issues
  • mypy — no issues
  • pytest tests/unit/cli/test_skill.py tests/unit/cli/test_agent.py — 33/33 passed

Summary by CodeRabbit

  • New Features
    • Added Gemini agent support to the agent show command, allowing users to display Gemini agent skills.
    • Extended skill management commands (install, status, uninstall, show) to support Gemini as a target.
    • Gemini agent utilizes the same template structure as Claude.

Add gemini as a supported skill install target alongside claude and agents.
Gemini CLI uses the same SKILL.md format (name/description frontmatter), so
no new file is needed - the existing SKILL.md is reused.

- Add "gemini" target to TARGETS dict in skill.py (.gemini/skills/notebooklm/SKILL.md)
- Add "gemini" entry to AGENT_TEMPLATE_FILES in agent_templates.py (reuses SKILL.md)
- Add "gemini" to agent show command choices in agent.py
- Update tests to cover the new gemini target

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces support for Gemini CLI skills within the system, enabling seamless integration and management of Gemini-based functionalities. By leveraging existing skill formats and extending CLI commands, it expands the range of supported AI models without introducing new complexities, ensuring a consistent user experience for skill installation and management.

Highlights

  • Gemini CLI Skill Support: Added 'gemini' as a supported skill installation target, allowing users to install Gemini CLI skills alongside existing 'claude' and 'agents' targets.
  • SKILL.md Reuse: The existing SKILL.md format, including YAML frontmatter for name and description, is reused for Gemini CLI skills, requiring no new file format.
  • Installation Paths: Defined standard installation paths for Gemini skills: ~/.gemini/skills/notebooklm/SKILL.md for user scope and .gemini/skills/notebooklm/SKILL.md for project scope.
  • CLI Command Integration: Integrated 'gemini' into the agent show command choices and updated skill management logic to handle the new target.
  • Test Coverage: Updated unit and e2e tests to ensure comprehensive coverage for the new Gemini target across install, status, uninstall, and show flows.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e691103-f2cb-41a2-9ada-f03a01a8c610

📥 Commits

Reviewing files that changed from the base of the PR and between 6c1eece and 1883f90.

📒 Files selected for processing (1)
  • tests/unit/cli/test_skill.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unit/cli/test_skill.py

📝 Walkthrough

Walkthrough

This PR adds support for "gemini" as a new agent and skill target in the CLI tool. Gemini is configured to use the same SKILL.md template as Claude and can be installed, inspected, and uninstalled at the .gemini/skills/notebooklm/ directory path alongside existing Codex and Claude targets.

Changes

Cohort / File(s) Summary
Agent CLI & Templates
src/notebooklm/cli/agent.py, src/notebooklm/cli/agent_templates.py
Added "gemini" to allowed agent target choices; mapped gemini to SKILL.md template (same as claude); updated repo-root template preference logic to treat gemini identically to claude when REPO_ROOT_CLAUDE_SKILL exists.
Skill Target Configuration
src/notebooklm/cli/skill.py
Introduced "gemini" as a new skill target with path .gemini/skills/notebooklm/SKILL.md, automatically extending install, status, uninstall, and show command coverage.
Test Coverage
tests/unit/cli/test_agent.py, tests/unit/cli/test_skill.py
Added unit tests verifying gemini agent show command execution, template loading from bundled skills, and skill install/status/uninstall operations for the gemini target directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A new gemini hops into place,
Alongside claude in the skill-storage space,
With SKILL.md maps and paths so neat,
The agent targets are now complete! ✨

🚥 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 'feat(cli): add Gemini CLI skill support' accurately and concisely summarizes the main change: adding Gemini as a new supported skill target in the CLI module.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% 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

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

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for a new 'gemini' agent target, updating the CLI's agent show command, agent template mappings, and skill management definitions. Corresponding unit tests were added and updated to reflect the new target. Additionally, several existing test files were modified to reformat assert statements for improved readability. Feedback includes updating an outdated docstring for the show_agent command to include the new 'gemini' target and a suggestion to rename a variable (REPO_ROOT_CLAUDE_SKILL) for better clarity in a follow-up change.

@click.argument("target", type=click.Choice(["codex", "claude"], case_sensitive=False))
@click.argument("target", type=click.Choice(["codex", "claude", "gemini"], case_sensitive=False))
def show_agent(target: str):
"""Display instructions for Codex or Claude Code."""
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.

medium

The docstring for show_agent is now outdated with the addition of the gemini target. It should be updated to include Gemini for completeness and to accurately reflect the command's functionality.

Suggested change
"""Display instructions for Codex or Claude Code."""
"""Display instructions for Codex, Claude, or Gemini."""

Comment on lines +35 to 36
if normalized in ("claude", "gemini") and REPO_ROOT_CLAUDE_SKILL.exists():
return REPO_ROOT_CLAUDE_SKILL.read_text(encoding="utf-8")
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.

medium

While the logic to handle gemini here is correct, the variable REPO_ROOT_CLAUDE_SKILL is now used for both claude and gemini, which makes its name misleading. For better maintainability, consider renaming this variable to something more generic, like REPO_ROOT_SKILL_FILE, in a follow-up change. This would make the code clearer for future readers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/notebooklm/cli/skill.py (1)

117-124: ⚠️ Potential issue | 🟡 Minor

Help text still omits Gemini target.

The --target help copy now understates available options, which can confuse users.

✏️ Suggested copy update
-    help="Install for Claude Code, universal agent skill directories, or both.",
+    help="Install for Claude Code, Gemini CLI, Agent Skills, or all targets.",
-    help="Inspect Claude Code, universal agent skill directories, or both.",
+    help="Inspect Claude Code, Gemini CLI, Agent Skills, or all targets.",
-    help="Remove Claude Code, universal agent skill directories, or both.",
+    help="Remove Claude Code, Gemini CLI, Agent Skills, or all targets.",

Also applies to: 174-180, 220-226

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/notebooklm/cli/skill.py` around lines 117 - 124, The --target
click.option for the skill installer (the option defined with parameter name
target_name and using click.Choice(["all", *TARGETS])) omits the Gemini target
in its help text; update the help string(s) where this option is defined (the
click.option blocks around target_name and other occurrences using TARGETS) to
explicitly mention Gemini (e.g., "Install for Claude Code, Gemini, universal
agent skill directories, or both") so the displayed help matches the available
choices.
🧹 Nitpick comments (1)
tests/unit/cli/test_skill.py (1)

151-164: Status test assertion is now weaker than intended.

After adding Gemini to the installed set, >= 2 can pass even if one target is broken. Tighten this assertion.

✅ Suggested assertion hardening
-        assert result.output.count("Installed") >= 2
+        assert result.output.count("Installed") >= 3
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/cli/test_skill.py` around lines 151 - 164, The test's final
assertion is too loose (assert result.output.count("Installed") >= 2) and should
ensure all three skill locations are reported installed; update the assertion in
tests/unit/cli/test_skill.py (the block that calls runner.invoke(cli, ["skill",
"status"]) and inspects result) to require all three installs are present (e.g.,
assert result.output.count("Installed") == 3) so a single failure won't still
let the test pass.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/notebooklm/cli/agent.py`:
- Line 18: The module/command docstring currently reads "Display instructions
for Codex or Claude Code." and is outdated after adding Gemini; update the
triple-quoted docstring in src/notebooklm/cli/agent.py (the module/command-level
docstring at the top of the file) to mention all supported models, e.g. "Display
instructions for Codex, Claude Code, and Gemini", so the CLI help output
accurately reflects current behavior.

---

Outside diff comments:
In `@src/notebooklm/cli/skill.py`:
- Around line 117-124: The --target click.option for the skill installer (the
option defined with parameter name target_name and using click.Choice(["all",
*TARGETS])) omits the Gemini target in its help text; update the help string(s)
where this option is defined (the click.option blocks around target_name and
other occurrences using TARGETS) to explicitly mention Gemini (e.g., "Install
for Claude Code, Gemini, universal agent skill directories, or both") so the
displayed help matches the available choices.

---

Nitpick comments:
In `@tests/unit/cli/test_skill.py`:
- Around line 151-164: The test's final assertion is too loose (assert
result.output.count("Installed") >= 2) and should ensure all three skill
locations are reported installed; update the assertion in
tests/unit/cli/test_skill.py (the block that calls runner.invoke(cli, ["skill",
"status"]) and inspects result) to require all three installs are present (e.g.,
assert result.output.count("Installed") == 3) so a single failure won't still
let the test pass.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 19555540-dd46-477c-b6e0-abf80403281f

📥 Commits

Reviewing files that changed from the base of the PR and between ddb4dee and 6c1eece.

📒 Files selected for processing (12)
  • src/notebooklm/cli/agent.py
  • src/notebooklm/cli/agent_templates.py
  • src/notebooklm/cli/skill.py
  • tests/e2e/test_chat.py
  • tests/e2e/test_research_import_verification.py
  • tests/e2e/test_source_selection.py
  • tests/unit/cli/test_agent.py
  • tests/unit/cli/test_skill.py
  • tests/unit/test_auth.py
  • tests/unit/test_client.py
  • tests/unit/test_exceptions.py
  • tests/unit/test_windows_compatibility.py

@click.argument("target", type=click.Choice(["codex", "claude"], case_sensitive=False))
@click.argument("target", type=click.Choice(["codex", "claude", "gemini"], case_sensitive=False))
def show_agent(target: str):
"""Display instructions for Codex or Claude Code."""
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Command docstring is outdated after adding Gemini.

Please update the description so help output reflects current behavior.

✏️ Suggested update
-    """Display instructions for Codex or Claude Code."""
+    """Display instructions for Codex, Claude Code, or Gemini CLI."""
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"""Display instructions for Codex or Claude Code."""
"""Display instructions for Codex, Claude Code, or Gemini CLI."""
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/notebooklm/cli/agent.py` at line 18, The module/command docstring
currently reads "Display instructions for Codex or Claude Code." and is outdated
after adding Gemini; update the triple-quoted docstring in
src/notebooklm/cli/agent.py (the module/command-level docstring at the top of
the file) to mention all supported models, e.g. "Display instructions for Codex,
Claude Code, and Gemini", so the CLI help output accurately reflects current
behavior.

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.

1 participant