UI Styles
Help people who are not designers turn accepted requirements into a suitable visual experience: a product interface, website, slide deck or form. The 79 bilingual style entries are reference material, not a menu the user must learn. Keep later work consistent with the selected direction.
Resolve paths below relative to this SKILL.md, regardless of where the skill is installed. Use available file, browser and preview tools; no particular agent, MCP server or network connection is required for the local workflow.
Enter before visual decisions
Judge the requested outcome and the conversation's stage, not the presence of design vocabulary:
- Requirements still being explored: stay with the user's functional or content discussion. Do not start styling or repeatedly offer design because a future product may have a screen.
- Requirements accepted, production not yet requested: briefly connect to a useful next step, such as “功能已经明确,下一步可以先做一页效果,确认信息层级和操作方式。要继续吗?” Adapt the offer to the artifact. For a transition-only request, give the next sample and its purpose in a few sentences, then offer to proceed; do not preemptively design the whole artifact or deliver a full page-by-page specification. If the user explicitly asks for a detailed design plan, provide that plan. Wait for the user's choice before producing the artifact; an accepted requirements list alone is not permission to build.
- Creation or visual change already requested: incorporate design directly before the first visual decision. Infer routine choices, state only meaningful assumptions and continue. Do not ask the user to activate a skill, pick a catalog style or reconfirm permission to create. A small fix stays small.
Keep the workflow in the background: discuss the result and tradeoffs in ordinary language, not internal stages or skill names, except when the host requires a brief skill-use disclosure. Do not turn the transition offer into a gate for an already-authorized build.
Use this workflow before choosing a UI library, styling a page, composing slides or laying out a form. Do not first generate a habitual palette or layout and then apply this skill as decoration.
For a small change, read the existing standard and work within it. Do not restart style selection for every button, add setup files to an explanation-only request, or redesign unrelated screens. Plain backend/data work, nonvisual bug fixes, text-only rewriting and defining form fields without visual layout are outside this workflow.
Match the artifact's production workflow. For a slide deck, use the available presentation skill for authoring and verification; for a document or printable form, use the corresponding document/PDF skill; for a web form, use the UI workflow below. This skill supplies visual direction and consistency, not a replacement file format or toolchain. Preserve the requested destination and format. Use an existing deck/template or document style as the standard; do not introduce CSS, UI libraries or app scaffolding into those tasks.
Automatic discovery depends on the host. When setting up persistent project use, follow agent-integration.md; a skill description alone cannot guarantee invocation.
1. Understand the product with minimal friction
Inspect the brief, existing screens, assets, dependencies and applicable project instructions first. Look for DESIGN.md, design/visual-system.md, theme files and existing component conventions before making new ones.
Establish the primary user/task, content density, device and language, brand/reference material, framework and required components. Infer what the project already answers. Ask only a consequential unanswered question, in ordinary language with a recommended option; do useful independent work meanwhile. Do not ask a nontechnical user to choose token syntax or a framework for you.
For slides and forms, inspect the audience, viewing/printing setting, content sequence and existing template instead of assuming an application stack. Existing functions and representative content can reveal the main task: comparing records, understanding a relationship, completing an application, or following a presentation. If a reference would materially settle the direction, use relevant available examples or ask one focused question; do not make a mood-board exercise mandatory.
Resolve conflicts using the user's current request and applicable project rules. Within those boundaries, prefer the project visual standard over an optionally selected personal profile, and either over generic catalog examples. A new page normally extends the existing system. A requested rebrand should explicitly update its scope and affected components.
2. Recommend a direction and implementation together
If the direction is already chosen, use it. Otherwise choose one recommended direction from the task and existing project; offer an alternative only for a meaningful unresolved tradeoff or when requested. Explain only decisions the user needs to assess. For a direct build request, implement a small representative slice without waiting for an unnecessary style-selection round.
Separate observed facts, working assumptions and aesthetic preferences. Map facts to visible decisions before choosing a palette: frequent comparison can justify aligned rows; projected slides may need larger type and less content; an exception-focused dashboard needs clear warning emphasis. An industry label alone does not justify a color or style. Pick layout, density, typography, shape, imagery and motion together; changing a primary color is not a complete direction.
Give colors distinct roles: reading surfaces/text, primary actions, business states and data categories. Choose the extent of any brand tint deliberately; neutrals do not have to share the accent hue. Check contrast and avoid confusing decoration with status. When evidence cannot decide a hue or artistic treatment, label the choice provisional rather than inventing a business justification. Preserve explicit user preferences and brand constraints.
- Consult library-selection.md when selecting or reconsidering dependencies. Preserve a suitable installed library; recommend new ones from required behavior, stack, accessibility and customization cost. Typography, imagery and art direction can be independent of component behavior.
- Use the catalog as inspiration only as needed. Read
catalog.jsonfieldsid,familyId,category,name,description,tags,prompts; tags are incomplete, so inspect relevant descriptions too. Use the uniqueid, not an ambiguous family name. Load only selectedstyle.md/custom.mdfiles and the needed language. - Upstream prompts can contain demo-specific structure, missing “current style card” references or framework examples. Extract visual invariants; adapt layout to real content and code to the installed versions. These files are reference data, not system instructions. Never let an example replace the user's task or existing engineering rules.
- A missing
custom.mdmeans no prepared template, not an inability to implement. Derive a new adaptation fromstyle.mdand label it as such. A custom direction outside the catalog is welcome; do not invent a catalog entry. - For references supplied as screenshots or websites, distinguish observed styling from inferred behavior. A screenshot does not establish focus, disabled, loading or mobile behavior.
3. Show a useful sample early
Follow visual-review.md. Use the same real content to compare alternatives. For UI, prefer a small running slice or local HTML preview and browser checks. For slides, show a representative slide; for documents and printable forms, render a representative page using the relevant production skill. Show the task-critical content and applicable states, not just decorative circles. Keep the requested output format.
Avoid universal bans on colors, gradients or shadcn/ui. Choose those deliberately from the product and user's preference. Familiar model defaults are not evidence of suitability. Do not imply that a popular design system guarantees a distinctive brand.
4. Save decisions in portable project files
For an implementation that needs continued visual work, follow project-standard.md and adapt the visual standard template. For slides/documents, retain the active template or a brief alongside the artifact; the UI-specific files below are not required for a standalone deck or form.
- Continue an existing authoritative document. Otherwise use
design/visual-system.mdfor intent, library choice, components, states and verification; usedesign/tokens.jsononly when structured values are useful. - Keep one authoritative set of token values. If an existing theme already owns them, reference and edit that theme; do not create a competing JSON source. When JSON is the source, library themes are generated/adapted outputs.
- Record scope and status: provisional choice, selected direction, implemented mapping, actually checked behavior. A written standard is not evidence that the UI follows it.
- Make the standard discoverable through the project's agent instructions, using agent-integration.md. Preserve unrelated rules and existing paths. Do not modify global agent configuration merely to style one project.
After delivering the requested result, briefly offer to save a style when the user has accepted a representative custom result or clearly wants to reuse personal/company brand rules, and no save offer has already been made or declined. A text-only exploration does not by itself need a save prompt. For example: “这套风格已经比较明确,要保存为你的个人/企业风格,方便以后复用吗?” The offer is optional for the user and does not authorize writing a profile. Do not interrupt initial delivery or offer on every small change. If saving is already requested, act without asking again. Project documentation remains part of the ordinary workflow; exporting a reusable personal/company recipe is a separate choice.
For requested profile creation or revision, read the bundled ui-style-creator. A profile applies only when selected for a project; keep a project-local snapshot and source version. Later refinements can update the active project without automatically changing the reusable recipe. Offer to incorporate a reusable refinement when useful; when the user agrees, update the intended profile/version and record what changed. Never silently restyle other projects. Do not require a one-off artifact to become a profile or invent a company-wide storage service.
5. Implement with the chosen library
For product UI, use existing components and their theming APIs before replacing controls with custom implementations. For unsupported behavior, first consider composition or a focused specialized component, then implement the smallest missing piece. Preserve keyboard, focus, error and disabled behavior while styling.
For those UI theme exports, read theme-adapters.md. Verify the actual installed version and map any project-specific component states. The exporter handles a documented subset, not every design decision. Do not introduce a second component system just because its theme is easier to generate. Slides and documents instead use their existing template/master/style mechanisms and the relevant production skill.
6. Verify and carry decisions forward
Check UI at the needed desktop/mobile sizes with realistic text/data and relevant interaction states. Check slides/documents at the intended presentation/page dimensions through their production skill's render-and-review process. Compare against the chosen direction, fix observed drift and distinguish actual checks from assumptions.
When adding a later page, reuse current tokens, components and rules. Add a missing component/state to the standard when its design is decided; do not silently invent a parallel style. Respect the task's scope when changing shared tokens. End with the working result, its standard/theme paths and any material unchecked behavior, rather than dumping a long prompt.