← Back to Skills Marketplace
chenbaiyujason

gemini-file

by chenbaiyujason · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
354
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install gemini-file
Description
Gemini CLI for one-shot Q&A, summaries, and generation.
README (SKILL.md)

Gemini CLI

Use Gemini in one-shot mode with a positional prompt (avoid interactive mode).

Quick start

  • gemini "Answer this question..."
  • gemini --model \x3Cname> "Prompt..."
  • gemini --output-format json "Return JSON"

File-output mode (for large token or explicit file return)

  • When content is large (e.g. long article/story/report) or user explicitly asks for file output, use:
  • python3 /Users/shichen/skills/gemini/gemini_file_runner.py --prompt "\x3Cprompt>"
  • Default model: gemini-3-flash-preview
  • For video parsing with large content (long video, dense transcripts, many segments), prefer gemini-3-flash-preview first.
  • Script behavior:
    • Always saves Gemini output to a file under outputs/ in this skill directory.
    • Always returns file_path (absolute path) in JSON.
    • Optionally returns content when --include-content is provided.
  • Optional args:
    • --model \x3Cmodel_name>
    • --output-format text|json
    • --output-file \x3Cfilename>
    • --output-dir \x3Cdir>
    • --include-content

Required response contract for this mode

  • Must include absolute file path from script JSON: file_path
  • Content in response is optional and controlled by --include-content

Example

  • User request: 使用 gemini 模型写 1000 字小说并输出文件给我
  • Command:
    • python3 /Users/shichen/skills/gemini/gemini_file_runner.py --prompt "写一篇约 1000 字中文小说,主题是..." --output-file novel-1000-words.txt
  • Expected JSON stdout:
    • {"ok":true,"file_path":"/Users/shichen/skills/gemini/outputs/novel-1000-words.txt"}

Video parsing example (large content)

  • User request: 请解析这个长视频并输出文件
  • Command:
    • python3 /Users/shichen/skills/gemini/gemini_file_runner.py --model gemini-3-flash-preview --prompt "解析视频内容并输出结构化总结..." --output-file video-analysis.txt

Extensions

  • List: gemini --list-extensions
  • Manage: gemini extensions \x3Ccommand>

Notes

  • If auth is required, run gemini once interactively and follow the login flow.
  • Avoid --yolo for safety.
Usage Guidance
This skill appears to do what it says: call the Gemini CLI and save results to a local file. Before installing, confirm you trust the gemini-cli Homebrew formula and the gemini executable (it will be invoked by the script). Be aware the skill will write files under its outputs/ directory in the skill folder. The SKILL.md includes a hardcoded example path (/Users/shichen/...), which is a documentation leftover — ensure your agent runs the included script (or adjust the path) rather than an arbitrary path on disk. If you need stronger assurance, inspect the gemini binary you install and review gemini_file_runner.py (it is short and readable) prior to use.
Capability Analysis
Type: OpenClaw Skill Name: gemini-file Version: 1.0.0 The skill bundle is classified as suspicious due to a path traversal vulnerability in gemini_file_runner.py. The script accepts --output-file and --output-dir arguments that are joined using pathlib without sanitization; because pathlib.Path join logic allows absolute paths to override the base, an attacker could manipulate the agent into overwriting arbitrary system files. Additionally, SKILL.md contains hardcoded absolute paths (/Users/shichen/...) specific to a single user's environment, which is a functional flaw and suggests the bundle was not properly audited for general use.
Capability Assessment
Purpose & Capability
Name/description (Gemini CLI one-shot Q&A, summaries, generation) align with the declared requirement of a gemini binary and a brew install of gemini-cli. Minor oddity: SKILL.md uses a hardcoded user-specific path (/Users/shichen/skills/gemini/...) in its examples, which is a documentation artifact but does not match the included script's relative location—this is sloppy but not fundamentally incoherent.
Instruction Scope
Runtime instructions and the included Python runner stay within scope: they invoke the gemini CLI, capture stdout, save it to a file in the skill's outputs/ directory, and emit a JSON response. Note the SKILL.md example directs running a script from an absolute, user-specific path; if an agent follows that exact path it could fail or run a different file if present. The script itself does not read other files, environment variables, or send data to external endpoints beyond invoking the gemini binary.
Install Mechanism
Install spec is a single Homebrew formula (gemini-cli) which produces the expected gemini binary — a low-risk, standard mechanism for installing a CLI.
Credentials
No environment variables, credentials, or config paths are required. The script does not reference secrets or unrelated credentials.
Persistence & Privilege
Skill does not request persistent/global privileges (always:false). It writes output files under its own outputs/ directory (normal behavior). Users should be aware the skill will create files on disk in the skill folder.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gemini-file
  3. After installation, invoke the skill by name or use /gemini-file
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of gemini-file skill integrating Gemini CLI with file-output support. - Supports one-shot prompts, summary, Q&A, and generation via Gemini CLI. - New file-output mode using `gemini_file_runner.py` script for large content or explicit file output requests. - Always returns absolute file path in JSON when using file-output mode; optionally includes file content. - Default model is `gemini-3-flash-preview`, recommended for large or complex tasks (e.g. video parsing). - Includes extension management commands and usage notes.
Metadata
Slug gemini-file
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is gemini-file?

Gemini CLI for one-shot Q&A, summaries, and generation. It is an AI Agent Skill for Claude Code / OpenClaw, with 354 downloads so far.

How do I install gemini-file?

Run "/install gemini-file" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is gemini-file free?

Yes, gemini-file is completely free (open-source). You can download, install and use it at no cost.

Which platforms does gemini-file support?

gemini-file is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created gemini-file?

It is built and maintained by chenbaiyujason (@chenbaiyujason); the current version is v1.0.0.

💬 Comments