mcpField
G
gemini

gemini

github.com/petekpAgent workflows4837 installsUpdated 2d ago
Repository

About gemini

A skill that routes one-shot tasks to Cursor’s headless CLI through a helper script. It is intended for users who want autonomous execution, planning, or Q&A from the current workspace or a specified project directory.

Key features

  1. 01Run Cursor headlessly for one-shot tasks
  2. 02Pass prompts through a helper script
  3. 03Choose plan or ask mode
  4. 04Set a project directory or model
  5. 05Return Cursor output and errors

Use cases

  1. 01Delegate a task from a skill invocation
  2. 02Request read-only planning or explanations
  3. 03Run Cursor against another project directory

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/petekp/claude-code-setup --skill gemini

After installing, type/geminiin Claude Code to confirm it loaded.

Bundled filesscripts/run-cursor.sh

Details

From the project README

Gemini

Use the Cursor headless CLI (cursor agent --print) for one-shot autonomous execution.

Workflow

  1. Strip the leading /gemini token and preserve everything after it verbatim.
  2. If the remaining prompt is empty, ask the user what Cursor should do.
  3. Resolve scripts/run-cursor.sh relative to this skill directory and pipe the prompt to it on stdin.
  4. Share Cursor's output with the user.
  5. If Cursor changed files or made a concrete recommendation, summarize the important result in plain language.

Invocation

Default invocation from the current working directory:

PROMPT="<everything after /gemini>"
printf '%s' "$PROMPT" | "<skill-dir>/scripts/run-cursor.sh"

Useful options:

  • --cd /path/to/project to run Cursor against a different working directory
  • --mode plan for read-only planning/analysis (no file edits)
  • --mode ask for Q&A explanations (read-only)
  • --model <model> to override the default model (e.g., gpt-5, sonnet-4, sonnet-4-thinking)

Behavior

The helper script:

  • checks that cursor is available on PATH
  • uses --print --force --trust --output-format text for clean headless execution
  • uses --workspace to set the working directory
  • captures stdout and stderr separately to a temp directory
  • returns only Cursor's text output on success
  • fails clearly if Cursor exits non-zero or produces no output

Notes

  • Do not describe this as a background dispatch unless you are actually using a background-capable shell tool.
  • If Cursor fails, show the relevant error output instead of silently retrying.
  • If cursor is missing, tell the user that Cursor CLI is not installed or not on PATH.
  • Authentication uses the CURSOR_API_KEY env var or prior cursor agent login.

Comments

Markdown supported