feat(cli): add Gemini CLI skill support#221
Conversation
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>
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis 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 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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.""" |
There was a problem hiding this comment.
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.
| """Display instructions for Codex or Claude Code.""" | |
| """Display instructions for Codex, Claude, or Gemini.""" |
| if normalized in ("claude", "gemini") and REPO_ROOT_CLAUDE_SKILL.exists(): | ||
| return REPO_ROOT_CLAUDE_SKILL.read_text(encoding="utf-8") |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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 | 🟡 MinorHelp text still omits Gemini target.
The
--targethelp 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,
>= 2can 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
📒 Files selected for processing (12)
src/notebooklm/cli/agent.pysrc/notebooklm/cli/agent_templates.pysrc/notebooklm/cli/skill.pytests/e2e/test_chat.pytests/e2e/test_research_import_verification.pytests/e2e/test_source_selection.pytests/unit/cli/test_agent.pytests/unit/cli/test_skill.pytests/unit/test_auth.pytests/unit/test_client.pytests/unit/test_exceptions.pytests/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.""" |
There was a problem hiding this comment.
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.
| """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.
Summary
geminias a supported skill install target alongsideclaudeandagentsSKILL.mdformat (YAML frontmatter withname/description), so the existing file is reused — no new file needed~/.gemini/skills/notebooklm/SKILL.md(user scope) or.gemini/skills/notebooklm/SKILL.md(project scope)Changes
cli/skill.py: Added"gemini"entry toTARGETSdictcli/agent_templates.py: Added"gemini"toAGENT_TEMPLATE_FILES(maps toSKILL.md) and repo-root fallbackcli/agent.py: Added"gemini"toagent showcommand choicesTest plan
ruff format— cleanruff check— no issuesmypy— no issuespytest tests/unit/cli/test_skill.py tests/unit/cli/test_agent.py— 33/33 passedSummary by CodeRabbit
agent showcommand, allowing users to display Gemini agent skills.