frontend-craft
Skill5 starsChanged 9 days agoMITView on GitHub
Web UI consistency, anti-AI-slop, 5-state UX & CJK form rules when building, rebuilding, or editing UI (NOT read-only reviews, git syncs, or non-UI logic). Triggers: /frontend-craft, "frontend craft", "ui spec", "前端规范", "UI 规范", "去 AI 味".
11 other projects use a version of this.
Adopted by
Most recently taken up by
- sentimony/skillstheir own version, first seen Nov 29, 2026
- AgustinOberg/leshi-toolstheir own version, first seen Nov 22, 2026
- ldaume/agentic-engineering-harnesstheir own version, first seen Oct 20, 2026
- ChefDavid0815/gpt-craft-systemtheir own version, first seen Oct 15, 2026
- enzodevs/frontend-crafttheir own version, first seen Oct 6, 2026
- wangxiaohuiboy/lean-agent-skillstheir own version, first seen Sep 10, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- sentimony/skills★ 8same name
- ldaume/agentic-engineering-harness★ 5same name
- nattergabriel/frontend-craft★ 5same name
- tadoEng/web-starter★ 2same name
- enzodevs/frontend-craft★ 1same name
- lammersbjorn/sane-next★ 1same name
- AgustinOberg/leshi-tools★ 0same name
- ChefDavid0815/gpt-craft-system★ 0same name
- SkyWalker2506/ccplugin-frontend-craft★ 0same name
- susannakhloyan-debug/claude-skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- agent-reviewSkill
- code-syncSkill
- plan-reviewSkill
- project-evolutionSkill
- repo-cleanSkill
- work-reportSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 85
No magic values: no hardcoded hex/rgb colors, and no spacing, radius, or size literals that are off the token scale (e.g.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Craft
Build cohesive, production-grade web interfaces across React, Next.js, Vue, Nuxt, Svelte, Astro, and vanilla HTML/CSS/TypeScript—matching repository conventions, eliminating AI-slop visuals, and enforcing complete async UX states, CJK-safe forms, clean state boundaries, and modern native web primitives.
0. Precedence
Explicit user instructions > repository rules and established conventions
(tokens, lint config, shared component APIs, existing copy) > this skill. The
rules and bans below are defaults for new or rebuilt code. When the repo
deliberately does otherwise (e.g. renders N/A, uses a different breakpoint
scale), match the repo, do not "fix" it in passing, and mention the deviation
once in your summary if it matters.
1. Proportional Scope & Recon
Skip this skill on read-only code reviews, git syncs, pure non-UI state/TS logic, backend/CLI/infra code, or build-only config edits. Scale recon to task scope:
- Localized tweak (a line or a few lines): match surrounding tokens and conventions in-file; skip multi-file repo scans and the rest of this checklist except the bans that the edited lines would directly violate. Never rewrite, split, or refactor untouched legacy code in the file.
- New or rebuilt component/page: inspect repo tokens (
tailwind.config.*, CSS@theme/:root), layout shells (AppLayout,PageShell), sharedcomponents/ui/+package.jsonUI/icon libraries, and 1 canonical sibling route first. Reuse or cleanly extend shared primitives—never fork raw<div class="p-6 flex ...">page chrome or install rival UI/icon libraries. - 0-to-1 greenfield: scaffold semantic tokens + layout/primitives
proportional to app scope (tokens +
PageShell+ core primitives first on multi-route apps; no unused admin table/badge scaffolding on a landing page or single-screen prototype).
2. Density & Layout Contracts
- Product density modes:
- B2B compact: body text at the 13px or 14px step of the type scale,
high-density neutral surfaces, crisp hairline borders,
150mstransitions; no tall hero metric cards pushing tables below the fold (use compact inline summary/filter strips). 100dvhsplit workbench: viewport-lockedheight: 100dvh; overflow: hiddenouter shell (no outer-body double scrollbars) with independently scrolling master, canvas (flex: 1; min-width: 0), and inspector panes.- Brand editorial: intentional focal hierarchy, generous whitespace, real
imagery/bespoke SVG, and
prefers-reduced-motion-safe reveals.
- B2B compact: body text at the 13px or 14px step of the type scale,
high-density neutral surfaces, crisp hairline borders,
- Form width & grid containment: cap single-column forms at
640px–800px(max-w-2xl/max-w-3xl) in 3–7 field sections with consistentCancel+Save/Submitfooters. Asymmetric CSS grids must bound tracks withminmax(0, ...)(e.g.minmax(0, 2fr) minmax(280px, 1fr)) andmin-w-0so wide<pre>, URLs, or tables cannot blow out the viewport. - Single composite contracts:
DataTable: rendernull/undefined/""cells as a muted—(not"null","N/A","-", or blank); right-align (<th>and<td>) money, counts, percentages, and timestamps withtabular-nums; pin wide-table actions to sticky right (inset-inline-end: 0) and fold more than 3 actions into aMore (⋯)menu.Dialogvs.Drawer: centeredDialogfor confirmations and up to 5 fields;Drawer/Sheet(100dvh) for previews, logs, or more than 5 fields.EmptyState&StatusBadge: a single monochrome SVGEmptyState; map status enums through one centralized semantic tone map (neutral | info | success | warning | danger) repo-wide.
3. Tokens & Anti-AI-Slop
- 3-tier tokens &
@layer: wirePrimitive -> Semantic -> Componentone way (features consume Semantic tokens only; themes swap Tier 2 only). Govern specificity via@layer; no!importantoutside a11y/print. - No magic values: no hardcoded hex/rgb colors, and no spacing, radius, or
size literals that are off the token scale (e.g.
padding: 13px,gap: 27px). Font sizes come from the type scale—a 13px body step defined there is a token, not a magic number. - Visual dictionary: lock 1 UI sans (+ optional brand display font), 1
monospace font, 3 macro spacing tokens (
--space-page,--space-section,--space-card), and 1 neutral ramp on a90 / 8 / 2ratio (~90% neutral surfaces/text, ~8% hairline borders/muted text, ≤2% accent for primary CTA and active state). - Anti-AI-slop bans: indigo-purple-pink neon gradients, glowing or 3-level
nested cards, muddy static drop shadows, more than 1 pill per row/card
(format secondary metadata as
·-separated muted text), and emojis (🚀✨) as UI icons (use one uniform1.5px–1.75pxstroke vector set withcurrentColor).
4. 5-State Async UX & CJK-Safe Forms
- Every async view handles all 5 states:
Loading: geometry-matched initial skeleton; keep rows visible (keepPreviousData/ toolbar indicator) on filter/page changes—never block routine reads with a full-screen spinner.Empty: separate first-use empty (context + primary CTA) from zero filter matches (message + 1-clickClear Filters).Error: inline error boundary +Retrypreserving filters/drafts. Nevercatch { return []; }—that disguises errors as empty.Overflow:min-width: 0(min-w-0) on flex/grid text children,truncate/line-clamp-*, and tagflex-wrap/+Ncollapse.Pending: lock submit/mutation buttons (disabled/aria-busy) on first click without width jitter; roll back failed optimistic updates cleanly.
- Forms, CJK IME & semantic DOM: delay validation errors until
bluror firstsubmit(:user-invalid—never red on blank mount), clear eagerly oninput, and focus the firstaria-invalid="true"field on failed submit. Guard everyEnter-to-submitkeydownhandler against IME composition:if ((e.nativeEvent?.isComposing ?? e.isComposing) || e.keyCode === 229) return;. Confirm before closing dirty forms (beforeunload, route leave, backdrop/Esc); pair inputs with<label>; use<button type="button">vs.<a href>(no<div onClick>); requirearia-labelon icon-only buttons.
5. Component/State Boundaries & Native Baseline
- Boundaries & state: one-way
pages -> features -> uiimports (~250-line split target on new/rebuilt components only); no stateful child components defined inside a parent's render. Keep API data in a server cache (Query / SWR / RSC /useAsyncData—never mirrored into Zustand/Pinia/Redux); sync list filters, sort, tabs, and page to URL search params; compute derived/filtered state synchronously during render (computed/$derived, notuseEffect/watch→setStatemirroring); passAbortSignalon filter races; no bareany(map raw DTOs at the API boundary). - Native baseline: a native
<dialog>must useref.showModal()/ref.close()(never<dialog open={isOpen}>); preferpopoveror headless primitives overz-index/body.style.overflowhacks (scrollbar-gutter: stable). Use@containeron widgets,100dvh(+safe-area-inset-bottom),:has(),text-wrap: balance/pretty, boundedfield-sizing: contentas progressive enhancement,color-mix(in oklab), explicit mediaaspect-ratio(fetchpriority="high"hero,loading="lazy"below the fold), and150ms–250mstransform/opacitytransitions (notransition: all) honoringprefers-reduced-motion.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

