Gemini followed my UI skills and Opus skipped them: deleting 95% of my agent rules
Guardrails written for older models poison newer ones that actually follow them: cutting 95% of my agent config (222.3 KB to 11.4 KB) fixed my UI builds.
Read context and raw numbers
I realized Gemini wasn't making good UI, so I dug in, and it turned out my skills were giving it bad advice. They were written for a prior generation of model that struggled with following the plot.
When I tell my coding agent to build UI's 'similar to Google Workspace', it keeps the UI tight and unnecessary wording to a minimum. Ask for any other type of page, though, and random elements get strewn all over.
I wanted to know why. Last night I pointed my agent at 528 local transcripts and all my personal repos (45 recent runs, including 19 Claude Opus sessions). That check showed the flip side of last week's ast-graph audit.
In its best UI sessions, Opus opened zero of my custom UI skills. It used clean hierarchy: one primary action, 1 to 2 word labels, and plain English intent.
Why was Opus at zero? Rules in GEMINI and AGENTS load in full on turn 1. Skills only appear as a 1 line menu description that costs an extra read_file call to open. Just like lazy MCP schemas last week, Opus skips that menu unless AGENTS names a skill path, and goes straight to the repo code. Gemini scans the menu on turn 1 and opens every match (86 skill reads vs. 7 for Opus on this laptop).
So Gemini read and obeyed the global and copied repo UI skills I wrote months ago for smaller Flash models (and I put every one of those files there myself). Those files forced a 2 to 3 panel layout, sepia styling, and full metadata dumps. Ask for a simple login or product page and Gemini built a brown 3 column ops dashboard covered in static 'confetti pills'. Buttons got named 'lock failure bundle' instead of 'Save test fixture'. One newer repo even had a local override begging agents not to restyle toward sepia despite my global UI rule.
Scanning the rest of my repos turned up quieter bloat. Duplicate GEMINI and AGENTS files burned 34.4 KB per turn, pushing real repo architecture rules past the prompt cap and silently evicting them. Nothing threw an error. Three older repos also held 18 KB delegation tables with a retired model alias, so every subagent call failed with a 404.
| Config Layer | Before | After | What Changed |
|---|---|---|---|
| Global rules | 16.9 KB (2 files) | 5.5 KB (1 file) | -67%, stopped double injection |
| Repo rule copies | 17.5 KB (5 files) | 0 KB (removed) | -100%, stopped cap eviction |
| Custom UI skills | 81.3 KB (8 files) | 0 KB (deleted) | -100%, cut sepia & 3 pane rules |
| Delegation skills | 106.6 KB (9 files) | 5.9 KB (3 files) | -94%, deduped + fixed 404 alias |
| Total audited | 222.3 KB (24 files) | 11.4 KB (4 files) | -95% instruction footprint |
What remained in that 11.4 KB is 4 files, plus one AGENTS file per repo, with any preconditioning on visual style removed: - One 5.5 KB global rule file covering git worktree isolation and basic UX checks (1 to 2 word labels, UI tests, and checking the rendered screen), loaded on turn 1 so both Opus and Gemini see it. - Three small skills (5.9 KB total) for subagent routing, blind diff review, and one repo's memory, with all 8 custom UI skills deleted.
Rebuilding a 10 ft projector UI right after the cleanup showed the same habit is still live. Gemini opened a built in web guidance skill on step 1 (0 opens from Opus). It built desktop dropdowns until I reminded it a projector isn't a desktop browser. Put universal defaults in AGENTS so Opus sees them. Scope skill descriptions tightly because Gemini will read them. You will probably delete more than you add.