feat(gemini): add Gemini CLI as sixth target provider

Add `--to gemini` support for both `convert` and `install` commands,
converting Claude Code plugins into Gemini CLI-compatible format.

- Agents convert to `.gemini/skills/*/SKILL.md` with description frontmatter
- Commands convert to `.gemini/commands/*.toml` with TOML prompt format
- Namespaced commands create directory structure (workflows:plan -> workflows/plan.toml)
- Skills pass through unchanged (identical SKILL.md standard)
- MCP servers written to `.gemini/settings.json` with merge support
- Content transforms: .claude/ paths, Task calls, @agent references
- Hooks emit warning (different format in Gemini)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kieran Klaassen
2026-02-14 20:33:21 -08:00
parent 134a994c08
commit 201ad6d0fb
8 changed files with 822 additions and 2 deletions

27
src/types/gemini.ts Normal file
View File

@@ -0,0 +1,27 @@
export type GeminiSkill = {
name: string
content: string // Full SKILL.md with YAML frontmatter
}
export type GeminiSkillDir = {
name: string
sourceDir: string
}
export type GeminiCommand = {
name: string // e.g. "plan" or "workflows/plan"
content: string // Full TOML content
}
export type GeminiBundle = {
generatedSkills: GeminiSkill[] // From agents
skillDirs: GeminiSkillDir[] // From skills (pass-through)
commands: GeminiCommand[]
mcpServers?: Record<string, {
command?: string
args?: string[]
env?: Record<string, string>
url?: string
headers?: Record<string, string>
}>
}