Frontend

From code-yeongyu/oh-my-openagent · View interactive version

Frontend is an AI agent skill from the GitHub repository code-yeongyu/oh-my-openagent. Builds, styles, and polishes anything drawn with HTML, CSS, or SVG: web UI, pages, components, HTML reports rendered to PDF or print, figures, PNG/SVG diagrams, slides, and images for Notion or Slack. Use for any styling, layout, animation, or visual-quality task, or when asked to make something loo

How to use this skill

Skill file

Frontend

This file is a router over references/; the rules live there. The flow is ground -> brief -> build -> subtract -> verify. The bar is restraint with a visible hierarchy: one primary action, the important thing first, nothing on the screen without a job. A quiet, correct screen that holds its hierarchy at 390 and 1440 in both themes is a finish. Atmosphere, motion, and award-grade surface work are opt-in: build them when the brief asks (a named brand, "premium", "make it stunning", a marketing page), never by default for an internal tool, dashboard, admin screen, report, or figure. An inline page shown beside a reply (a chart, table, or diagram for the host's inline-page or HTML-preview tool, such as show_html_page) follows the visualize skill when it is available; either way it is exempt from the DESIGN.md gate, the Lighthouse audit, and the research lanes, and keeps the build rules, the Draft guard, and the lint.

Route: name the references, read exactly those

Before the first edit, name the references the request routes to and one reason for each, then read them. Rows stack: take every row the request matches, so a small change that also reshapes a region takes the layout row too, and any code change takes the perfection row and, on a React project, the React tooling row. A small change on an existing surface still reads only a few; only greenfield fans out. A reference you never named is one you decided to skip; one you named but never opened is a gap you still owe.

| Request | Read |

|---|---|

| Small change on an existing surface: a fix, a new control, a restyled component, a copy or spacing change | The project's DESIGN.md (or the nearest styled sibling when there is none) plus at most ONE design reference: the Layer A style skill the project follows, or references/design/redesign-skill.md when the ask is "this looks bad" / "improve this". No DESIGN.md and no styled sibling either: README Phase 0 (it asks). |

| A new screen or flow in an existing project | ALSO references/design/README.md Phase 0 (the DESIGN.md gate and its branches) and the Layer A skill in use. |

| A new screen or flow, a redesign ("this looks bad", "make it better"), or design-system creation or rework | ALSO references/design/grounding.md (step 0 below). |

| Greenfield with no concrete reference | references/design/README.md in full: the gate, the greenfield research lanes (_INDEX.md shortlist, lazyweb.md, stylegallery.md, imagen drafts), and the style routing. One Layer A + one Layer B, read in full. |

| A concrete visual reference: screenshot, mockup, Figma export, Stitch or imagen output | references/design/image-to-code-skill.md; a live site or URL to clone: references/design/clone-from-url.md. The reference is the contract and /visual-qa runs in reference-fidelity mode. |

| Any layout or structure change: a new or reshaped region, shell, panel, split, list or grid, sticky bar, or scroll container; "what goes where"; "this layout breaks at X" | references/design/layout-skill.md for the mechanics, then references/design/stylegallery.md for the pattern contract. Write the Layout: line (Brief, below) before the code; /visual-qa A12 checks the build against it. |

| Any state or flow change: a screen that loads, saves, signs in, or runs a multi-step flow; a request, a precondition, or saved and restored state | references/perfection/state-and-flow.md. Write the state table (Brief, below) before the code; /visual-qa H12-H19 check the build against it. |

| Paged output: a PDF report, print stylesheet, headless-Chrome print pipeline, a deck printed to paper, "why is this page half empty" | references/design/print-paged-media.md: page box, fragmentation properties, the atomic-block set, the keep-together side effect that strands a block. |

| Interaction or motion: micro-interactions, transitions, gestures, hover/press/state feedback | references/design/interaction-skill.md. The beui.dev catalog is the reference: read the nearest pattern's real source through its curl recipe, adapt the mechanism to DESIGN.md motion tokens. |

| Ambience, only when the brief asks: an animated, shader, particle, or grid background; a typographic reveal; scroll storytelling; spotlight, tilt, or glowing-border cards | references/design/ambience-skill.md. The react-bits catalog is the reference: nearest pattern, real source, its retrofit checklist (reduced motion, off-screen pause, compositor-only, tokens, budget); never vendor its code. |

| Tone outside both anchors: AI-agent UI, charts, landing sections, a brutalist or Tailwind-only build, or no nearest pattern | references/design/component-catalogs.md: which catalog per tone, the exploration procedure, the licence gate. |

| Writing or modifying frontend code; auditing performance, SEO, accessibility, quality | references/perfection/README.md, references/perfection/craft-floor.md, and references/perfection/detect.md (+ react-perf-tooling.md before any React audit). Lighthouse 100 in every category on real Playwright Chromium, won in the architecture. Design and perfection load together for implementation work. |

| On request, or a greenfield palette, type, chart, or landing-structure question | references/ui-ux-db/README.md and its search CLI (library, below). A lookup tool, never the posture. |

| Creating or updating DESIGN.md; personas, critique, debt, handoff, synthetic user testing | references/designpowers/README.md + lane-c-review.md (lane-c is the Phase Final critique reviewer and fills the accessibility-constraint and accepted-debt sections). |

| Any code change in a React project | references/design/README.md Phase 0.5: the react-grab / react-scan / react-doctor check (a grep), the install when one is missing, and the dev-only gate; react-dev-tooling-skill.md for per-framework snippets. |

| "What do shipped apps in this space look like?"; design-direction research for an existing product | references/design/lazyweb.md (run its recipe verbatim) + the references/design/_INDEX.md shortlist. |

| Image only, no code: a mockup, app-screen concepts, a brand board | references/design/imagegen-frontend-web.md / imagegen-frontend-mobile.md / imagegen-brandkit.md (+ a Layer B brand if named). These never write code. |

0. Ground: know the product and the bar before designing

For a new screen or flow, a redesign, or design-system work, run references/design/grounding.md first. It reads the guideline source in full, defines the ideal state for the product's personas and journeys, and writes every gap into a ledger. The brief and the build close rows of that ledger. A small change reads the ledger when DESIGN.md has one.

1. Brief: decide what the screen is for before drawing it

Write this for every screen you build or change, into DESIGN.md section 5 beside the screen's components (the Layout: line goes under section 4, as references/design/stylegallery.md says), or into the change description when the project has no DESIGN.md. The build follows it; /visual-qa checks the rendered screen against it.

2. Build

Take the branch in references/design/README.md Phase 0 first (a small change on a surface with no DESIGN.md follows its small-change rule), and on a React project its Phase 0.5 tooling check: DESIGN.md (or, under the small-change rule, the styled sibling) exists before components do, and every colour, size, and spacing value traces to a token in it. A new system is built in this order: colour roles in both themes, then type and spacing, then components, which start from shadcn/ui anatomy (or the project's own kit) restyled with the tokens, never invented shapes. Then build to these rules; /visual-qa verifies them afterwards and should find nothing new.

Draft guard: tells kept out of the first draft

Some tells regenerate by default, so they are kept out of the first draft rather than left for QA to find.

3. Subtract

After the draft renders and the lint exits 0, walk every element on the screen and ask what the user could not do or know without it. No answer: delete it, whatever the reference or the previous version showed. Then open the brief's required-content list and confirm every item is still on the screen by name, with its own control or field. Subtraction that merges two required inputs into one, drops a datum, or shortens required copy is a regression, not a cleanup. Record what you removed under "Left out on purpose". Then count the controls: a secondary action most visits do not need moves into a menu or to the object it acts on, and groups separate by whitespace, not by boxes and borders. Fewer controls with room around them is the target.

4. Verify

Done is the /visual-qa gate, not your own glance. It owns the visual checks; this skill keeps build rules. Hand it the brief (B7 checks the primary action and priorities), the Layout: line (A12), the state table (H12-H19), the required-content list (Pass A), and, for a changed surface, the before set so it runs Before/after mode and the pair shows what improved. Its review loop is bounded (its Step 4 sets the budget): defects earn another round, and taste findings are recorded and stop it. A concrete reference runs reference-fidelity mode. Fix passes are scoped: after the first build, each fix names one change and the regions it owns (a token fix may own every region) and leaves everything else untouched, because a whole-page "make it better" pass breaks what was already right. Pass design-system decisions, evidence, and unresolved debt into /review-work for significant work.

Every UI or design-system deliverable states its WCAG 2.2 AA result. Probe the built surface in the real browser and put a table in the deliverable (PR body, change description, or reply): one row per item below, PASS / FAIL / N/A, with its evidence. A FAIL is fixed, or recorded as accepted debt in DESIGN.md section 8 with the user's sign-off.

On the grounded path, close the gap ledger row by row: each fixed gap has its before/after pair and the check that proves it.

The reference library (`references/`)

design/ holds one architecture file (design-system-architecture.md: the DESIGN.md structure, 8 sections plus a greenfield-only Research Log and the grounding gap ledger), 12 taste skills (Layer A: how to execute), 70 brand design systems (Layer B: what it looks like), and the project-original routers in the table above. _INDEX.md catalogs all 83 with mood-to-brand mappings; read it when routing is not obvious. Most non-trivial work loads one Layer A + one Layer B. README.md carries the DESIGN.md gate, the style routing flow, stacking rules, and Phase Final.

Layer A (pick AT MOST ONE style skill; they encode opposing philosophies):

| File | Read when the brief says |

|---|---|

| taste-skill.md | Operational or neutral UI: internal tools, dashboards, admin, "just make it usable". The default. |

| minimalist-skill.md | "minimal", "clean", "Notion-like", "Linear-like", "editorial". |

| soft-skill.md | "premium", "luxury", "calm", "elegant", glossy or glass product surfaces; pair with a high-craft Layer B (supabase, linear.app, vercel, stripe). |

| gpt-tasteskill.md | "Awwwards-tier", "wow factor", "cinematic", "scroll-triggered" marketing experiences; stacks ambience-skill.md. |

| brutalist-skill.md | "brutalist", "raw", "Swiss", "experimental", "anti-design". |

| redesign-skill.md | Improving EXISTING UI; audit first; never on greenfield. |

| image-to-code-skill.md | A supplied or generated image is the contract. |

| output-skill.md / stitch-skill.md (worked export: stitch-design-example.md) | Stack on any style skill: output completeness; Google Stitch compatibility or a DESIGN.md export. |

| layout-skill.md / interaction-skill.md / ambience-skill.md | Stack on any style skill; mechanics only, no visual direction. |

| imagegen-frontend-web.md / imagegen-frontend-mobile.md / imagegen-brandkit.md | Image-only output; never code. |

Layer B: when the user names a brand or site ("Linear-style", "like Stripe's landing", "Aside-style browser agent"), load references/design/<brand>.md as the token source of truth: aside apple stripe linear.app notion vercel claude figma airbnb nike tesla spotify raycast revolut and ~56 more in _INDEX.md. Extract the tokens and apply them to the project's own content; never copy logos or trademarked imagery. A missing brand falls back to a Layer A mood match or to the nexu-io/open-design library (https://github.com/nexu-io/open-design).

perfection/: README.md (the seven tenets: real-browser audits only, 100 in every category, fix at the architecture, never weaken UX for points, design-system compliance, the audit report format) and react-perf-tooling.md (Playwright + playwright-lighthouse + react-scan/lite injection, per-route render budgets). Audit CLI, production build only, mobile and desktop presets, 3-5 runs, take the median:

uv run $SKILL_DIR/scripts/perfection/lighthouse-audit.py https://localhost:3000

ui-ux-db/: README.md documents the search CLI and the master-plus-overrides persistence pattern. The CLI finds data/ next to itself, so run it from the user's project directory: --persist writes design-system/ into the current directory, and the skill directory can sit inside a signed app bundle that must never change. Keep -B for the same reason:

python3 -B $SKILL_DIR/references/ui-ux-db/scripts/search.py "<query>" --design-system -p "Project"   # design-system generation
python3 -B $SKILL_DIR/references/ui-ux-db/scripts/search.py "<query>" --domain <domain>             # product style typography color landing chart ux react web icons google-fonts
python3 -B $SKILL_DIR/references/ui-ux-db/scripts/search.py "<query>" --stack <stack>               # html-tailwind react nextjs vue svelte astro swiftui react-native flutter shadcn jetpack-compose

designpowers/: README.md routes the pinned Owl-Listener/designpowers corpus (personas, accessibility and cognitive constraints, critique, debt, handoff, synthetic user testing, motion, role prompts) into DESIGN.md first, then into the implementation contract. It replaces nothing: not this skill, /visual-qa, /ulw-plan, /ulw-execute, or /review-work.

When to load something else instead

| Situation | Load |

|---|---|

| Brand/style not among the 70 in references/design/, or the user says "Open Design" | The nexu-io/open-design library (https://github.com/nexu-io/open-design; 137+ design skills, 150+ design systems) |

| Driving a browser for captures | visual-qa skill: omowright from js eval (owned engine for renders, attached engine for signed-in pages) |

| Pure TypeScript/logic work with zero visual surface | programming skill alone; this skill adds nothing there |

Activation

Use for any frontend, web UI, UX, visual, design, styling, layout, animation, performance, accessibility, or SEO work, and for every HTML/CSS/SVG artifact that ends up as a PDF, print page, report, figure, diagram, slide, or image: building, redesigning, auditing, or generating mockups. Not for backend, CLI, or pure-logic tasks with no visual surface.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.