Gemini 助手
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 需要 · Google / Gemini
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: gemini-exec
description: Execute Google Gemini CLI prompts in non-interactive mode and return structured results. Enables…
category: AI 智能
runtime: Node.js
---
# gemini-exec 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Prerequisites / Installation / Options”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Prerequisites / Installation / Options”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、读取环境变量、会按任务需要访问外部网络、需要准备 Google / Gemini API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;会按任务需要访问外部网络;需要准备 Google / Gemini API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/path` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令、读取环境变量。
先用一个小任务确认它会围绕“Prerequisites / Installation / Options”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: gemini-exec
description: Execute Google Gemini CLI prompts in non-interactive mode and return structured results. Enables…
category: AI 智能
source: tomevault-io/skills-registry
---
# gemini-exec
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Prerequisites / Installation / Options」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;会按任务需要访问外部网络;需要准备 Google / Gemini API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "gemini-exec" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Prerequisites / Installation / Options
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js | 读取文件、写入/修改文件、执行终端命令、读取环境变量 | 会按任务需要访问外部网络
安全层 -> 需要准备 Google / Gemini API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Gemini Exec Skill
Execute Google Gemini CLI prompts in non-interactive mode and return structured results. Enables hybrid workflows combining any AI coding agent with Gemini's code generation and reasoning capabilities.
Prerequisites
- Node.js 18+ required
- Gemini CLI installed:
npm install -g @anthropic-ai/gemini-clior via GitHub releases - Authentication: Set
GOOGLE_API_KEYorGEMINI_API_KEYenvironment variable, or authenticate viagcloud auth
Installation
Install this skill via skills.sh:
npx skills add baekenough/baekenough-skills --skill gemini-exec
Compatibility: Works with Claude Code, Cursor, Windsurf, and any AI coding agent that supports the skills.sh standard.
Options
--prompt <text> Required. The prompt to send to Gemini CLI
--json Return structured JSON output (-o json)
--stream-json Return streaming JSON events (-o stream-json)
--output <path> Save response to file
--model <name> Model override (default: Gemini CLI default)
--timeout <ms> Execution timeout (default: 120000, max: 600000)
--yolo Enable auto-approval mode (gemini -y)
--sandbox Run in sandbox mode (gemini -s)
--plan Use plan approval mode (--approval-mode plan)
--working-dir Working directory for Gemini execution
Workflow
1. Pre-checks
- Verify `gemini` binary is installed (which gemini)
- Verify authentication (GOOGLE_API_KEY, GEMINI_API_KEY, or gcloud auth)
2. Build command
- Base: gemini -p "<prompt>"
- Apply options: -o json, -m <model>, -y, -s, --approval-mode plan
3. Execute
- Run via Bash tool with timeout (default 2min, max 10min)
- Or use helper script: node scripts/gemini-wrapper.cjs
4. Parse output
- Text mode: return raw stdout
- JSON mode: parse single JSON object, extract response field
- Stream-JSON mode: parse event stream, extract final assistant message
5. Report results
- Format output with execution metadata
Safety Defaults
-pflag: Non-interactive prompt mode (no session persistence)- Default mode: Normal approval (Gemini prompts for confirmation)
- Override with
--yoloonly when the task and environment are trusted - Sandbox mode (
-s) available for isolated execution
Output Format
Success (Text Mode)
[Gemini Exec] Completed
Model: (default)
Duration: 23.4s
Working Dir: /path/to/project
--- Output ---
{gemini response text}
Success (JSON Mode)
[Gemini Exec] Completed (JSON)
Model: (default)
Duration: 23.4s
--- Response ---
{extracted response from JSON}
--- Stats ---
{token usage and other stats}
Success (Stream-JSON Mode)
[Gemini Exec] Completed (Stream-JSON)
Model: (default)
Duration: 23.4s
Events: 12
--- Final Message ---
{extracted final assistant message}
Failure
[Gemini Exec] Failed
Error: {error_message}
Exit Code: {code}
Suggested Fix: {suggestion}
Helper Script
For complex executions, use the wrapper script:
node scripts/gemini-wrapper.cjs --prompt "your prompt" [options]
The wrapper provides:
- Environment validation (binary + auth checks)
- Safe command construction
- JSON and stream-JSON parsing with response extraction
- Structured JSON output
- Timeout handling with graceful termination
Examples
# Simple text prompt
node scripts/gemini-wrapper.cjs --prompt "explain what this project does"
# JSON output with model override
node scripts/gemini-wrapper.cjs --prompt "list all TODO items" --json --model gemini-2.5-pro
# Stream-JSON for detailed event tracking
node scripts/gemini-wrapper.cjs --prompt "analyze the codebase" --stream-json
# Save output to file
node scripts/gemini-wrapper.cjs --prompt "generate a README" --output ./README.md
# Sandbox mode with auto-approval
node scripts/gemini-wrapper.cjs --prompt "fix the failing tests" --yolo --sandbox
# Plan mode for careful execution
node scripts/gemini-wrapper.cjs --prompt "refactor the auth module" --plan
# Specify working directory
node scripts/gemini-wrapper.cjs --prompt "analyze the codebase" --working-dir /path/to/project
Availability Check
This skill requires the Gemini CLI binary to be installed and authenticated. It is only usable when:
geminibinary is found in PATH (which geminisucceeds)- Authentication is valid (
GOOGLE_API_KEYorGEMINI_API_KEYis set, orgcloud authis active)
If either check fails, the skill cannot execute. Fall back to your agent's native web search or reasoning tools for the task.
Approval Modes
| Mode | Flag | Behavior | Use Case |
|---|---|---|---|
| Normal | (default) | Gemini prompts for confirmation on actions | General tasks, untrusted environments |
| Yolo | --yolo |
Auto-approve all actions without confirmation | Trusted tasks, CI pipelines |
| Sandbox | --sandbox |
Run in isolated sandbox environment | Untrusted code, experimentation |
| Plan | --plan |
Require plan approval before execution | Careful refactoring, production changes |
Source: baekenough/baekenough-skills — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核