Buying Guide Coding

8 min read · Dec 3, 2026

How to Make Gemini 4 Finish Long Coding Jobs: Google's 5 Tips as Copy-Paste Prompts

Google DeepMind's five developer habits for long Gemini 4 coding runs, translated into copy-paste prompts, model pricing tiers, and official skill commands.

8 min read Checked Dec 5, 2026 4 primary sources

Compiled from Google DeepMind's developer video and official Gemini API documentation (Choosing a model, Latest Gemini models, Coding agent setup). Pricing and free-tier terms checked December 4, 2026.

Five coding-agent habits for finishing long jobs with Gemini 4, paired with model pricing and copy-paste prompts
The Benchmarque guide graphic (Google DeepMind & Gemini API docs, Dec 4, 2026) PRIMARY VISUAL

The short version

VERDICT // SUMMARY

Start long Gemini 4 coding runs on gemini-4-hydrogen ($1.50 / $7.50 per 1M tokens, free API tier available) and apply Tip 2 first: tie completion to executable tests or screenshot verification. Combine a plan-first gate, multimodal references, Flash-Lite sub-agent delegation, and reusable SKILL.md files, and install Google's official gemini-api-dev skill to prevent legacy SDK imports.

KEY NUMBERS // VERIFIED READOUT 4 METRICS AUDITED
  • Default coding pick

    Hydrogen

    gemini-4-hydrogen costs $1.50 / $7.50 per 1M tokens and includes a free API tier.

    Gemini API docs, Dec 4, 2026

  • Shared context window

    1M tokens

    Hydrogen, Neon, and Carbon all share 1M context and 64K default output (1M long decode).

    Gemini API docs, Dec 4, 2026

  • Sub-agent savings

    8x gap

    Carbon output ($20/1M) costs 8x Flash-Lite ($2.50/1M), making delegation pay quickly.

    Gemini API pricing

  • Most expensive tier

    $4 / $20

    gemini-4-carbon is paid-only and slower; reserve it for reasoning where Hydrogen stalls.

    Gemini API docs

Sources and scope

Field Detail
Method Official Google DeepMind developer guidance and Gemini API docs translated into copy-paste prompts
Primary video “5 developer tips for working with Gemini 4” by Patrick Lober and Genevieve Huskens, Google DeepMind (Google for Developers)
Official docs Gemini API documentation: Choosing a model, Latest Gemini models, Coding agent setup
Verification date Pricing, context ceilings, and free-tier rules checked December 4, 2026

The DeepMind video lays out five solid engineering habits, yet skips model selection, token pricing, and concrete prompt wording. The breakdown below fills those gaps directly from the Gemini API documentation.

Which Gemini 4 model should coding agents start with?

Start with gemini-4-hydrogen for everyday coding and agent runs, and pair it with gemini-3.5-flash-lite for high-volume worker tasks. All three Gemini 4 models share a 1M-token context window and identical built-in tools (Google Search, code execution, function calling, computer use, and structured outputs); they differ in speed, thinking depth, and price.

Model Speed Thinking levels Input / Output per 1M Free access
gemini-4-hydrogen Fast low, medium, high (default), xhigh $1.50 / $7.50 Free API tier and AI Studio
gemini-4-neon Moderate low, medium, high (default), xhigh $3.00 / $15.00 Paid API (or AI Pro/Ultra)
gemini-4-carbon Deliberate low, medium (default), high $4.00 / $20.00 Paid API (or AI Ultra)
gemini-3.5-flash-lite Fastest minimal (default) to high $0.30 / $2.50 Free API tier

Source: Google Gemini API documentation, checked December 4, 2026. Carbon output ($20/1M) costs 8x Flash-Lite ($2.50/1M) and 2.7x Hydrogen ($7.50/1M).

Compare Gemini 4 models against competing coding models on the Benchmarks Leaderboard or size a local coding-agent workstation in the PC and Local AI Builder.

Tip 1: Agree on a plan before writing code

The most expensive agent mistake is letting a long job edit files in the wrong direction. Google advises aligning on intent first. In Google AI Studio, plan mode drafts an implementation plan for approval before code edits start. In tools without plan mode, prepend this prompt:

Before writing any code, give me a numbered plan:
1. What you will build and what you will NOT touch
2. Files you expect to change
3. How you will verify each step
4. Open questions for me
Wait for my "go" before starting.

Putting “what you will NOT touch” at item 1 stops agents from opportunistically refactoring unrelated files.

Tip 2: Give the agent an objective definition of done

An agent that can verify its own work fixes errors without manual intervention. Google recommends tying completion to executable proof such as unit tests or browser screenshot checks:

Done means: `npm test` passes with 0 failures AND a screenshot of
/settings matches the attached mockup. After each change, run the tests.
If they fail, fix and re-run before telling me you're finished.

“Looks done” is not an exit condition; “0 test failures” is.

Tip 3: Attach images and recordings instead of prose

Gemini 4 accepts images, audio, video, and PDFs natively. Attaching a visual reference removes ambiguity faster than writing paragraphs of bug descriptions:

  • UI work: attach a target screenshot or Figma export.
  • Interactive bugs: attach a short screen recording showing the reproduction steps and faulty state.
  • Data pipelines: attach a sample input file paired with the expected output.

Tip 4: Use a lead orchestrator and delegate sub-tasks

For multi-file projects, Google recommends assigning a lead model to decompose work and delegate bounded sub-tasks (implement one module, run tests, inspect documentation) to worker agents. Delegation keeps each sub-agent’s context clean and reduces API spend by pairing a stronger lead with Hydrogen or Flash-Lite workers:

You are the lead. Split this task into independent sub-tasks.
For each one, write a short brief (goal, files, definition of done)
and delegate it. Review every result before merging it.

Tip 5: Turn session fixes into a reusable SKILL.md

At the end of a long coding session, ask the model to audit what broke initially and save the working procedure into a concise SKILL.md file loaded automatically in future sessions:

Look back at this session. What did you get wrong at first, and what
fixed it? Write a SKILL.md with: when to use it, the steps that worked,
commands to run, and mistakes to avoid. Keep it under 60 lines.

An illustrative minimal SKILL.md template:

---
name: deploy-preview
description: Build and deploy a preview of the web app and verify it
---
# Steps
1. Run `npm ci` then `npm run build` (never skip the clean install).
2. Run `npm test`; stop if anything fails.
3. Deploy with `npm run deploy:preview` and open the printed URL.
4. Screenshot /, /login and /settings and compare with the last run.
# Mistakes to avoid
- The build fails silently if .env.preview is missing. Check it first.

Of the five habits, maintaining skills compounds longest because solved edge cases persist across sessions.

Bonus: Official Gemini API skills and live Docs MCP server

Because pretrained models lag behind SDK releases, agents often output deprecated model IDs or the legacy google-generativeai library instead of google-genai. Google publishes official agent skills and a live Gemini Docs MCP server to keep generated code current:

npx skills add google-gemini/gemini-skills --skill gemini-api-dev --global
npx skills add google-gemini/gemini-skills --list

Google lists support for Claude Code, Cursor, OpenAI Codex, and VS Code, and bundles the skills and MCP server directly in Google Antigravity as the Gemini API plugin. The five habits themselves transfer cleanly to any modern coding agent.

What to skip and scope limits

Skip plan approval gates and multi-agent delegation on small 10-minute fixes where orchestration overhead slows delivery. Skip gemini-4-carbon as an everyday default because its $4 / $20 pricing and deliberate latency target hard reasoning steps rather than routine coding.

Limits: these templates are derived from official Google DeepMind guidance and API documentation rather than timed completion-rate benchmarks. Confirm live pricing and free-tier policies on Google’s API documentation before building production systems.

The verdict

Adopt Tip 2 first if only adopting one habit: an executable definition of done costs two lines and enables autonomous self-correction. Start repositories on gemini-4-hydrogen with the plan-first and verification prompts, install Google’s official gemini-api-dev skill to eliminate deprecated SDK imports, and route high-volume sub-tasks to gemini-3.5-flash-lite. Escalate to Neon or Carbon only when Hydrogen visibly stalls on reasoning.

The catch: on the free Gemini API and AI Studio tier, Google may use prompts to improve its products, so keep private or proprietary source code strictly on the paid API tier.

Quick answers

Which Gemini 4 model is best to start with for coding?

Google recommends starting with gemini-4-hydrogen ($1.50 in / $7.50 out per 1M tokens) for fast coding and agent loops, escalating to gemini-4-neon or gemini-4-carbon only for harder reasoning.

Is Gemini 4 free to use for coding?

gemini-4-hydrogen and gemini-3.5-flash-lite include a free API tier and free access in Google AI Studio, while Neon and Carbon require the paid API tier or paid Google AI plans. Keep private code off the free tier because Google may train on free-tier prompts.

What is a SKILL.md file in coding-agent workflows?

A SKILL.md file is a short Markdown instruction sheet capturing verified commands, deployment steps, and pitfalls so a coding agent loads those lessons automatically in future sessions.

How large is Gemini 4’s context window and output limit?

Hydrogen, Neon, and Carbon all share a 1 million token context window. Output defaults to a 64K-token ceiling and can extend up to 1M tokens with long decode enabled.

LIVE DESK // BENCHMARQUE TOOLS

Track live street prices in the Hardware Market, check Hot Deals, or compare configurations in the PC and Local AI Builder and Benchmarks Leaderboard.

Sources & Primary Filings

4 cited
  1. Google for Developers: 5 developer tips for working with Gemini 4 (Patrick Lober and Genevieve Huskens, Google DeepMind) youtube.com
  2. Google AI Studio: Choosing a Gemini model (checked Dec 4, 2026) aistudio.google.com
  3. Google AI Studio: Latest Gemini models and pricing (checked Dec 4, 2026) aistudio.google.com
  4. Google AI Studio: Coding agent setup, official skills, and Gemini Docs MCP server aistudio.google.com

The Monday Hardware & AI Briefing

Verified street-price drops, buy-or-wait signals, and reproducible benchmark tables every Monday morning. Zero popups, one-click unsubscribe.

Reader focus

Sponsor a benchmark series or hardware briefing on The Benchmarque. View media kit and sponsorship options.