跪拜 Guibai
← All articles
Frontend

Oil UI: A Design Skill That Forces AI Agents to Escape Default-Template Interfaces

By oil欧哟 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI-assisted frontend work keeps ending up with generic, inconsistent results that need heavy manual rework. Oil UI's concrete rules and mandatory review step offer a repeatable way to keep AI agents on a coherent visual track without sacrificing speed.

Summary

AI-generated interfaces tend to collapse into the same bland template: blue-purple gradients, left-right columns, English pill labels above headings, and nested rounded cards. Oil UI counters this by splitting design rules across landing pages, content pages, and admin workspaces, so the agent reads only the relevant spec for the current page type.

The skill also makes the agent generate three genuinely different layout directions for new products, with a rule that no two options share more than one of four dimensions: layout skeleton, font pairing, color, and key visual. A built-in comparison page lets developers pick a direction and copy the instruction to continue coding.

For existing projects, Oil UI consolidates conflicting design docs into a single DESIGN.md and prevents common AI mistakes like hardcoding pixel sizes or overriding shared component styles. It also forces a context-free sub-agent to review real browser screenshots, raising review dispatch from 0/6 to 5/6 in tests, at a cost of about 2.3x tokens and 25% more time per page.

Takeaways
— Oil UI splits design rules by page type: landing pages get bold layouts, admin dashboards get high density and thin top bars.
— For new products, the agent generates three interactive options with a constraint that any two share at most one of four dimensions: layout, fonts, colors, and key visual.
— Existing projects with conflicting design docs get consolidated into a single ~100-line DESIGN.md at the project root.
— AI agents commonly hardcode fixed pixel dimensions, override shared component styles, and revert previous good changes during multi-round edits.
— A context-free sub-agent reviews real browser screenshots on desktop and mobile, scoring on a 10-point scale; dispatch is mandatory by default.
— In tests, mandatory review raised dispatch from 0/6 to 5/6, and blind comparisons showed 3 wins and 0 losses for the reviewed version.
— The cost of review: about 2.3x token consumption and 25% longer time per new page.
— The skill can be installed via `npx skills add oil-oil/oil-ui` and works with any AI agent that supports skills.
Conclusions

Letting a model decide whether to run a review is a clear failure point; the 0/6 dispatch result shows that self-judgment is unreliable when it conflicts with saving effort.

Forcing dissimilar options across layout, font, color, and visual dimensions is a sharp way to break the model's tendency toward safe, template-like outputs.

Skill-based constraints raise the floor but cannot erase a model's intrinsic habits, so choice of model still matters for final quality.

Separating review context from generation context is effective because the generating agent's own context blinds it to obvious visual issues.

Concepts & terms
AI Agent Skill
A packaged folder of instructions, rules, and helper scripts that can be loaded into an AI agent's workflow to steer its behavior for specific tasks, such as frontend design.
DESIGN.md
A single project-root markdown file that consolidates all UI design rules, resolving conflicts between separate spec files so the AI agent follows one consistent source of truth.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗