Gemini Prompting
Use this skill when gemini:gemini-rescue needs to ask Gemini for help via the task runtime.
Prompt Gemini like an analyst, not a collaborator with tool access. The plugin runs Gemini headless via gemini -p, so it cannot read files, run commands, or browse the working tree on its own. Everything Gemini sees has to be in the prompt text.
Core rules:
- Prefer one clear task per Gemini run. Split unrelated asks into separate runs.
- Tell Gemini what done looks like. Do not assume it will infer the desired end state.
- Keep prompts compact and block-structured with XML tags so the contract has stable shape.
- Inline any relevant code, log output, or file excerpts directly in the prompt — Gemini cannot fetch them.
- Add explicit grounding rules for any task where unsupported guesses would hurt quality (review, diagnosis, postmortem analysis).
- For follow-up requests, the plugin prepends the prior per-job transcript automatically; you only need to send the delta instruction.
Default prompt recipe:
<task>: the concrete job and the relevant repository or failure context (inlined).
<structured_output_contract> or <compact_output_contract>: exact shape, ordering, and brevity requirements.
<default_follow_through_policy>: what Gemini should do by default instead of asking routine questions.
<grounding_rules>: required for review, research, or anything that could drift into unsupported claims.
When to add blocks:
- Diagnosis or planning: add
<completeness_contract> and an <observable_evidence> block listing what you've inlined.
- Review or adversarial review: prefer the built-in
/gemini:review and /gemini:adversarial-review commands — those carry the review contract and JSON schema. Only fall back to task when the review needs a non-standard target or shape.
- Research or recommendation tasks: add
<research_mode> and <citation_rules> (cite the inlined evidence by line reference, not URL).
Working rules:
- Prefer explicit prompt contracts over vague nudges.
- Use stable XML tag names so the structure is recognizable across runs.
- Do not raise reasoning effort first. Tighten the prompt and grounding rules before escalating.
- Ask Gemini for brief, outcome-based progress updates only when the task is long-running.
- Keep claims anchored to inlined evidence. If something is a hypothesis, say so.
- For long-running follow-ups, lean on
--resume-last so the prior transcript is reused; the plugin truncates oldest turns when the transcript exceeds the cap.
Prompt assembly checklist:
- Define the exact task and scope in
<task>.
- Inline the evidence Gemini needs to answer — file excerpts, log slices, error messages, schemas.
- Choose the smallest output contract that still makes the answer easy to use.
- Decide whether Gemini should keep going by default or stop for missing high-risk details.
- Add grounding and verification tags only where the task needs them.
- Remove redundant instructions before sending the prompt.
Common antipatterns:
- Asking Gemini to "look at file X" — it cannot. Inline X (or a relevant slice) in the prompt instead.
- Asking Gemini to "run the tests and report" — it cannot. Run them yourself, inline the output, then ask Gemini to analyze.
- Restating the full prompt on every
--resume-last turn — the prior transcript is already prepended.
- Mixing several unrelated questions in one prompt — split them into separate
task runs.
1---2name: gemini-prompting3description: Internal guidance for composing Gemini prompts for planning, research, diagnosis, and review tasks inside the Gemini Claude Code plugin4---56# Gemini Prompting78Use this skill when `gemini:gemini-rescue` needs to ask Gemini for help via the `task` runtime.910Prompt Gemini like an analyst, not a collaborator with tool access. The plugin runs Gemini headless via `gemini -p`, so it cannot read files, run commands, or browse the working tree on its own. Everything Gemini sees has to be in the prompt text.1112Core rules:13- Prefer one clear task per Gemini run. Split unrelated asks into separate runs.14- Tell Gemini what done looks like. Do not assume it will infer the desired end state.15- Keep prompts compact and block-structured with XML tags so the contract has stable shape.16- Inline any relevant code, log output, or file excerpts directly in the prompt — Gemini cannot fetch them.17- Add explicit grounding rules for any task where unsupported guesses would hurt quality (review, diagnosis, postmortem analysis).18- For follow-up requests, the plugin prepends the prior per-job transcript automatically; you only need to send the delta instruction.1920Default prompt recipe:21- `<task>`: the concrete job and the relevant repository or failure context (inlined).22- `<structured_output_contract>` or `<compact_output_contract>`: exact shape, ordering, and brevity requirements.23- `<default_follow_through_policy>`: what Gemini should do by default instead of asking routine questions.24- `<grounding_rules>`: required for review, research, or anything that could drift into unsupported claims.2526When to add blocks:27- Diagnosis or planning: add `<completeness_contract>` and an `<observable_evidence>` block listing what you've inlined.28- Review or adversarial review: prefer the built-in `/gemini:review` and `/gemini:adversarial-review` commands — those carry the review contract and JSON schema. Only fall back to `task` when the review needs a non-standard target or shape.29- Research or recommendation tasks: add `<research_mode>` and `<citation_rules>` (cite the inlined evidence by line reference, not URL).3031Working rules:32- Prefer explicit prompt contracts over vague nudges.33- Use stable XML tag names so the structure is recognizable across runs.34- Do not raise reasoning effort first. Tighten the prompt and grounding rules before escalating.35- Ask Gemini for brief, outcome-based progress updates only when the task is long-running.36- Keep claims anchored to inlined evidence. If something is a hypothesis, say so.37- For long-running follow-ups, lean on `--resume-last` so the prior transcript is reused; the plugin truncates oldest turns when the transcript exceeds the cap.3839Prompt assembly checklist:401. Define the exact task and scope in `<task>`.412. Inline the evidence Gemini needs to answer — file excerpts, log slices, error messages, schemas.423. Choose the smallest output contract that still makes the answer easy to use.434. Decide whether Gemini should keep going by default or stop for missing high-risk details.445. Add grounding and verification tags only where the task needs them.456. Remove redundant instructions before sending the prompt.4647Common antipatterns:48- Asking Gemini to "look at file X" — it cannot. Inline X (or a relevant slice) in the prompt instead.49- Asking Gemini to "run the tests and report" — it cannot. Run them yourself, inline the output, then ask Gemini to analyze.50- Restating the full prompt on every `--resume-last` turn — the prior transcript is already prepended.51- Mixing several unrelated questions in one prompt — split them into separate `task` runs.