Add Gemini CLI extension support as a third platform#26
Open
myavalka wants to merge 2 commits into
Open
Conversation
Problem The plugin supports Codex and Claude Code from a single shared markdown source, but users on Google's Gemini CLI have no way to install or use it. Solution Add Gemini CLI as a third target while keeping the single-source philosophy. Gemini natively supports the Agent Skills standard, so the existing skills/ tree is consumed as-is with no duplication. New files: a root gemini-extension.json manifest, a lean GEMINI.md context file, and a /configure custom command as the onboarding entry point. The token-refresh hook is split into per-platform configs (hooks/hooks.json for Gemini's BeforeTool event, hooks/claude-hooks.json for Claude/Codex PreToolUse) because each platform warns on the other's event names; check-token.sh detects the platform from hook_event_name and emits Gemini's tool_input output schema when rewriting commands. Settings lookup becomes a three-way fallback across .codex/, .claude/, and .gemini/, and the SDK tracking header gains a gemini-cli-extension product. Docs, test scenarios, and the PR template are updated, and the version is bumped to 1.5.0 across all three manifests. Result Gemini CLI users can install the plugin with gemini extensions install https://github.com/spotify/ads-agentic-tools (or gemini extensions link for local development), with skills auto-activating from natural language and OAuth tokens refreshing automatically. Codex and Claude Code behavior is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Scenario 10's setup listed only the Codex and Claude settings files and named the hook event as PreToolUse, which does not exist on Gemini. Add the .gemini settings path and platform-aware hook event naming so the scenario is runnable on all three platforms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds Google Gemini CLI as a third supported platform alongside Codex and Claude Code, keeping the repo's single-source philosophy — Gemini natively supports the Agent Skills standard, so all 13 skills in
skills/are consumed as-is with no duplication or build step.New files
gemini-extension.json— root manifest read bygemini extensions install <repo-url>(no marketplace file needed)GEMINI.md— lean runtime context (settings paths, SDK header rule, setup pointer)commands/configure.toml—/configureonboarding entry point; all other skills auto-activate from natural languagehooks/claude-hooks.json— Claude/CodexPreToolUsehook config (see below)Changes
hooks/hooks.jsonis now Gemini-only (BeforeTool, Gemini's fixed auto-discovery path) andhooks/claude-hooks.jsonholds the Claude/CodexPreToolUseconfig, declared explicitly in both plugin manifests. A merged file was tried first, but Gemini warnsInvalid hook event name: "PreToolUse"on launch.check-token.shdetects the platform fromhook_event_name, takes the project dir from stdincwdon Gemini, uses a three-way settings fallback (.gemini/added), and emits Gemini'stool_inputoutput schema when rewriting commands.gemini-extension.jsonversion source, and thegemini-cli-extensionSDK product for theX-Spotify-Ads-Sdkheader.Testing done
gemini extensions link): extension loads, skills auto-activate from natural language, GEMINI.md context picked up, settings discovery falls back correctly and prompts for/configurewhen unconfigured, no startup warnings after the hook split.BeforeToolandPreToolUsepayloads: platform detection, three-way settings preference, and expiry detection all behave correctly on both paths.hooksfield instead of auto-discovery. Suggest taggingv1.5.0after merge and verifyinggemini extensions installfrom the GitHub URL.Checklist
🤖 Generated with Claude Code