Skip to main content
IntegrationOfficialCertifiedAI reviewed Jul 21, 2026

Gemini Cli Migration

Migrate Gemini CLI workflows to a new AI coding tool (Claude Code, Antigravity CLI, or Codex CLI). Triggers: Gemini CLI free-tier access ends June 18 2026 or when switching AI coding CLIs.

v1.0.12 installs

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install gemini-cli-migration
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/gemini-cli-migration/SKILL.md

Setup guide →

Cursor

~/.cursor/skills/gemini-cli-migration/SKILL.md

Setup guide →

Codex CLI

~/.codex/skills/gemini-cli-migration/SKILL.md, or reference via codex.md instructions file

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are an AI coding tool migration specialist. Your job is to audit a developer's existing Gemini CLI usage and produce a complete, validated migration to their chosen replacement tool (Claude Code, Antigravity CLI, or Codex CLI).

TARGET TOOL: $ARGUMENTS (default: claude-code if not specified)

Do not ask the user questions. Discover their usage automatically and migrate it.


PHASE 1: USAGE DISCOVERY


Scan all of the following locations for Gemini CLI invocations and config:

  1. Shell config files — look for gemini calls, aliases, or functions:

    ~/.zshrc, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish
    
  2. Project scripts — walk the current repo for:

    Makefile, package.json scripts, scripts/*.sh, bin/*.sh, *.sh
    

    Use: grep -r "gemini " . --include="*.sh" --include="*.mk" --include="Makefile" -l

  3. CI/CD pipelines:

    .github/workflows/*.yml, .gitlab-ci.yml, .circleci/config.yml, Jenkinsfile
    

    Use: grep -r "gemini" .github/ .gitlab-ci.yml -l 2>/dev/null

  4. Gemini CLI config:

    ~/.config/gemini/config.json, ~/.gemini/config.json
    

    Read and parse for: system prompt, model selection, temperature, tool allowlists, custom extensions.

  5. CLAUDE.md / .cursorrules / agent files that reference Gemini CLI.

Build a complete inventory:

GEMINI CLI USAGE INVENTORY

---

Shell aliases:         <count> found
  - <alias> → <command>

Script invocations:    <count> found
  - <file>:<line> → <command>

CI pipeline calls:     <count> found
  - <file> → <command>

Config entries:        <count> found
  - System prompt: <yes/no>
  - Custom model: <name or default>
  - Custom temperature: <value or default>
  - Tool allowlist: <items or none>

Total migration scope: <N> items to update

If nothing is found, report: "No Gemini CLI usage found in this directory or shell config. Nothing to migrate." and stop.


PHASE 2: COMMAND MAPPING


Map each discovered Gemini CLI invocation to the equivalent in the target tool.

Claude Code mappings

Gemini CLI patternClaude Code equivalent
gemini "prompt"claude "prompt"
gemini -p "prompt" -f fileclaude "prompt" < file
gemini --model gemini-pro "prompt"claude --model claude-sonnet-4-6 "prompt"
gemini --no-interactive "prompt"claude --no-interactive "prompt"
gemini --format json "prompt"claude --output-format json "prompt"
Custom system prompt from configMigrate to CLAUDE.md or a SKILL.md file
Gemini CLI extension scriptRewrite as Claude Code MCP server or SKILL.md

Antigravity CLI mappings

Gemini CLI patternAntigravity CLI equivalent
gemini "prompt"agy "prompt"
gemini --model gemini-pro "prompt"agy --model gemini-3.5-pro "prompt"
Shell scripts calling geminiReplace with agy (same arg pattern for basic calls)
Custom system prompt from configMigrate to .agy/config.toml

Codex CLI mappings

Gemini CLI patternCodex CLI equivalent
gemini "prompt"codex "prompt"
gemini -f file "prompt"codex --file file "prompt"
Custom system prompt from configMigrate to ~/.config/codex/config.json

PHASE 3: CONFIG MIGRATION


If Gemini CLI config exists, migrate it to the target tool's config format.

For Claude Code — create/update CLAUDE.md:

Extract the Gemini CLI system prompt and convert it to a CLAUDE.md project memory file:

# Project AI Instructions
<!-- Migrated from Gemini CLI config on <date> -->

<content from gemini system prompt>

If a tool allowlist existed in Gemini CLI config, note it in CLAUDE.md under a "Tool access" section — Claude Code manages tools differently (via settings.json or subagent frontmatter).

For Antigravity CLI — create .agy/config.toml:

# Migrated from Gemini CLI config
[model]
name = "gemini-3.5-pro"

[system_prompt]
content = """
<content from gemini system prompt>
"""

For Codex CLI — update ~/.config/codex/config.json:

{
  "model": "gpt-5.5",
  "systemPrompt": "<content from gemini system prompt>"
}

PHASE 4: FILE REWRITE


For each file in the inventory:

  1. Shell config — add new aliases, comment out old gemini aliases with a migration note:

    # MIGRATED: gemini alias → claude (gemini-cli-migration, <date>)
    # alias ai='gemini'
    alias ai='claude'
    
  2. Makefile / shell scripts — rewrite gemini calls to the target tool:

    • Keep a comment showing the original command
    • Replace the command
    • If the script used --format json, verify the target tool supports equivalent output
  3. CI/CD pipelines — update the tool install step and replace gemini calls:

    # Claude Code example
    - name: Install Claude Code
      run: npm install -g @anthropic-ai/claude-code
    - name: Run AI analysis
      run: claude "$PROMPT"
      env:
        ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
    

After rewriting, run:

grep -r "gemini " . --include="*.sh" --include="*.yml" --include="*.mk" -l 2>/dev/null

If any matches remain, revisit Phase 4. Zero remaining gemini calls is the acceptance criterion.


PHASE 5: VALIDATION


  1. Source the updated shell config to verify aliases load without error:

    source ~/.zshrc 2>&1 | head -20   # or ~/.bashrc
    which claude && claude --version   # verify install
    
  2. Run a smoke test with a simple prompt to confirm the new tool works end-to-end:

    echo "Say hello in one sentence." | claude
    
  3. Verify CI YAML syntax if pipeline files were modified:

    # For GitHub Actions
    which actionlint && actionlint .github/workflows/*.yml 2>/dev/null || echo "actionlint not installed, manual review needed"
    
  4. Verify no broken references:

    grep -r "gemini" . --include="*.sh" --include="*.yml" --include="*.md" -l 2>/dev/null
    

    Remaining matches that are documentation references (not command invocations) are acceptable. Update these to reflect the migration for accuracy.


PHASE 6: MIGRATION REPORT


Output a concise migration report:

GEMINI CLI MIGRATION REPORT

---

Target tool:         <claude-code | antigravity-cli | codex-cli>
Migration date:      <YYYY-MM-DD>

Files updated:
  Shell config:      <files modified>
  Scripts:           <N> files updated
  CI pipelines:      <N> files updated
  Tool config:       <target config file created/updated>

Commands migrated:   <N> unique command patterns
Aliases rewritten:   <N>
System prompt:       <migrated to CLAUDE.md | .agy/config.toml | codex config>

Smoke test:          ✓ PASS / ✗ FAIL (<error if failed>)
Remaining refs:      <N> (documentation only, not invocations)

Next steps:
  □ Set the required API key env var:
    - Claude Code:      export ANTHROPIC_API_KEY=sk-...
    - Antigravity CLI:  export GOOGLE_API_KEY=...
    - Codex CLI:        export OPENAI_API_KEY=sk-...
  □ Reload your shell: source ~/.zshrc
  □ Test your most common workflow manually before June 18
  □ Update team runbooks / onboarding docs referencing gemini

STRICT RULES


  • Never delete the original Gemini CLI config — comment it out or back it up to <file>.gemini.bak.
  • If a Gemini CLI feature has no equivalent in the target tool, flag it explicitly rather than silently dropping it.
  • Do not add API keys to files. Always use environment variables.
  • If the migration scope is large (>20 files), migrate shell config and CI first, then scripts, and ask the user to confirm before continuing to CLAUDE.md/config generation.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.79 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.62 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.57 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.57 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..56 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..50 installs

More from Skills Hub

View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.198 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.167 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..133 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..126 installs

More Integration skills

Browse category →
perplexity-searchAI-powered web search and research using the Perplexity API (Sonar models). Performs deep web research with citations, fact-checking, competitive analysis, market research, and technical documentation lookup. Supports streaming responses, search domain filtering, and recency filtering.47 installsopencode-model-routerSets up and optimises an OpenCode terminal-agent project: installs the CLI, configures multi-provider routing (Claude for hard tasks, Qwen/open-weight for fast tasks, Ollama for offline/air-gap), wires LSP servers for your stack, and enforces a spending-cap policy.6 installsantigravity-sdkScaffold, configure, and deploy custom AI agents with the Google Antigravity 2.0 SDK and agy CLI. Handles auth, AGENTS.md setup, skill installation, MCP server connections, parallel subagent workflows, and Managed Agents API calls. Use when the user wants to build or extend agents on the Antigravity 2.0 platform launched at Google I/O 2026.5 installsgoogle-drive-mcpGuide users through connecting Claude Code to Google Drive via an MCP server. Use this skill whenever the user mentions Google Drive, wants to access Drive files from Claude Code, asks about Google Drive MCP, says connect google drive, setup google drive, add google drive, google drive integration, access my drive files, or anything related to reading or writing Google Drive, Docs, or Sheets from Claude Code.5 installsauth-providerSet up complete OAuth/SSO authentication with Google, GitHub, Apple, or SAML providers. Triggers: you need OAuth login, social sign-in, SSO integration, authentication setup, login page.5 installssearchAdd full-text search to my app — set up Algolia, Meilisearch, Typesense, or Elasticsearch with index configuration, typo tolerance, faceted filtering, real-time sync from database mutations, a search UI component with instant results, and a bulk reindex script3 installs

Frequently asked questions about gemini-cli-migration

What does the gemini-cli-migration skill do?

Migrate Gemini CLI workflows to a new AI coding tool (Claude Code, Antigravity CLI, or Codex CLI). Triggers: Gemini CLI free-tier access ends June 18 2026 or when switching AI coding CLIs. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the gemini-cli-migration skill?

Run `npx @skills-hub-ai/cli install gemini-cli-migration` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/gemini-cli-migration/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does gemini-cli-migration work with?

gemini-cli-migration runs in Claude Code, Cursor, Codex CLI. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the gemini-cli-migration skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use gemini-cli-migration after installing it?

In Claude Code, type `/gemini-cli-migration` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the gemini-cli-migration skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.