gemini
Installation
SKILL.md
Gemini
Use the Cursor headless CLI (cursor agent --print) for one-shot autonomous execution.
Workflow
- Strip the leading
/geminitoken and preserve everything after it verbatim. - If the remaining prompt is empty, ask the user what Cursor should do.
- Resolve
scripts/run-cursor.shrelative to this skill directory and pipe the prompt to it on stdin. - Share Cursor's output with the user.
- 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/projectto run Cursor against a different working directory--mode planfor read-only planning/analysis (no file edits)--mode askfor 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
cursoris available onPATH - uses
--print --force --trust --output-format textfor clean headless execution - uses
--workspaceto 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
cursoris missing, tell the user that Cursor CLI is not installed or not onPATH. - Authentication uses the
CURSOR_API_KEYenv var or priorcursor agent login.