Gemini Prompting
Use this skill when gemini:gemini-delegate needs to compose a prompt for the Gemini companion runtime.
Prompt Gemini like an operator, not a collaborator. Keep prompts compact and block-structured with clear sections. State the task, the output contract, the follow-through defaults, and the small set of extra constraints that matter.
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.
- Add explicit grounding and verification rules for any task where unsupported guesses would hurt quality.
- Prefer better prompt contracts over adding long natural-language explanations.
- Use explicit contracts over vague nudges.
Block-Structured Prompt Format
- Context: repository context, git branch, recent changes, relevant architecture notes.
- Task: the concrete job, scope, and what done looks like.
- Constraints: boundaries, what not to touch, required patterns, size limits.
- Output Format: exact shape, ordering, and brevity requirements. Request structured JSON output for machine-parseable results.
Model-Specific Guidance
Gemini supports multiple models. Tailor prompts to model strengths:
- Gemini 3 Pro: best for complex reasoning, multi-stage tasks, and deep code analysis. Use for architectural reviews, multi-file refactors, and tasks requiring extended chain-of-thought. Supports 1M token context.
- Gemini 3 Flash: best for fast, lightweight responses. Use for simple lookups, quick explanations, formatting tasks, and latency-sensitive operations. Optimized for speed over depth.
- Gemini 2.5 Pro: production-grade reasoning model. Use for stable, well-tested reasoning tasks and when consistency matters more than cutting-edge capability.
Gemini-Specific Strengths
Leverage these capabilities when composing prompts:
- Long context (1M tokens): Gemini handles very large inputs. Include full file contents, extensive diffs, or multiple related files when the task benefits from broad context.
- Multimodal input: Use
@file syntax for images, PDFs, audio, and video. Include multimodal assets directly when the task involves visual or audio analysis.
- Google Search grounding: For research and search queries, explicitly request web search grounding. Instruct Gemini to use
google_web_search for up-to-date information and cite sources with URLs.
- Structured JSON output: Request structured JSON output with explicit schema contracts for machine-parseable results.
Task-Specific Guidance
- Coding or debugging: add verification criteria and missing-context handling. Leverage long context to include full relevant files.
- Review: add grounding rules and structured output contract. Include the full diff and surrounding context.
- Search and research: explicitly request Google Search grounding. Add citation requirements including URLs, publication dates, and source reliability notes. Instruct Gemini to prefer primary sources.
- Multimodal analysis: specify the file types being analyzed and tailor analysis instructions to the medium. For images, request visual description and annotation. For audio/video, request transcription and temporal markers.
- Write-capable tasks: add action safety constraints so Gemini stays narrow and avoids unrelated refactors.
Repository Context Inclusion
- Include the current git branch name when relevant to the task.
- Include recent commit messages or diff summary when reviewing changes.
- Include relevant architecture notes or patterns from the codebase when the task depends on them.
- Do not include entire file contents unless the task specifically requires them, except when leveraging Gemini's long-context capability for thorough analysis.
Prompt Assembly Checklist
- Define the exact task and scope in the Context and Task sections.
- 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 verification, grounding, and safety constraints only where the task needs them.
- For search tasks, include explicit Google Search grounding instructions.
- For multimodal tasks, include
@file references and file-type-specific analysis instructions.
- Remove redundant instructions before sending the prompt.