Gemini Prompting Guide
When to Use
Use this skill only to shape the prompt text before forwarding it to the gemini-companion runtime. Do not use it to do independent work, inspect the repository, or draft solutions.
Model Selection
The default model is auto-gemini-3. Only override it when the action type has a clear reason to use a different tier.
Action-based routing
| Action type |
Examples |
Recommended model |
| Deep reasoning / root-cause diagnosis |
Multi-file bug investigation, security audit, architecture review |
pro (gemini-3.1-pro-preview) |
| Complex implementation |
Refactor across many files, design a new subsystem, write an algorithm |
pro (gemini-3.1-pro-preview) |
| Standard code tasks |
Fix a specific bug, implement a well-scoped feature, write tests |
auto-gemini-3 (default — omit --model) |
| Code review / adversarial review |
/gemini:review, /gemini:adversarial-review |
auto-gemini-3 (default — omit --model) |
| Quick lookup / simple edit |
One-liner fix, rename, trivial grep-and-replace |
flash (gemini-3-flash-preview) |
| Latency-critical / high-volume |
CI pre-check, tight feedback loop, batch summarisation |
flash-lite (gemini-3.1-flash-lite-preview) |
| Production-stable (no previews) |
Workloads that must avoid preview model churn |
auto-gemini-2.5 |
Decision rule
- User explicitly named a model → use it, pass as
--model <name>.
- Task involves deep reasoning, complex multi-file implementation, or security analysis → use
--model pro.
- Task is a standard code fix, feature, or review → omit
--model (defaults to auto-gemini-3).
- User asked for speed or the task is trivially small → use
--model flash or --model flash-lite.
- User requires preview-free stability → use
--model auto-gemini-2.5.
Gemini Model Characteristics
- Long context: Gemini models handle up to 1M tokens of context. Lean into providing full file contents rather than snippets.
- System instructions: Gemini's primary steering mechanism. Place behavioral constraints, output format requirements, and role definitions in system instruction blocks.
- Thinking: Gemini models support configurable thinking budgets. Use
--thinking-budget for complex reasoning tasks.
- Grounding: Gemini can use Google Search for grounding. For tasks requiring up-to-date information, mention this in the prompt.
- Structured output: Request JSON output by describing the schema in the prompt. Gemini follows schema instructions well when given clear examples.
Prompt Structure
Use XML tags to structure prompts for clarity:
<role>
Define the persona and operating stance.
</role>
<task>
State what needs to be done. Be specific about inputs and expected outputs.
</task>
<context>
Provide repository context, file contents, error messages, or other relevant information.
</context>
<constraints>
List hard boundaries: what NOT to do, scope limits, safety rules.
</constraints>
<output_contract>
Define the exact output shape. Use JSON schema descriptions or examples.
</output_contract>
Key Principles
- Be specific, not vague: "Fix the null pointer in
auth.go:142" beats "Fix the bug".
- Include output contracts: Always specify what the response should look like.
- Provide full context: Gemini handles long context well — give it complete files, not snippets.
- Use system instructions for behavior: Role, tone, constraints go in system instruction blocks.
- One task per prompt: Don't mix unrelated jobs. Split into separate runs.
- Include verification steps: Ask Gemini to verify its own work before finalizing.
References
- Prompt Blocks — Reusable XML blocks for common patterns
- Gemini Prompt Recipes — End-to-end templates for diagnosis, fixes, reviews, research
- Gemini Prompt Anti-Patterns — Common mistakes to avoid
Source: sakibsadmanshajib/gemini-plugin-cc — distributed by TomeVault.
1---2name: gemini-prompting-93description: Gemini model prompting guide for effective task delegation from Claude Code Use when this capability is needed.4---56# Gemini Prompting Guide78## When to Use910Use this skill only to shape the prompt text before forwarding it to the `gemini-companion` runtime. Do not use it to do independent work, inspect the repository, or draft solutions.1112## Model Selection1314The default model is **`auto-gemini-3`**. Only override it when the action type has a clear reason to use a different tier.1516### Action-based routing1718| Action type | Examples | Recommended model |19|-------------|----------|-------------------|20| Deep reasoning / root-cause diagnosis | Multi-file bug investigation, security audit, architecture review | `pro` (`gemini-3.1-pro-preview`) |21| Complex implementation | Refactor across many files, design a new subsystem, write an algorithm | `pro` (`gemini-3.1-pro-preview`) |22| Standard code tasks | Fix a specific bug, implement a well-scoped feature, write tests | `auto-gemini-3` (default — omit `--model`) |23| Code review / adversarial review | `/gemini:review`, `/gemini:adversarial-review` | `auto-gemini-3` (default — omit `--model`) |24| Quick lookup / simple edit | One-liner fix, rename, trivial grep-and-replace | `flash` (`gemini-3-flash-preview`) |25| Latency-critical / high-volume | CI pre-check, tight feedback loop, batch summarisation | `flash-lite` (`gemini-3.1-flash-lite-preview`) |26| Production-stable (no previews) | Workloads that must avoid preview model churn | `auto-gemini-2.5` |2728### Decision rule29301. User explicitly named a model → use it, pass as `--model <name>`.312. Task involves deep reasoning, complex multi-file implementation, or security analysis → use `--model pro`.323. Task is a standard code fix, feature, or review → omit `--model` (defaults to `auto-gemini-3`).334. User asked for speed or the task is trivially small → use `--model flash` or `--model flash-lite`.345. User requires preview-free stability → use `--model auto-gemini-2.5`.3536## Gemini Model Characteristics3738- **Long context**: Gemini models handle up to 1M tokens of context. Lean into providing full file contents rather than snippets.39- **System instructions**: Gemini's primary steering mechanism. Place behavioral constraints, output format requirements, and role definitions in system instruction blocks.40- **Thinking**: Gemini models support configurable thinking budgets. Use `--thinking-budget` for complex reasoning tasks.41- **Grounding**: Gemini can use Google Search for grounding. For tasks requiring up-to-date information, mention this in the prompt.42- **Structured output**: Request JSON output by describing the schema in the prompt. Gemini follows schema instructions well when given clear examples.4344## Prompt Structure4546Use XML tags to structure prompts for clarity:4748```xml49<role>50Define the persona and operating stance.51</role>5253<task>54State what needs to be done. Be specific about inputs and expected outputs.55</task>5657<context>58Provide repository context, file contents, error messages, or other relevant information.59</context>6061<constraints>62List hard boundaries: what NOT to do, scope limits, safety rules.63</constraints>6465<output_contract>66Define the exact output shape. Use JSON schema descriptions or examples.67</output_contract>68```6970## Key Principles71721. **Be specific, not vague**: "Fix the null pointer in `auth.go:142`" beats "Fix the bug".732. **Include output contracts**: Always specify what the response should look like.743. **Provide full context**: Gemini handles long context well — give it complete files, not snippets.754. **Use system instructions for behavior**: Role, tone, constraints go in system instruction blocks.765. **One task per prompt**: Don't mix unrelated jobs. Split into separate runs.776. **Include verification steps**: Ask Gemini to verify its own work before finalizing.7879## References8081- [Prompt Blocks](references/prompt-blocks.md) — Reusable XML blocks for common patterns82- [Gemini Prompt Recipes](references/gemini-prompt-recipes.md) — End-to-end templates for diagnosis, fixes, reviews, research83- [Gemini Prompt Anti-Patterns](references/gemini-prompt-antipatterns.md) — Common mistakes to avoid8485---86> Source: [sakibsadmanshajib/gemini-plugin-cc](https://github.com/sakibsadmanshajib/gemini-plugin-cc) — distributed by [TomeVault](https://tomevault.io).87<!-- tomevault:4.0:skill_md:2026-06-16 -->