Philipp Schmid's Gemini coding workflow: Fewer conflicting rules and staged context handoffs

QbitAI covers Philipp Schmid's five Gemini 4 Neon changes: trim obsolete rules, clarify tool interfaces, load skills on demand, inspect visuals, and hand off between stages. Configuration deletion and context thresholds are personal practices to test against project constraints.
The configurations and code snippets in this article are examples from the interviewee's personal workflow, not instructions to delete project rules unconditionally. Security, permissions, privacy, and valid project conventions should be preserved. API parameters, context limits, and compaction thresholds must be checked against the tool version in use; the original article's rule of thumb of 500,000 tokens is not guaranteed to suit every environment.
Good news for anyone who has switched to Gemini over the past couple of days!
Google's counterpart to Tibo, Philipp Schmid, has just posted his inside approach to using the recently well-received Gemini 4 Neon, offering a hands-on lesson.
He says everyone using Neon should carefully inspect their old configurations and clean out outdated and duplicated rules.
His own GEMINI.md now fits on a single screen.

Philipp believes outdated rules can conflict with current instructions, leaving a model wrestling with contradictory demands and consuming extra tokens.
Worse still, after all that, the model will often follow the incorrect old rules anyway, affecting the output.
In his article, Philipp also offers several practical suggestions on capability loss after long-context compaction and on writing and invoking tool rules:
For example, to reduce the degradation caused by compacting long conversations, he suggests proactively asking the model to record the goal, key decisions, and file paths at the end of each stage, then continuing in a new session.
For tool calls, examples can be removed so the model operates directly according to the interface rules, reducing errors caused by mechanically copying examples.
……
Philipp is currently a Staff Engineer at Google DeepMind, responsible for developer experience and relations. Like Google's Tibo, he helps developers use models such as Gemini and Gemma.
Before joining Google in 2025, he was a technical lead at Hugging Face.

Below is an edited version of the original article. Those using Gemini 4 Neon can hand this tutorial directly to their model!
Five habits I changed after using Gemini 4 Neon
When you use a coding agent, the prompt you type makes up only a small part of the context. The rest consists of system instructions, tool definitions, skills, and previous conversation history.
Many of these rules continue to apply to later requests, even when they no longer suit the current task.
Over the past few weeks, I have used Gemini 4 Neon every day to write code and run evaluations. I found that rules originally added to compensate for older models' weaknesses can now interfere with the new model's judgment.
Some situations the model could otherwise handle become more error-prone once these constraints are added.
After changing models, I reviewed my configuration and made the following five adjustments.
1. Remove conflicting rules first
Previously, whenever I encountered a problem, I added a rule.
If the model wrote unnecessary comments, I limited comments. If I worried it might change code it should leave alone, I added another rule restricting the scope of edits.
Over time, user-level instructions, project-level instructions, and the current task began to conflict.
For example, if a global rule prohibits comments but my current request is to document a public function, I am giving the model two contradictory instructions.
In tests, Gemini 4 Neon spent additional thinking tokens deciding which instruction to follow, but sometimes still followed the old rule and left the current task unfinished.
So I removed overly strict code-style constraints and instead asked the model to follow the existing code's style, naming conventions, and comment density, making decisions based on the actual project.
After the change, the model spent fewer tokens on rule conflicts, and task accuracy improved.

My user-level GEMINI.md now fits on a single screen.
It retains only requirements that apply to every session: which actions need confirmation first, how to verify information, how to report progress on long tasks, and preferences for response language and formatting.
Here is an excerpt:
Draft locally and show diffs or commands before pushing, deploying, opening PRs, or editing shared docs. - Verify claims, numbers, quotes, and URLs against primary sources or raw outputs instead of guessing. - Set a monitoring timer with progress updates for long evals or background jobs. - Front-load answers in Simplified Technical English using short sentences, active voice, and honest phrasing. - Avoid inline backticks, bold text, em dashes, horizontal dividers, and parenthetical clutter in prose.
Task-specific procedures go into skills, to be read when needed.
I also found that a long list of prohibitions did not make older models inspect code without changing it when investigating bugs. It merely created more instruction conflicts and burned more thinking tokens.
With Gemini 4 Neon, I simplified the rules, and it could still keep changes within the requested scope.
2. State tool rules once in a clear interface
With earlier model generations, I often had to write tool rules twice: once in the tool definition and again in the system instructions. Sometimes I also needed few-shot examples showing how to fill in parameters.
The old configuration below, for example, repeats rules for code editing and plan updates in two places:
Previous setup: duplicated rules in system instructions + tool descriptions # System instruction: # - For code edits, always call edit_file on small sections instead of rewriting whole files. # - Always update your plan with update_plan before editing, keeping one step in_progress. # # Tool description (repeated again): # - edit_file: “Edit a file. Prefer small targeted edits over full rewrites.” # - update_plan: “Track steps. Keep one item in_progress. Example: […]”
After switching to Gemini 4 Neon, I removed the duplicated tool rules from system instructions and also removed the few-shot examples.
Examples help with common tasks, but can constrain how a model approaches special cases. When the task changes, the model may keep copying the example's fields and parameter structure, inserting extra fields or using an unsuitable format, causing the call to fail.
Now tool rules are concentrated in the interface and stated only once. When building an agent with the Gemini API, you can define parameter types, allowed values, and required fields directly in the tool's JSON Schema.
The task-checklist tool below, for example, requires a title and status for every step. The status must be one of four values, and additional fields are prohibited. The tool description also specifies that only one step may be in progress at a time:
{ “name”: “update_plan”, “description”: “Update the task checklist. Keep only one step in_progress at a time.”, “parameters”: { “type”: “object”, “properties”: { “steps”: { “type”: “array”, “items”: { “type”: “object”, “properties”: { “title”: { “type”: “string” }, “status”: { “type”: “string”, “enum”: [“pending”, “in_progress”, “done”, “skipped”] } }, “required”: [“title”, “status”], “additionalProperties”: false } } }, “required”: [“steps”], “additionalProperties”: false } }
If you use coding agents day to day, you can apply the same approach to helper scripts and command-line tools in your repository: define parameters clearly, constrain allowed values, and provide explicit error messages. These designs help models call tools correctly more than lengthy usage examples do.
I also reduced the number of tools given to the model and limited their returned content. There is no need to retain multiple search tools with overlapping functions.
Large volumes of logs produced by commands are saved to files first. Read the relevant sections when needed instead of putting the entire output into context.
In my experience, with clear interfaces, Gemini 4 Neon can follow rules stated only once in a tool interface even during a long session.
Removing duplicated explanations from system instructions reduces context redundancy without impairing tool calls.
3. Load skills only when needed
I deleted most project-level AGENTS.md and GEMINI.md files.
Much of their content merely repeated the directory structure, which the model could learn by inspecting the repository itself. Other files kept accumulating new content with little cleanup, gradually collecting large amounts of outdated guidance.
Now I retain only a short project description and special conventions the model cannot discover simply by reading the code.
For example, a project might use a nonstandard command to run tests, or require all shared types to live in a particular file. Those details need to be explained in advance.
Specific procedures for long-form editing, UI standards, API reviews, and CLI usage go into separate skills, with a one-line description in an index so the model can find them according to the task.

Skills themselves should also be lightweight. Clearly state team conventions and required checks, without prescribing steps for every possible situation.
If there is a lot of material, split it into linked files. The agent reads the relevant part when it reaches that stage.
This is especially useful for frequently updated CLI tools, SDKs, and internal APIs.
Having the model read the latest guide before use reduces incorrect parameters and calls to deprecated interfaces.
Reading a skill also consumes tokens, but in tests the reduction in repeated trial and error led to lower total token use.
Gemini 4 Neon is also more reliable at finding and loading skills and loading tools lazily. It can generally find the guidance needed for the current task, so there is no need to fill the context with every file and tool definition at the start of a session.
4. Use images and video for guidance and verification
For ordinary backend code changes, a few brief written requirements are enough. But once UI layouts, architecture diagrams, or animation are involved, text alone leaves too much room for misunderstanding.
With Gemini 4 Neon, I increasingly use images and video both as references and as a means of acceptance checking.
Rather than laboriously writing two paragraphs of CSS rules to describe a layout or chart style, provide a reference screenshot or a screen recording of a dozen or so seconds. The desired feel and spacing are all there.
After the task, I also have the agent actually render the page, chart, or video frames, open the resulting PNG or video clip, and inspect it before reporting completion.
A glance at the image reveals clipped text, odd label wrapping, and misaligned elements: things text logs alone cannot show.
5. Hand off context instead of endlessly compacting it
Even with a one-million-token context window, an overly long coding session becomes increasingly cluttered and slower to respond, eventually requiring compaction.
But compaction loses information. Having an agent summarize halfway through a task can interrupt the prompt cache and omit specific code details. Over the next few turns, the model then has to reread files it has already seen.

So I now prefer to divide the work into stages proactively rather than let one session drag on indefinitely.
When a task moves to its next stage, I ask the agent to write a short handoff file recording the current goal, settled decisions, and exact paths of relevant files. I start a new session with that file and carry on.
If I want to advance another piece of work at the same time, I fork a new session from the current point. The two tasks proceed independently instead of queuing in a single session.
For example, after running an evaluation and examining failure logs, I first have the agent generate a handoff file, then open a new session to write the analysis report. Meanwhile, I fork the original evaluation session to generate charts from the results it has already read, then inspect those charts for correctness.
If you build your own agent, automatic compaction can remain a fallback, but do not trigger it too early.
In my experience, triggering it at around 500,000 tokens works well. Keeping context longer avoids the hassle of prematurely resetting the cache and rereading files.
When generating a summary, preserve the paths of files being worked on and decisions already made, so the model has the key information needed to continue.
Putting these settings together
If you are going to adjust a Gemini 4 Neon workflow, review the contents of the context one item at a time and remove what is unnecessary.
User-level rules: Keep the global GEMINI.md brief, retaining general security requirements and response preferences. Use fewer rigid prohibitions on code style and provide criteria for judgment, such as following the project's existing conventions.
Tool and script interfaces: When building an agent, put tool rules in JSON Schema, clearly specifying parameter types and allowed values, and remove few-shot examples and duplicated system instructions. Apply the same standard to command-line parameters and helper scripts when using coding agents day to day.
Project files and skills: Clean up lengthy project-level AGENTS.md and GEMINI.md files, retaining only matters requiring special explanation in the codebase. Put task-specific procedures in brief skills; split longer material into linked files.
Visual references and checks: For tasks involving visuals, supply a reference screenshot or short recording directly. Before delivery, have the agent open and inspect the actual rendered result.
Session handoffs: Avoid compacting context halfway through a task where possible. At stage boundaries, start a new session with a brief handoff file; fork the current session when there are parallel tasks.
Remove conflicting instructions and duplicated tool explanations so Gemini 4 Neon can spend more thinking tokens on the current task.
Thank you for reading!
Reference [1] https://x.com/_philschmid/status/2125579472594223340
This article is from the WeChat public account QbitAI, by QbitAI.
Related topics
After reading
Join the AINRK community
Read how to join the community and connect with people working in AI.




