Skip to content
Skills Library
AI & agents · Conversion & formats

migrating-gemini-extensions

/migrating-gemini-extensions

Convert a Gemini CLI extension into a Claude Code plugin, preserving functionality and backwards compatibility. Use when the user wants to migrate/port a Gemini extension to Claude Code, convert gemini-extension.json to plugin.json, adapt GEMINI.md context or Gemini tools/hooks, or mentions "gemini-extension.json", "GEMINI.md", or "migrate Gemini".

Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Convert a Gemini CLI extension into a Claude Code plugin, preserving functionality and backwards compatibility. Use when the user wants to migrate/port a Gemini extension to Claude Code, convert gemini-extension.json to plugin.json, adapt GEMINI.md context or Gemini tools/hooks, or mentions "gemini-extension.json", "GEMINI.md", or "migrate Gemini".

Triggers from the description

gemini-extension.jsonGEMINI.mdmigrate Gemini
Original author description

Convert a Gemini CLI extension into a Claude Code plugin, preserving functionality and backwards compatibility. Use when the user wants to migrate/port a Gemini extension to Claude Code, convert gemini-extension.json to plugin.json, adapt GEMINI.md context or Gemini tools/hooks, or mentions "gemini-extension.json", "GEMINI.md", or "migrate Gemini".

How it works

  1. Phase 1 — Analysis
  2. Phase 2 — Structure
  3. Phase 3 — Convert the manifest
  4. Phase 4 — Migrate the context file (prefer a skill)
  5. Phase 5 — Migrate MCP servers
  6. Phase 6 — Update docs
  7. Phase 7 — Test
  8. Checklist
  9. Common issues
  10. Reference
Original SKILL.md headings · 128 lines, 528 words
SKILL.md preview
---
name: migrating-gemini-extensions
description: Convert a Gemini CLI extension into a Claude Code plugin, preserving functionality and backwards compatibility. Use when the user wants to migrate/port a Gemini extension to Claude Code, convert gemini-extension.json to plugin.json, adapt GEMINI.md context or Gemini tools/hooks, or mentions "gemini-extension.json", "GEMINI.md", or "migrate Gemini".
---

# Migrating a Gemini Extension to a Claude Code Plugin

Preserve functionality while adopting Claude Code best practices. Keep `gemini-extension.json` for
backwards compatibility.

## Phase 1 — Analysis

1. Read the existing structure: `gemini-extension.json`, any context file (e.g. `GEMINI.md`),
   commands, MCP servers/tools, custom scripts.
2. Map components: Gemini context → Claude skill (preferred) or commands/agents; Gemini tools → MCP
   servers; Gemini scripts → hook scripts.

## Phase 2 — Structure

```
plugin-name/
├── .claude-plugin/
│   └── plugin.json        # NEW: Claude manifest (source of truth)
├── gemini-extension.json  # KEEP: backwards compatibility
├── skills/                # NEW (preferred): convert context → a skill
├── commands/              # optional: convert context → commands
├── hooks/
│   ├── hooks.json         # if you keep SessionStart context loading
│   └── scripts/           # ADAPT: update paths to ${CLAUDE_PLUGIN_ROOT}
└── README.md              # UPDATE: add Claude install instructions
```

## Phase 3 — Convert the manifest

`gemini-extension.json` → `.claude-plugin/plugin.json`:

```json
{
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
  "name": "plugin-name",
  "version": "1.0.0",
  "description": "Description",
  "author": { "name": "...", "url": "https://github.com/..." },
  "homepage": "...",
  "repository": "...",
  "license": "MIT",
  "keywords": ["..."]
}
```

## Phase 4 — Migrate the context file (prefer a skill)

**Preferred:** turn `GEMINI.md` into a `skills/<name>/SKILL.md` with frontmatter describing when it
should activate. This loads only when relevant instead of every session. See
`../plugin-authoring/references/best-practices.md` for why skills beat SessionStart hooks.

**Legacy alternative — SessionStart hook** (only if you must load context every session):

```json
{
  "description": "Load usage instructions at session start",
  "hooks": {
    "SessionStart": [
      { "matcher": "startup",
        "hooks": [ { "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/context.sh", "timeout": 10 } ] }
    ]
  }
}
```

```bash
#!/usr/bin/env bash
set -euo pipefail
CONTEXT_FILE="${CLAUDE_PLUGIN_ROOT}/hooks/CONTEXT.md"
if [ -f "$CONTEXT_FILE" ]; then
  jq -n --arg context "$(cat "$CONTEXT_FILE")" \
    '{ "hookSpecificOutput": { "hookEventName": "SessionStart", "additionalContext": $context } }'
fi
```

Then `chmod +x hooks/context.sh`.

## Phase 5 — Migrate MCP servers

Gemini tools → inline `mcpServers` (or `.mcp.json`):

```json
{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "@package/name"],
      "env": { "API_KEY": "${PLUGIN_API_KEY:-}" }
    }
  }
}
```

Key changes: `${CLAUDE_PLUGIN_ROOT}` for local paths, `${VAR:-}` for optional env vars, `npx -y` for
npm packages.

## Phase 6 — Update docs

Add a Claude Code install section to the README (marketplace add + `/plugin install ...`) and keep
the Gemini CLI section for backwards compatibility.

## Phase 7 — Test

- Claude Code: `claude --debug`, `/plugin list`, run the plugin's components.
- Gemini CLI still works: `gemini ext list`.
- Confirm commands, hooks, and MCP servers behave.

## Checklist

- [ ] Create `.claude-plugin/plugin.json`; keep `gemini-extension.json`.
- [ ] Convert context to a skill (or SessionStart hook); make hook scripts executable.
- [ ] Update paths to `${CLAUDE_PLUGIN_ROOT}`; migrate MCP config.
- [ ] Update README (both install methods); update CHANGELOG.
- [ ] Test with Claude Code and Gemini CLI. Submit an upstream PR for third-party extensions.

## Common issues

- **Context not loading** → hook script not executable or bad JSON output.
- **MCP server won't start** → paths not using `${CLAUDE_PLUGIN_ROOT}`, or command missing.
- **Commands not appearing** → `commands/` nested in `.claude-plugin/` instead of at root.

## Reference

- `docs/lessons-learned/context7.md` — a complete migration example.
- [Claude Code Plugin Documentation](https://docs.claude.com/en/docs/claude-code/plugins)
- [MCP Documentation](https://modelcontextprotocol.io/)

Versions

The database has no other skills named migrating-gemini-extensions.

Database snapshot: 13.11.2026 · package version aba2f971d7ee (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gemini-cli
    Run Gemini CLI for AI queries. Use when user asks to "run/ask/use gemini", compare Claude vs Gemini, or delegate tasks to Gemini.
  • 100working-with-gemini
    Use when working with Gemini CLI or Antigravity CLI — extensions, skills, hooks, GEMINI.md, configuration, models, or any Gemini/Antigravity feature
  • 100gemini
    Use when the user asks to run Gemini CLI (gemini, gemini resume) or references Google Gemini for code analysis, refactoring, or automated editing
  • 90Gemini Framework
    Reference knowledge for Google Gemini CLI compatibility. Describes how Gemini CLI discovers context (GEMINI.md), configures settings.json, and overrides its system prompt so Forge can interoperate on a dual-platform project. Use when a user asks how Forge coexists with Gemini…
  • 100gemini-cli-helper
    Run Gemini CLI commands from Claude with correct Node version. Use when user asks to run Gemini CLI, test Gemini traces, or debug Gemini telemetry.
  • 90Claude Code Plugin Builder
    Creates Claude Code plugins with proper manifest structure, directory layout, and components (commands, agents, skills, hooks, MCP servers). This is for Claude Code plugins (`.claude-plugin/plugin.json`) — for Codex plugins (`.codex-plugin/plugin.json`) use the `plugin-creator`…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.