GPTPROMPTS.AI
HOW-TO GUIDE · 2026

How to Use Gemini for Coding: 2026 Guide

An 8-step engineering workflow built around Gemini 2.5 Pro, 2M context, Code Assist in your IDE, Jules background agent, and Colab integration. Read whole repos, refactor across files, ship PRs.

Coding with Gemini in 2026 is not the inline-completion experience that most engineers still associate with AI coding tools. The 2-million-token context window changes the unit of analysis from a single file to a whole subsystem or a whole repository. Gemini Code Assist brings that capability into the IDE you already use (VS Code, JetBrains, Android Studio, Cloud Shell, Cloud Workstations). Jules, the Google background coding agent, runs PR-sized tasks asynchronously while you focus on the one thing that needs your deep attention. Colab plus Gemini is the highest-leverage data and ML surface for Python work. And the deep Google Cloud integration matters when your stack runs on Cloud Run, Vertex AI, BigQuery, Firestore, or Firebase.

The 8-step workflow below is built for working engineers shipping production code: feature work, refactors, debugging, testing, code review, and the steady accumulation of internal knowledge that makes the next task faster than this one. The first three steps are setup and structural: install Gemini Code Assist, use the 2M context window strategically, and offload PR-sized tasks to Jules. The middle steps cover the daily engineering work: Colab data and ML, structured test generation, distributed debugging across services. The final two steps cover code review and the compounding loop that promotes durable patterns into repository grounding so future Gemini conversations start smarter. Each step is tuned to Gemini's specific strengths (long context, deep Google stack, Jules async, Colab integration) rather than fighting the model.

Who this guide is for

  • • Software engineers on frontend, backend, mobile, and ML teams shipping production code daily
  • • Engineers on Google Cloud stacks running Cloud Run, Vertex AI, BigQuery, Firestore, Firebase, GKE, or Cloud Functions where Gemini has deepest integration
  • • Technical leads and staff engineers running architecture work, design reviews, and cross-team refactors that span multiple services
  • • Engineering managers who want to shift team rhythm from synchronous coding to async PR-batch work via Jules
  • • Data engineers and ML engineers working in Colab, Vertex AI, BigQuery, and the broader Google data stack
  • • Mobile engineers on Android Studio (and Flutter) where Gemini integration is first-class
  • • DevOps and platform engineers writing Terraform, Kubernetes manifests, and Cloud Build pipelines
  • • Founders and indie engineers who want the productivity of a full team without the headcount, using Jules for PR-batch async work

Why Gemini specifically (vs. Claude, ChatGPT, or GitHub Copilot)

For coding work, Gemini has four specific advantages over alternatives. First, the 2-million-token context window on Gemini 2.5 Pro is the structural differentiator. Claude 4.6 tops out at 200K, ChatGPT GPT-4.1 at 200K, and Copilot Chat uses a much narrower window by design. The 2M context lets you load entire subsystems or smaller repositories into one conversation for whole-repo refactors, cross-service debugging, and PR-scale code review with downstream impact analysis. Second, Gemini Code Assist integrates natively into the major IDEs (VS Code, JetBrains, Android Studio, Cloud Shell) with full-file and full-repo awareness, and Enterprise tier adds repository-level grounding that materially improves output on internal-API work. Third, Jules, the background coding agent, runs PR-sized async tasks in a cloud VM that clones your repo and opens a PR when done; this changes engineering rhythm. Fourth, deep Google ecosystem integration: Colab, Vertex AI, BigQuery, Cloud Run, Firebase, and Google Cloud documentation are first-class context.

Where Gemini loses: Claude wins on careful reasoning about a single hard bug, on writing correct TypeScript types with complex generics, and on analyzing a specific document or function deeply with the full 200K dedicated to one concern. ChatGPT wins on tool ecosystem breadth (richer plugin and Code Interpreter surface) and on the absolute breadth of available models including specialized variants. GitHub Copilot remains the lowest-friction inline completion experience and the most natural fit for engineers who live primarily in GitHub. Most working engineers in 2026 use two or three of these depending on the task: Copilot for inline completion, Gemini Code Assist Chat for multi-file changes and the 2M context tasks, and Claude for the single hard bug. The tools coexist cleanly because they hook into different IDE surfaces.

The 8 steps below are tuned for Gemini but the underlying engineering discipline (grounded context, strategic context loading, async PR-batch work, structured test generation, distributed debugging, focused code review, compounding patterns) is tool-agnostic. The specific UX advantages (2M context, Jules, Colab integration, Code Assist) are Gemini-specific in 2026. For paired engineering workflows on related tools, see our how to use Gemini full guide, Gemini for Google Workspace, Claude for coding, and GitHub Copilot for code review.

The 8-Step Workflow

01

Install Gemini Code Assist in your IDE and configure repo context

The highest-leverage setup is to install Gemini Code Assist in the IDE you actually use (VS Code, JetBrains family, Android Studio, Cloud Shell, or Cloud Workstations) and configure it to read your repo. For individuals, the free tier covers most workflows. For teams, Enterprise adds repository-level customization where the model is grounded in your firm's coding standards, internal libraries, and architectural patterns; this is a step-function quality improvement on internal-API work. After installation, point Gemini at the repo root, configure ignored paths (node_modules, .next, build outputs), and set the default model to Gemini 2.5 Pro for chat interactions (Flash is the default for inline completions). Test the setup by asking Gemini Code Assist Chat to explain a non-trivial file in the repo; if the explanation is accurate and uses your firm's terminology, the grounding is working. The 15 minutes of setup pays back inside the first non-trivial task because grounded responses do not require pasting context every time.

Example prompt
In the IDE Gemini Code Assist Chat panel, open the repo at the root. Run: 'Explain the high-level architecture of this repository. Identify: (1) the entry point or main module; (2) the major subsystems with their directory paths; (3) the dependency direction between subsystems (what imports what); (4) the data model in the core types; (5) the testing strategy. Use the actual file paths and module names from this repo. Cite specific files for each claim.' If the response mixes generic patterns with your repo's actual structure, the grounding is incomplete; check that the repo root is correctly configured and that .gitignore patterns are not hiding the relevant code.
02

Use the 2M context window for whole-repo or whole-subsystem reasoning

The 2-million-token context window is the single biggest differentiator for serious engineering work. The pattern that uses it well: identify the scope of the task (whole-feature refactor, cross-service debugging, codebase tour), assemble the relevant files into the conversation context (typically 30 to 80 files for a feature-scope task), and let Gemini reason across all of them at once. The pattern that wastes the context window: paste the entire monorepo and ask vague questions. Strategic context loading produces 2 to 3x better results than maximal context loading because the signal-to-noise ratio is what drives output quality, not the total token count. For each task, ask: what files would a thoughtful senior engineer pull up to think about this question; load those plus 20 to 30% margin for unexpected dependencies. Use the IDE's multi-select-and-add-to-chat workflow rather than copy-paste, which preserves file boundaries and lets Gemini cite specific files in responses.

Example prompt
'I am about to refactor [feature name]. The change is: [paste 3-sentence change description]. Before I write the change, walk through every file in this subsystem that touches the affected pattern and identify: (1) the exact line ranges that will need to change; (2) any edge case the simple version of the refactor would miss; (3) any test file that exercises the affected behavior; (4) any downstream consumer (in this repo or in a sibling repo I should flag) that depends on the affected interface. Use the actual files and line numbers from the context I have loaded; cite each. End with a 5-step refactor plan in dependency order.'
03

Offload PR-sized tasks to Jules and parallelize your engineering work

Jules is the Google background coding agent that runs in a cloud VM, clones your repo, executes a task end-to-end, and opens a pull request when done. The right tasks for Jules are self-contained and PR-sized: write tests for an existing module, upgrade a dependency, refactor a deprecated API call across the codebase, add a feature flag, implement a small feature from a clear spec, or fix a non-architectural bug with a clear repro. The wrong tasks are architectural decisions, anything requiring product judgment, or tasks with ambiguous specs. The pattern that makes Jules valuable: write a tight spec (the task in 3 to 5 sentences plus the success criteria plus any constraint), queue the task, switch to your next focused work, and review the PR when Jules opens it. Engineering rhythm shifts from synchronous coding to async task management; the productive pattern is having 4 to 8 Jules tasks running in parallel while you focus on the 1 task that requires deep attention. Review Jules PRs with the same rigor as any human PR; the failure modes are similar.

Example prompt
In Jules, create a new task: 'Repo: [repo name]. Task: Write integration tests for the [module name] module covering: (1) the success path with valid inputs; (2) input validation errors for each required field; (3) authentication errors; (4) rate-limit errors; (5) downstream service failure with the appropriate retry behavior. Use [test framework, e.g., pytest with httpx mock]. Match the style of tests in [reference test file path]. Aim for 12 to 20 test cases. Open a PR titled "Tests: [module name] integration coverage" with a description summarizing what is covered and any gap. Success criteria: tests run green locally with `[test command]`, coverage of the module exceeds 85%, and no test relies on actual external services.'
04

Use Colab for data and ML work with Gemini integration

For Python-heavy data engineering and ML work, Colab plus Gemini is the highest-leverage surface. The Help me code and Generate suggestions panels in Colab are powered by Gemini, with Flash as the default for inline interactions and Pro for the longer reasoning tasks. The high-leverage Colab workflows: load a CSV or query result, ask Gemini for a data profile and 5 exploratory cells; describe a model in plain language, let Gemini draft the training pipeline; paste an error from a long-running cell, ask for 3 fixes ranked by likelihood; ask Gemini to convert a script-style notebook into modular functions with docstrings before promoting to a production module. For Vertex AI training pipelines, Gemini has the deepest knowledge of the Google Cloud ML stack because the training data and the deployment surface are colocated. Keep one Colab notebook per experiment; this is cleaner than letting one notebook accumulate every variant of a model. For data analysis specifically (not ML), see how to use Claude for data analysis for the workflow comparison; Colab plus Gemini wins on the Python ML side, Claude wins on the analyst-narrative side.

Example prompt
In a Colab notebook with the data loaded into df: 'For this dataframe, run a structured exploratory analysis. Cell 1: print shape, dtypes, head, describe, null counts, duplicate count. Cell 2: visualize the distribution of the target variable with a histogram and 5-number summary. Cell 3: correlate the numeric features with the target and visualize as a horizontal bar chart, sorted by absolute correlation. Cell 4: for the top 3 features by correlation, show a scatter plot vs. target with regression line. Cell 5: identify the 3 most data-quality-concerning issues I should fix before modeling. Use matplotlib and seaborn; match the style of [previous notebook URL or paste a sample] if I provide one.'
05

Write tests with explicit coverage of boundary, error, and edge cases

Generic prompts for test generation produce happy-path coverage that misses the edge cases. Structured prompts produce coverage that often exceeds what an engineer would write in the same time. The pattern: paste the function or class under test, paste the type signature or schema, paste a sample existing test file from the codebase for style reference, then ask for 8 to 15 tests that explicitly cover boundary conditions, error paths, null and empty inputs, type variations, and (where relevant) concurrency cases. After Gemini writes the tests, ask it to identify the 3 most likely paths it did not cover; this catches the edge cases the structured prompt missed. For property-based testing with Hypothesis (Python), fast-check (TypeScript and JavaScript), or Proptest (Rust), describe the invariants in plain language and let Gemini write the properties. Run the test suite locally before opening a PR; Gemini-generated tests pass at high rates but not 100%, and the failures are usually trivial fixes (import order, assertion message format).

Example prompt
'Write integration tests for this function: [paste function with signature]. Match the style of this existing test file: [paste sample test file]. Aim for 12 to 15 test cases that explicitly cover: (1) success path with valid typical inputs; (2) boundary inputs (empty list, single-element list, maximum allowed size); (3) invalid input types and shapes with the expected error; (4) null and undefined inputs; (5) characters or content that would break naive implementations (Unicode, very long strings, special characters); (6) concurrent calls if the function has shared state; (7) any error path documented in the function or codebase. After the tests, identify the 3 most likely paths I did not cover that would be worth adding.'
06

Debug across services using distributed-trace context in one conversation

Distributed debugging is the second high-leverage application of the 2M context window. The workflow: assemble the failure context into one Gemini conversation. Include the failing request trace (from Cloud Trace, Datadog, Honeycomb, OpenTelemetry export), the application logs from each affected service for the relevant time window, the recent commits and deploys in each service for the last 24 to 48 hours, the relevant code for each service that the trace touches, the related infrastructure config (Terraform, Kubernetes manifests, Cloud Run service config), and a clear statement of the failure mode in 2 to 3 sentences. With the full context loaded, ask Gemini to propose 5 hypotheses ranked by likelihood with the evidence required to falsify each. Work through the top hypothesis with Gemini, gather additional evidence, refine. This compresses a multi-hour distributed debugging session to 30 to 60 minutes when it works. When the bug is exotic enough that Gemini cannot reason to it, you have at least eliminated 3 to 4 plausible explanations in 15 minutes.

Example prompt
'Distributed debugging session. Failure mode: [3-sentence description]. The trace shows: [paste trace]. Service A logs for the 5 minutes around the failure: [paste]. Service B logs: [paste]. Service C logs: [paste]. Recent commits in each service over the last 48 hours: [paste git log output]. Relevant code: [paste files touched by the trace from each service]. Infrastructure config: [paste relevant Terraform or Kubernetes config]. Propose 5 hypotheses for the root cause, ranked by likelihood. For each: (1) state the hypothesis in one sentence; (2) name the evidence in the data above that supports or contradicts it; (3) name the specific check that would falsify or confirm it. Start with the hypothesis most consistent with the timing in the trace.'
07

Run Gemini code review on every PR before human review

The Gemini Code Assist GitHub App posts structured review comments on PRs automatically and can be configured to gate merges on critical issues (security, hardcoded secrets, missing tests for new code paths). For human-driven code review where you want a second opinion before opening the PR, paste the diff plus the surrounding files into Gemini and ask for review with specific concerns: security implications, performance implications, edge cases the author missed, downstream consumers that might break, test coverage gaps. The discipline that makes Gemini code review valuable: specify what you want the review to focus on rather than asking for a generic review. A generic review produces generic comments ("consider extracting this into a helper"); a focused review produces actionable specific feedback ("line 47 calls X without the null check that the type signature requires"). For the firm-level standard, configure Gemini Code Assist Enterprise to enforce your coding standards as part of every review, which is materially more consistent than relying on human reviewers to catch the same standards.

Example prompt
'Review this PR diff before I request human review. Diff: [paste]. Files affected: [paste]. Related tests: [paste]. Review focus: (1) security implications (auth, authorization, input validation, secrets); (2) performance implications (N+1 queries, missing indexes, expensive allocations in hot paths); (3) edge cases the author may have missed (null inputs, empty collections, boundary values, race conditions); (4) downstream consumers in this repo that depend on the affected interfaces and might break; (5) test coverage: any new code path that is not exercised by the tests in the diff. Output: bulleted list of issues by severity (blocker, important, nice-to-have). For each issue, cite the specific file and line and propose the fix in code.'
08

Promote durable patterns into Gemini Code Assist Enterprise grounding

The final step that compounds across every future conversation: after a non-trivial Gemini-assisted feature ships, capture the durable patterns into Gemini Code Assist Enterprise repository grounding so the next similar task starts smarter. Add new internal libraries to the grounding index. Update the firm's coding-standards document with any pattern that came up in the work. Promote new architectural decisions into ADRs that the grounding indexes. Add new test patterns to the reference test suite that Gemini learns from. For teams without Enterprise tier, the same principle applies via a CONTRIBUTING.md or a STYLE.md in the repo root that you reference in Gemini Code Assist Chat as the standards document. The compounding effect is real: a team that runs this loop for 6 months has materially smarter Gemini responses on their internal codebase than a team using stock Gemini on the same code. The 10 to 20 minutes per shipped feature is the highest-leverage long-term investment for engineering productivity.

Example prompt
'I just shipped the [feature name] feature with Gemini Code Assist. Help me capture the durable patterns into Enterprise grounding and into the repo: (1) which new internal modules, types, or utilities should be added to the grounding index for future use; (2) draft 2 to 3 entries for CONTRIBUTING.md or STYLE.md that capture the conventions used in this feature; (3) draft an ADR for the architectural decision in this feature with context, decision, consequences, alternatives; (4) identify any pattern in the test suite that should be lifted into a reference test pattern for future tests of similar features; (5) suggest 2 to 3 follow-up tasks that would extend this feature cleanly. Output: grounding additions, style guide entries, ADR draft, test pattern doc, follow-up task list.'

Common Mistakes That Break Gemini Coding Workflows

1. Treating the 2M context like a maximal context (paste everything)

Pasting an entire monorepo dilutes the signal. Strategic context loading (the files a thoughtful senior engineer would pull up for the question, plus 20 to 30% margin) produces 2 to 3x better results than maximal context loading. Use the context window as a tool, not a goal.

2. Skipping the diff review and accepting Gemini changes blindly

Gemini-generated code passes tests at high rates but not 100%, and the failures include API misuses, missing edge cases, and occasional hallucinated symbols. The diff review takes 5 to 10 minutes on a 200-line change and catches the issues before they ship. Never skip it.

3. Sending Jules ambiguous specs

Jules picks an interpretation and runs with it. Ambiguous specs produce PRs that solve a slightly different problem than the one you meant. The 5 to 10 minutes of spec tightening (task, success criteria, constraints, references) is the difference between a PR that ships and a PR that gets closed.

4. Using Gemini for tasks requiring product judgment

For trade-offs that depend on business context (which feature to build, which API contract to lock in, which performance vs. cost trade-off), Gemini is a sparring partner, not an oracle. Decisions that require firm-specific judgment must come from a human; Gemini can structure the alternatives, not pick between them.

5. Generic test prompts that produce only happy-path coverage

A generic write tests for this function prompt produces happy-path coverage and misses the edge cases. Structured prompts that name boundary, error, null and empty, type variation, and concurrency cases produce coverage that often exceeds engineer-written tests in the same time.

6. Forgetting to ground Gemini on internal libraries

Without grounding, Gemini fills gaps from training data and invents plausible-but-fake internal API surfaces. Configure Gemini Code Assist Enterprise with repo-level grounding, or paste the relevant internal modules into the conversation explicitly. The hallucination rate drops to under 1% with grounding versus 5 to 10% without.

7. Running long conversations across multiple tasks

Conversations accumulate context drift; switching from feature work to bug fix to documentation in one conversation lowers output quality on every subsequent turn. Start new conversations on focused tasks and use IDE grounding for the durable codebase context.

8. Never closing the loop into repository grounding

Each shipped feature should compound future Gemini responses. The 10 to 20 minutes after each feature spent updating grounding (new internal modules, style guide entries, ADRs, reference test patterns) is the highest-leverage long-term investment. Teams that run this loop have materially smarter Gemini responses after 6 months than teams using stock Gemini.

Pro Tips (What Most Engineers Miss)

Use Gemini 2.5 Flash for inline completions, 2.5 Pro for chat. Flash is fast and fine for completing the next 5 to 30 lines based on the open file. Pro is slower but reasons across larger context. The right tool per surface matters: Flash on the keystroke loop, Pro on the multi-file question. Configure Gemini Code Assist to default each way.

Run 4 to 8 Jules tasks in parallel. The productive pattern with Jules is async batching: spec out 4 to 8 PR-sized tasks at the start of the morning, queue them all, and check back as PRs land. Your focus time goes to the one task that requires deep attention; Jules handles the rest in parallel. This is a fundamentally different engineering rhythm than synchronous IDE work.

Always ask Gemini to cite specific files and line numbers in responses. Cited responses are easier to verify and surface hallucinations faster. If Gemini cites file X line Y and that line does not exist, the response is partially hallucinated. The discipline of citation cuts review time roughly in half.

For Google Cloud work, ask Gemini to use the latest API surface. Gemini knows the Vertex AI, Cloud Run, BigQuery, and Firestore APIs at depth, but the default sometimes uses older surface versions. State the surface explicitly in the prompt (use the v1 Vertex AI Python SDK, use the latest BigQuery client library, etc.) to keep generated code on the current surface.

For mobile, Android Studio plus Gemini is materially ahead of competitors. The integration goes beyond chat to include Crashlytics analysis, layout-to-code generation, and Jetpack Compose-specific assistance. Engineers building Android apps in 2026 should treat Gemini Code Assist in Android Studio as the default coding tool rather than an add-on.

For Flutter, the Dart and Flutter knowledge is strong. Gemini handles Flutter idioms, state management patterns (Riverpod, Provider, Bloc), and the platform-channel boundary cleanly. For cross-platform mobile teams, Gemini is the strongest LLM in 2026 for Flutter-specific work.

Use Colab for any data work that does not require local files or local services. Colab plus Gemini removes the install-and-configure overhead of local Python environments. For prototyping, experimentation, and one-off analyses, the friction is dramatically lower than running locally. Promote production code to a proper module only after the experiment is stable.

For long-context tasks, paste files in a logical order (entry point first, dependencies after). Gemini's attention to the context is uneven; the start and end of the context window are more heavily weighted than the middle. Put the most important files at the start; put reference material at the end.

Gemini Coding Prompt Library (Copy-Paste)

Production-tested prompts organized by engineering workstream. Replace bracketed variables with your specifics. Run inside Gemini Code Assist with repo grounding loaded.

Whole-repo refactoring

'I am refactoring [feature name]. The change: [3-sentence description]. Walk through every file in this subsystem that touches the affected pattern: (1) exact line ranges that need to change; (2) edge cases the simple version would miss; (3) test files exercising the affected behavior; (4) downstream consumers that might break. Cite specific files and line numbers. End with a 5-step refactor plan in dependency order.'
'Rename the internal API from [old name] to [new name] across the codebase. List every file that imports or references the old name. For each: the exact line ranges, the replacement, and any consumer outside this repo that should be flagged. Output as a markdown checklist I can work through.'

Distributed debugging

'Distributed debugging session. Failure mode: [3-sentence description]. Trace: [paste]. Service A logs: [paste]. Service B logs: [paste]. Service C logs: [paste]. Recent commits in each service over 48 hours: [paste git log]. Code touched by the trace from each service: [paste files]. Infra config: [paste]. Propose 5 hypotheses ranked by likelihood. For each: hypothesis statement, supporting and contradicting evidence in the data, falsification check. Start with the hypothesis most consistent with the trace timing.'
'I have a memory leak in [service name]. Heap profile diff between healthy and leaking states: [paste profile output]. Recent commits over the last 14 days: [paste]. Relevant code: [paste services and modules]. Identify the 3 most likely allocation sites driving the leak, ranked by total bytes per request. For each, cite the specific code and propose the fix.'

Test generation

'Write integration tests for: [paste function]. Match the style of: [paste sample test file]. Aim for 12 to 15 cases covering: (1) success path; (2) boundary inputs (empty, single-element, max size); (3) invalid input types; (4) null and undefined; (5) breaking characters (Unicode, very long strings, special chars); (6) concurrent calls if shared state; (7) documented error paths. After tests, identify the 3 paths I likely did not cover.'
'Write property-based tests for [function] using Hypothesis (Python) [or fast-check for TS / Proptest for Rust]. Invariants: (1) [paste invariant 1]; (2) [paste invariant 2]; (3) [paste invariant 3]. Write 5 to 8 strategies covering edge cases, then 5 to 8 properties using those strategies. Include shrinking annotations.'

Code review

'Review this PR diff. Diff: [paste]. Files: [paste]. Tests: [paste]. Focus: (1) security (auth, input validation, secrets); (2) performance (N+1, missing indexes, hot-path allocations); (3) edge cases (null inputs, empty collections, race conditions); (4) downstream consumers that might break; (5) test coverage gaps. Output: bulleted issues by severity (blocker / important / nice-to-have). For each, cite specific file and line, propose fix in code.'

System design

'Design a system for: [requirement]. Constraints: [latency target, cost target, compliance requirement]. Team context: [team size, experience, existing tech stack]. Existing related systems: [brief description]. Provide 2 or 3 alternative designs. For each: high-level architecture diagram in mermaid; data flow; estimated cost at [target QPS]; estimated latency at p50/p99; key trade-offs; failure modes. Recommend one with reasoning.'

Colab data work

'For this dataframe in df, run a structured exploratory analysis. Cell 1: shape, dtypes, head, describe, null counts, duplicate count. Cell 2: visualize target distribution with histogram and 5-number summary. Cell 3: correlate numeric features with target, horizontal bar sorted by abs correlation. Cell 4: scatter plot for top 3 features vs target with regression line. Cell 5: list 3 most concerning data quality issues to fix before modeling.'
'Build a Vertex AI training pipeline for: [model description]. Input: [data source in BigQuery or GCS]. Output: [model artifact location]. Pipeline steps: (1) data validation with TensorFlow Data Validation; (2) preprocessing with TFX Transform; (3) training with [framework]; (4) evaluation with [metrics]; (5) model registration in Vertex Model Registry; (6) optional deployment to Vertex Endpoint. Use the latest Vertex AI SDK. Include retry logic and structured logging.'

Jules background agent specs

'Repo: [name]. Task: Write integration tests for [module] covering: (1) success path with valid inputs; (2) input validation errors per required field; (3) auth errors; (4) rate-limit errors; (5) downstream service failures with retry behavior. Test framework: [framework]. Match style of [reference test file]. Aim for 12 to 20 cases. Open PR titled "Tests: [module] coverage" with summary. Success: tests run green locally via [command], coverage exceeds 85%, no test uses actual external services.'
'Repo: [name]. Task: Upgrade [dependency] from version [old] to [new]. Run the upgrade. Resolve any breaking changes in our code (the changelog notes are [paste]). Update any usage of deprecated APIs to the new equivalents. Confirm tests pass. Open PR titled "Upgrade [dependency] to [new version]" with a summary of changes by file. Success: all tests pass, no new lint errors, no deprecated API calls remain.'

Documentation

'Generate OpenAPI spec entries for these routes: [paste]. For each: path, method, summary, request body schema with types and constraints, response schemas for 200 / 400 / 401 / 500, an example request and response. Match the format of [paste existing OpenAPI spec excerpt]. Output as YAML.'
'Draft a one-page architecture tour of this repo for an engineer joining tomorrow. Cover: entry point, major subsystems with directory paths, dependency direction between subsystems, where the data model lives, where the public API lives, where tests live, how to run locally in 5 minutes, where to find runbooks and on-call info. Use the actual file paths from this repo. Length: 600 to 800 words.'

Repository grounding updates

'I just shipped [feature]. Capture durable patterns: (1) new internal modules, types, or utilities to add to grounding index; (2) 2 to 3 CONTRIBUTING.md or STYLE.md entries with the conventions used; (3) ADR draft with context, decision, consequences, alternatives; (4) any test pattern to lift into reference patterns; (5) 2 to 3 follow-up tasks that extend the feature. Output: grounding additions, style entries, ADR draft, test pattern doc, follow-up list.'

Want more Gemini and coding prompts? See our how to use Gemini full guide, Gemini for Google Workspace, Claude for coding, and GitHub Copilot for code review. For data and analytical workflows that pair with coding work, see Claude for data analysis and Claude for SQL queries.

Frequently Asked Questions

Related Guides

Don't stop here

What to read next

Hand-picked guides our readers explore right after this one.