Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计未展示

geminiGemini 助手

Agent Skill

gemini 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

339

周安装

14

GitHub Stars

公开资料未说明

下载量

111
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gemini(Gemini 助手)
来源仓库:https://github.com/lucklyric/cc-dev-tools
仓库路径:skills/gemini
安装命令:
npx skills add lucklyric/cc-dev-tools --skill "gemini"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add lucklyric/cc-dev-tools --skill "gemini"

简介

用于发现与安装 AI 代理技能的搜索工具。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 环境。
  • 根据关键词返回候选技能列表供用户选择。gemini 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装前请检查宿主兼容性与网络连接状态。
  • 部分技能可能需要额外 API 密钥配置。

SKILL.md

Gemini: Google AI Assistant for Claude Code


DEFAULT MODEL: Gemini 3.1 Pro

The default model for ALL Gemini invocations is gemini-3.1-pro-preview.

  • Always use gemini-3.1-pro-preview unless user explicitly requests another model
  • This is the highest reasoning model available (released Feb 19, 2026)
  • CLI default (without -m) is gemini-3-flash-preview (fast but less capable)
  • Fallback chain: gemini-3.1-pro-previewgemini-3-pro-previewgemini-2.5-flash
# Default invocation - ALWAYS use gemini-3.1-pro-preview
gemini -m gemini-3.1-pro-preview "your prompt here"

CRITICAL: Headless Mode with -p Flag

REQUIRED: Use -p/--prompt flag for non-interactive (headless) execution in Claude Code.

As of Gemini CLI v0.29.0+, positional prompts default to interactive mode. The -p flag is the correct way to run in non-interactive (headless) mode.

Examples:

  • gemini -m gemini-3.1-pro-preview -p "prompt" (CORRECT - headless mode)
  • gemini -m gemini-3.1-pro-preview "prompt" (also works when piped, but -p is more explicit)
  • gemini -r latest (session resume)

Why? As of v0.29.0, the CLI description states: "Defaults to interactive mode. Use -p/--prompt for non-interactive (headless) mode." The -p flag is no longer deprecated.


IMPORTANT: Preview Features & OAuth Free Tier

For OAuth free tier users in headless mode:

When previewFeatures: true in ~/.gemini/settings.json, the CLI routes ALL requests to Gemini 3.1 Pro (even -m gemini-2.5-pro). Since free tier doesn't have Gemini 3 access, this causes 404 errors.

Solution: Disable preview features for reliable headless operation:

// ~/.gemini/settings.json
{
  "general": {
    "previewFeatures": false
  }
}

Plugin Behavior: This skill automatically falls back to gemini-2.5-flash when encountering 404 errors. Flash always works with OAuth free tier.


Trigger Examples

This skill activates when users say phrases like:

  • "Use gemini to research this topic"
  • "Ask gemini about this design pattern"
  • "Run gemini on this analysis"
  • "Call gemini for help with this problem"
  • "I need Google AI for this task"
  • "Get Gemini's reasoning on this"
  • "Continue with gemini" or "Resume the gemini session"
  • "Gemini, help me with..." or simply "Gemini"
  • "Use Gemini 3" or "Use Gemini 2.5"

When to Use This Skill

This skill should be invoked when:

  • User explicitly mentions "Gemini" or requests Gemini assistance
  • User needs Google's AI models for reasoning, research, or analysis
  • User requests complex problem-solving or architectural design
  • User needs research capabilities with web search integration
  • User wants to continue a previous Gemini conversation
  • User needs an alternative to Codex or Claude for specific tasks

How It Works

Detecting New Gemini Requests

When a user makes a request, default to read-only mode (default approval) unless they explicitly request file editing:

Use gemini-3.1-pro-preview for ALL tasks with default approval mode:

  • Architecture, design, reviews, research
  • Explanations, analysis, problem-solving
  • Code analysis and understanding
  • ANY task where user does NOT explicitly request file editing

Approval Mode Selection:

  • default (default): For all tasks - prompts for approval on edits (safe)
  • auto_edit: ONLY when user explicitly requests file editing
  • plan: Read-only mode - no file modifications allowed
  • yolo: When user explicitly wants full auto-approval (use with caution)

⚠️ Explicit Edit Request: If the user explicitly asks to "edit files", "modify code", "write changes", or "make edits" - ONLY then use --approval-mode auto_edit to enable file modifications.

Fallback Chain (if primary unavailable):

  1. gemini-3.1-pro-preview (primary - highest capability)
  2. gemini-2.5-pro (stable general reasoning)
  3. gemini-2.5-flash (fast, always available)

Example requests: "Design a distributed cache", "Explain CQRS pattern", "Analyze this code"

Bash CLI Command Structure

IMPORTANT: Gemini CLI works differently from Codex - no exec subcommand needed. Use positional prompts directly.

Default Command (Read-Only) - Use for ALL Tasks

gemini -m gemini-3.1-pro-preview \
  "Design a microservices architecture for e-commerce"

Explicit Edit Request Only - When User Asks to Edit Files

gemini -m gemini-3.1-pro-preview \
  --approval-mode auto_edit \
  "Edit this file to refactor the function"

For Session Continuation

# Resume most recent session
gemini -r latest

# Resume specific session by index
gemini -r 3

# Resume and add new prompt
gemini -r latest "Continue our discussion about caching strategies"

Why positional prompts?

  • Simpler, more direct syntax
  • Future-proof (recommended by Gemini CLI)
  • Works in non-TTY environments (like Claude Code's bash)
  • No separate exec command needed

Model Selection Logic

Use gemini-3.1-pro-preview (default for ALL tasks):

  • Code editing, refactoring, implementation
  • Designing architecture or system design
  • Conducting research or analysis
  • Explaining complex concepts
  • Planning implementation strategies
  • General problem-solving and advanced reasoning

Fallback to gemini-2.5-pro when:

  • Gemini 3.1 Pro unavailable or quota exhausted
  • User explicitly requests "Gemini 2.5" or "use 2.5"
  • Stable, production-ready tasks

Fallback to gemini-2.5-flash when:

  • Both Gemini 3.1 Pro and 2.5 Pro unavailable
  • Fast iterations needed (explicit user request)
  • Simple, quick responses (explicit user request)

Version-Based Model Mapping

When users mention a version number, map to the latest model in that family:

User RequestMaps ToActual Model ID
"use 3" / "Gemini 3"Latest 3.x Progemini-3.1-pro-preview
"use 2.5"2.5 Progemini-2.5-pro
"use flash"2.5 Flashgemini-2.5-flash
No version specifiedLatest Pro (ALL tasks)gemini-3.1-pro-preview

See: references/model-selection.md for detailed model selection guidance and decision tree.

Default Configuration

All Gemini invocations use these defaults unless user specifies otherwise:

ParameterDefault ValueCLI FlagNotes
Modelgemini-3.1-pro-preview-m gemini-3.1-pro-previewFor ALL tasks (highest capability)
Model (fallback 1)gemini-2.5-pro-m gemini-2.5-proIf Gemini 3.1 Pro unavailable
Model (fallback 2)gemini-2.5-flash-m gemini-2.5-flashAlways works on free tier
Approval Mode (default)defaultNo flagSafe default - prompts for edits
Approval Mode (editing)auto_edit--approval-mode auto_editOnly when user explicitly requests editing
Sandboxfalse (disabled)No flagSandbox disabled by default
Output FormattextNo flagHuman-readable text output
Web SearchEnabled when appropriate-e web_search (if needed)Context-dependent

Rationale for Defaults:

  • Gemini 3.1 Pro for ALL tasks: Highest capability model, optimized for both reasoning and code
  • Fallback chain: gemini-3.1-pro-preview → gemini-2.5-pro → gemini-2.5-flash
  • default mode: Safe default that prompts for approval on edits
  • auto_edit mode: Only use when user explicitly requests file editing
  • No sandbox: Claude Code environment assumed trusted
  • Text output: Default for human consumption (use --output-format json for parsing)

Note: If you have previewFeatures: true in settings, disable it for reliable headless operation (see warning above).

Error Handling

The skill handles these common errors gracefully:

CLI Not Installed

Error: command not found: gemini

Message: "Gemini CLI not installed. Install from: https://github.com/google-gemini/gemini-cli"

Action: User must install Gemini CLI before using this skill

Authentication Required

Error: Output contains "auth" or "authentication"

Message: "Authentication required. Run: gemini login to authenticate with your Google account"

Action: User must authenticate via OAuth or API key

Rate Limit Exceeded

Error: Output contains "quota" or "rate limit" or status 429

Message: "Rate limit exceeded (60 req/min, 1000 req/day free tier). Retry in X seconds or upgrade account."

Action: Wait for rate limit reset or upgrade to paid tier

Model Unavailable

Error: Output contains "model not found" or "404" or status 403

Message: "Model unavailable. Trying fallback model..."

Action: Automatically retry with fallback:

  • gemini-3.1-pro-preview unavailable → try gemini-2.5-pro
  • gemini-2.5-pro unavailable → try gemini-2.5-flash

Session Not Found

Error: Using -r flag but session doesn't exist

Message: "Session not found. Use gemini --list-sessions to see available sessions."

Action: User should list sessions or start new session

Gemini 3.1 Pro Access Denied

Error: Status 403 or "preview access required"

Message: "Gemini 3.1 Pro requires preview access. Enable Preview Features in settings or use gemini-2.5-pro instead."

Action: Either enable preview features, get API key, or use 2.5 models

See: references/gemini-help.md for complete CLI reference and troubleshooting.


Examples

Basic Invocation (General Reasoning)

# Design system architecture
gemini -m gemini-3.1-pro-preview "Design a scalable payment processing system"

# Research with web search
gemini -m gemini-3.1-pro-preview -e web_search "Research latest React 19 features"

# Explain complex concept
gemini -m gemini-3.1-pro-preview "Explain the CAP theorem with real-world examples"

Code Editing Tasks

# Refactoring (uses gemini-3.1-pro-preview for all tasks)
gemini -m gemini-3.1-pro-preview "Refactor this function for better readability"

# Fix syntax errors
gemini -m gemini-3.1-pro-preview "Fix the syntax errors in this JavaScript code"

# Optimize performance
gemini -m gemini-3.1-pro-preview "Optimize this database query for better performance"

Session Management

# Start a session (automatic)
gemini -m gemini-3.1-pro-preview "Design an authentication system"

# List available sessions
gemini --list-sessions

# Resume most recent
gemini -r latest

# Resume specific session
gemini -r 3

# Continue with new prompt
gemini -r latest "Now help me implement the login flow"

With Output Formatting

# JSON output for parsing
gemini -m gemini-3.1-pro-preview --output-format json "List top 5 design patterns"

# Streaming JSON for real-time
gemini -m gemini-3.1-pro-preview --output-format stream-json "Explain async patterns"

Approval Modes

# Default mode (prompt for all)
gemini -m gemini-3.1-pro-preview --approval-mode default "Review this code"

# Auto-edit (auto-approve edits only)
gemini -m gemini-3.1-pro-preview --approval-mode auto_edit "Refactor this module"

# Plan mode (read-only, no file modifications)
gemini -m gemini-3.1-pro-preview --approval-mode plan "Analyze this codebase"

# YOLO mode (auto-approve ALL - use with caution)
gemini -m gemini-3.1-pro-preview --approval-mode yolo "Deploy to production"

Sandbox Mode

# Enable sandbox for untrusted code
gemini -m gemini-3.1-pro-preview -s "Analyze this suspicious code snippet"

# Disabled by default (trusted environment)
gemini -m gemini-3.1-pro-preview "Review this internal codebase"

Extensions & MCP Integration

Gemini CLI supports extensions and Model Context Protocol (MCP) servers for enhanced functionality.

# List available extensions
gemini --list-extensions

# Use specific extensions (web search, code analysis, etc.)
gemini -m gemini-3.1-pro-preview -e web_search "Research React 19 features"

# Use all extensions (default)
gemini -m gemini-3.1-pro-preview "Design system architecture"

Note: This plugin does not implement custom extensions or MCP servers. Users can configure extensions and MCP servers through the Gemini CLI's standard configuration in ~/.gemini/settings.json. Extensions are enabled by default when appropriate for the task.

Skills Management (gemini skills) (v0.32.1+)

Gemini CLI supports agent skills - reusable capabilities that extend the agent's abilities. Manage skills through the CLI:

# List available skills
gemini skills list

# Install a skill
gemini skills install <source>

# Enable/disable a skill
gemini skills enable <name>
gemini skills disable <name>

Note: Skills in Gemini CLI are agent-level capabilities (like file operations, code execution), distinct from Claude Code plugin skills. Configure skills in ~/.gemini/settings.json.

Hooks Management (gemini hooks) (v0.32.1+)

Gemini CLI supports hooks - event-driven automation that runs at specific points during agent execution. Manage hooks through the CLI:

# Migrate hooks from Claude Code to Gemini CLI
gemini hooks migrate

# Get help on hooks management
gemini hooks --help

Note: Gemini CLI hooks are similar to Claude Code hooks. Use gemini hooks migrate to migrate existing Claude Code hooks. Configure hooks in ~/.gemini/settings.json.

Additional Directories (--include-directories) (v0.20.0+)

Include additional directories in workspace context:

# Single directory
gemini -m gemini-3.1-pro-preview --include-directories /shared/libs "task"

# Multiple directories (comma-separated)
gemini -m gemini-3.1-pro-preview --include-directories /path1,/path2 "task"

# Multiple directories (repeated flag)
gemini -m gemini-3.1-pro-preview --include-directories /path1 --include-directories /path2 "task"

Note: Disabled in restrictive sandbox profiles.


File Context Passing

IMPORTANT: Pass file paths to Gemini CLI instead of embedding file content in prompts. This enables Gemini to read files autonomously.

Quick reference:

  • Use --include-directories /path for additional directories
  • Use @path/to/file syntax for explicit file references
# Example: analyze file with explicit @ syntax
gemini -m gemini-3.1-pro-preview \
  "Analyze @src/auth.ts and compare with @src/session.ts"

# Example: multi-directory analysis
gemini -m gemini-3.1-pro-preview \
  --include-directories /shared/libs \
  "Review how auth module uses shared utilities"

See: references/file-context.md for complete file context documentation.


Accessibility (--screen-reader) (v0.20.0+)

Enable screen reader mode for accessibility:

gemini -m gemini-3.1-pro-preview --screen-reader "task"

Interactive with Prompt (-i/--prompt-interactive) (v0.20.0+)

Execute a prompt and continue in interactive mode:

gemini -m gemini-3.1-pro-preview -i "initial prompt here"

⚠️ Not applicable for Claude Code: This flag requires an interactive terminal and will not work in Claude Code's non-interactive bash environment. Use standard positional prompts instead.

Experimental ACP Mode (--experimental-acp)

Start agent in Agent Control Protocol mode for programmatic interaction:

gemini --experimental-acp "task"

Note: Experimental feature. Works with GEMINI_API_KEY environment variable.


Reference Documentation

For detailed information, consult these reference files:

Core References

  • references/file-context.md - File and directory context passing guide
  • references/model-selection.md - Model selection decision tree and version mapping

Workflow References

  • references/command-patterns.md - Common command templates organized by use case
  • references/session-workflows.md - Multi-turn conversation patterns and best practices

CLI References

  • references/gemini-help.md - Complete Gemini CLI help output and flag reference

Tips & Best Practices

  1. Always Specify Model: Use -m flag explicitly for predictable behavior
  2. Use -p for Headless Mode: Use gemini -p "prompt" for non-interactive execution in Claude Code
  3. Enable Web Search When Needed: Add -e web_search for research tasks
  4. Resume Sessions for Complex Tasks: Use -r latest for multi-turn conversations
  5. Start with Gemini 3.1 Pro: Default to gemini-3.1-pro-preview, fallback to 2.5 models
  6. Use Appropriate Approval Mode: default for all tasks, auto_edit only when user explicitly requests file editing
  7. Monitor Rate Limits: 60 req/min, 1000 req/day on free tier
  8. Check CLI Availability: Validate command -v gemini before invocation

Differences from Codex

FeatureCodex CLIGemini CLI
Invocationcodex exec "prompt"gemini "prompt"
SubcommandRequired (exec)Not needed
Positional PromptsNot supportedPreferred
Session Resumecodex exec resume --lastgemini -r latest
ModelsGPT-5.4, GPT-5.4-FastGemini 3.1 Pro, 2.5 Pro/Flash
ProviderOpenAI (via Codex)Google

When to Use Gemini vs Codex vs Claude

Use Gemini when:

  • You need Google's latest models
  • Research with web search is important
  • You prefer Google's AI capabilities
  • Codex is unavailable or rate-limited
  • Task benefits from Gemini's strengths

Use Codex when:

  • You need GPT-5.4's frontier reasoning capabilities
  • Complex coding tasks with GPT-5.4 (unified model for code and general tasks)
  • Code editing with specific Codex optimizations
  • You're already using Codex workflow

Use Claude (native) when:

  • Simple queries within Claude Code's capabilities
  • No external AI needed
  • Quick responses preferred
  • Task doesn't require specialized models

Version Compatibility

Minimum Gemini CLI: v0.33.0

FeatureMinimum VersionNotes
Core functionalityv0.20.0+Positional prompts, session resume
--include-directoriesv0.20.0+Workspace expansion
--screen-readerv0.20.0+Accessibility mode
--approval-mode planv0.32.1+Read-only mode
gemini skillsv0.32.1+Skills management
gemini hooksv0.32.1+Hooks management
Plan mode research subagentsv0.33.0+Built-in research subagents in plan mode
Plan copy subcommandv0.33.0+Copy plans
30-day chat history retentionv0.33.0+Default retention for chat history

For questions or issues, consult references/gemini-help.md or run gemini --help.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

26.46%
按下载量换算29

Codex

24.55%
按下载量换算27

Claude Code

18.41%
按下载量换算20

Antigravity

12.3%
按下载量换算14

Gemini CLI

7.01%
按下载量换算8

windsurf

3.43%
按下载量换算4

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills