ask-gemini

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ask Gemini

使用Gemini

Executes the local
gemini
CLI to get coding assistance.
Note: This skill requires the
gemini
CLI to be installed and available in your system's PATH.
执行本地
gemini
CLI以获取编码辅助支持。
注意: 本Skill要求已安装
gemini
CLI,且其已添加至系统PATH中。

Quick start

快速开始

Run a single query using positional prompt:
bash
gemini "Your question or task here"
使用位置参数提示符运行单次查询:
bash
gemini "Your question or task here"

Common options

常用选项

OptionDescription
-m MODEL
Specify model
-y, --yolo
Auto-approve all tool executions
For all available options, run
gemini --help
选项描述
-m MODEL
指定模型
-y, --yolo
自动批准所有工具执行操作
如需查看所有可用选项,请运行
gemini --help

Examples

示例

Ask a coding question:
bash
gemini "How do I implement a binary search in Python?"
Use a specific model:
bash
gemini -m gemini-2.5-pro "Review this code for potential issues"
Let Gemini make changes automatically:
bash
gemini -y "Refactor this function to use async/await"
提出编码问题:
bash
gemini "How do I implement a binary search in Python?"
使用特定模型:
bash
gemini -m gemini-2.5-pro "Review this code for potential issues"
让Gemini自动执行修改:
bash
gemini -y "Refactor this function to use async/await"

Notes

注意事项

  • Positional prompts run Gemini non-interactively and output result to stdout
  • Gemini CLI uses the
    GEMINI_API_KEY
    environment variable for authentication
  • Use
    -y/--yolo
    for automatic execution without confirmation prompts
  • The command inherits the current working directory
  • 使用位置参数提示符将以非交互模式运行Gemini,并将结果输出至stdout
  • Gemini CLI使用
    GEMINI_API_KEY
    环境变量进行身份验证
  • 使用
    -y/--yolo
    可无需确认提示自动执行操作
  • 该命令将继承当前工作目录