UI Skills
repository·main·Indexed 26 days ago
https://github.com/ibelick/ui-skillsA specialized toolkit for Design Engineers providing structured UI skill sets for agents to perform UI-related tasks. It includes a CLI for managing skill sets, the `baseline-ui` skill for enforcing opinionated constraints on spacing, typography, and layout, and the `create-design-md` skill for documenting design languages and tokens in a DESIGN.md file.
What's inside ui-skills
- UI Skills is a toolkit designed for Design Engineers. It provides specialized skill sets that can be routed to agents to assist with UI-related tasks. You can find more information at ui-skills.com.
Use the create-design-md skill
mainThe
create-design-mdskill is used to create or update aDESIGN.mdfile for a product or website. This document records the design language, visual system, and design tokens. It is used to provide persistent UI context to coding agents or to reconstruct a design system from a public website.Key Constraints:
- Modify only
DESIGN.md. Do not change product source, dependencies, or configuration. - Do not copy every discovered token; only record the governing design language.
- Do not convert local styling or visual preferences into product intent.
- Modify only
Use the fixing-motion-performance command
mainYou can use the
fixing-motion-performancecommand to audit or apply animation performance constraints to your UI work./fixing-motion-performance: Apply these performance constraints to any UI animation work in the current conversation./fixing-motion-performance <file>: Review a specific file against the performance rules. The tool will report:- Violations (quoting the exact line or snippet)
- Why it matters (a short explanation)
- A concrete fix (code-level suggestion)
Note: Do not migrate animation libraries unless explicitly requested. Apply rules within the existing stack.
Apply interaction and layout constraints with baseline-ui
mainAdhere to these interaction and layout standards:
- Destructive Actions: MUST use an
AlertDialogfor irreversible actions. - Loading States: SHOULD use structural skeletons.
- Viewport/Safe Areas: NEVER use
h-screen; useh-dvhinstead. MUST respectsafe-area-insetfor fixed elements. - Inputs: NEVER block paste functionality in
inputortextareaelements. - Errors: MUST show errors adjacent to the action that triggered them.
- Z-Index: MUST use a fixed
z-indexscale; do not use arbitraryz-*values. - Sizing: SHOULD use
size-*for square elements instead of separatew-*andh-*classes.
- Destructive Actions: MUST use an
Apply typography and design constraints with baseline-ui
mainUse these standards for typography and visual design:
Typography
- Text Wrapping: MUST use
text-balancefor headings andtext-prettyfor body/paragraphs. - Data: MUST use
tabular-numsfor numerical data. - Density: SHOULD use
truncateorline-clampfor dense UI. - Spacing: NEVER modify
letter-spacing(tracking-*) unless explicitly requested.
Design
- Gradients: NEVER use gradients (especially purple or multicolor) unless explicitly requested.
- Effects: NEVER use glow effects as primary affordances. NEVER animate large
blur()orbackdrop-filtersurfaces. - Shadows: SHOULD use Tailwind CSS default shadow scale unless requested otherwise.
- Empty States: MUST provide one clear next action for empty states.
- Colors: SHOULD limit accent color usage to one per view and use existing theme/Tailwind tokens before introducing new ones.
- Text Wrapping: MUST use
UI Best Practices (Do's and Don'ts)
mainEnsure your implementation follows these accessibility and aesthetic rules:
- DO: Provide visible focus states.
- DO: Respect
prefers-reduced-motion. - DO: Provide one clear action in empty states.
- DON'T: Use glow, gradients, or decorative colors when neutral styling is sufficient.
Use the UI Skills CLI
mainTheui-skillsCLI allows you to interact with the skill sets. You can start a session to route an agent through specific UI skill sets, list available categories, or retrieve specific skill sets.Choose between Repository and URL modes for DESIGN.md
mainWhen using
create-design-md, you must choose the appropriate mode based on available access:Repository Mode
Use when a local product repository is available. The
DESIGN.mdis created or updated at the root of the selected product. This mode is preferred as it can establish normative values, token names, and documented rationale.URL Mode
Use when only a public URL is provided. This mode reconstructs a
DESIGN.mddraft in the current workspace by inspecting the DOM, computed styles, and stylesheets at desktop and mobile widths.Note: URL mode can only establish observable visual patterns and computed values; it cannot establish internal token names or undocumented rationale. If rendered inspection is unavailable, you must ask for screenshots or source files.
Validate DESIGN.md with lint and export
mainAfter writing a
DESIGN.mdfile, perform structural linting and a compatibility export to ensure the document adheres to the schema and can be correctly transformed for your target environment.1. Linting
Run the structural linter:
npx @google/design.md lint DESIGN.md2. Exporting
Run a compatibility export using your target format:
npx @google/design.md export --format <format> DESIGN.md3. Verification
Inspect the export output. Every populated frontmatter category must emit its corresponding token category in the export. If a category is missing from the export, the document is invalid and must be rewritten.
For
css-tailwindtargets, verify the following mappings:colors$\rightarrow$--color-*typography.<name>.fontFamily$\rightarrow$--font-*typography.<name>.fontSize$\rightarrow$--text-*rounded$\rightarrow$--radius-*spacing$\rightarrow$--spacing-*
Note: If
typographyis populated but the export lacks--font-*or--text-*tokens, the document is invalid.npx @google/design.md lint DESIGN.md npx @google/design.md export --format <format> DESIGN.mdReport UI findings using the standard template
mainOnce findings are vetted, report them using the following structure. Order findings by confidence, user impact, reach, and cost. Stop after a maximum of three findings.
## Design language - Audited surface: - Design sources: - Documented decisions: - Governing owners and consumers: - Explicit exceptions: ## Findings | # | Problem | Evidence | Proposed change | Scope | Confidence | | --- | --- | --- | --- | --- | --- | ## Improve first <Highest-leverage finding and why, or no supported recommendation.>Requirements:
- Every row in the table must include the
Confidencecolumn. - If no findings survive, use:
No supported findings were found.under## FindingsandNo supported recommendation.under## Improve first. - After reporting, ask the user which findings to turn into implementation plans.
- Every row in the table must include the
Follow performance guidelines with baseline-ui
mainTo maintain high performance, follow these rules:
- Will-change: NEVER apply
will-changeoutside of an active animation. - React Logic: NEVER use
useEffectfor logic that can be expressed as standard render logic.
- Will-change: NEVER apply
Specify implementation changes for selected findings
mainWhen a user selects a finding to be fixed, write one self-contained plan per selected change.
Workflow:
- Re-open cited sources and record the current commit.
- Identify exact reusable primitives and exemplars.
- Trace all affected surfaces.
- Reconcile with existing plans instead of duplicating them.
Constraint: Do not invent values. If the repository provides a token or component contract, use it. Only introduce a new primitive if you can prove the existing system cannot express the decision.