frontend-craft
Skill2 starsChanged 4 months agoMITView on GitHub
Design, build, refactor and audit product interfaces with deliberate visual hierarchy, interaction quality, responsive behaviour and evidence from the rendered page. Use for any UI-heavy work — a new screen, a redesign, "this looks generic", "improve the layout", a dashboard, a design review — and whenever visual quality rather than wiring is the point. Modes: build, refactor, audit.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- enzodevs/frontend-crafttheir own version, first seen Oct 6, 2026
- lammersbjorn/sane-nexttheir own version, first seen May 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- enzodevs/frontend-craft★ 1same name
- lammersbjorn/sane-next★ 1same name
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 repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-endpointSkill
- db-migrationSkill
- deploySkill
- featureSkill
- frontend-pageSkill
- product-shapingSkill
- reviewSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Check the existing design system: reuse → extend → invent, in that order.
- Distinctive: line 59
Do not implement in audit mode.
- Distinctive: line 80
If three things are all "primary", the page has no hierarchy and the user's eye has nowhere to land.
- Distinctive: line 108
Before adding any UI, inventory what already exists: colours, spacing scale, type scale, container widths, radius, buttons, inputs, tables, …
- Distinctive: line 158
Every async surface owns all of these — designed, not defaulted:
- Distinctive: line 175
Don't say "make it responsive".
- Distinctive: line 190
Not a WCAG audit. The floor:
- Distinctive: line 223
Do not claim visual completion because tests pass: If you could not render it, say so plainly and say what remains unverified.
- Very specific: line 226
If the repo has scripts/seed-demo-data, run it first — an empty database renders an empty UI, which proves nothing about how the design …
- Very specific: line 237
If making the UI good seems to require a hand-written DTO, a raw fetch(), or a rule enforced only in the browser — that is the stop …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Craft
web-product-guardrails owns system boundaries. This owns the rendered experience. Nothing
in the architecture prevents a technically correct interface that is generic, flat and hard to
read — this does.
The rule that comes first
Do not redesign from source code alone. Render the current interface before deciding what is wrong with it.
Reading JSX tells you what components exist. It does not tell you what the page feels like, where the eye lands, what competes for attention, or that the table overflows at 375px. For backend work we inspect the property the test claims to own; for UI, inspect the experience the code claims to produce.
Source review is not visual review. Tests passing is not visual completion.
Pick a mode
build — new UI from product requirements
- Hierarchy before components (§ below). Do not open a component library first.
- Check the existing design system: reuse → extend → invent, in that order.
- Compose the page, then implement.
- Render. Desktop + mobile. Inspect. Refine.
- Evidence: screenshots of the real page, including one non-happy state.
refactor — improve existing UI
- Render it first. Screenshot desktop and mobile before touching anything.
- Diagnose from the render: hierarchy, density, rhythm, alignment, contrast, competing accents.
- Note design-system inconsistencies — count the radii, shadows, font sizes and greys actually in use on that page. The count is usually the finding.
- Identify interaction problems: unreachable controls, missing states, no feedback.
- Preserve behaviour. A refactor that quietly changes what the page does is a bug.
- Change, re-render, compare against the before screenshots.
audit — findings only, no implementation
Return ranked findings, each with the rendered evidence and the specific fix:
| P0 | Broken function, inaccessible control, unreadable contrast, mobile unusable |
| P1 | Hierarchy failure, navigation confusion, missing critical state |
| P2 | Design-system inconsistency, spacing/rhythm, typography |
| P3 | Polish, motion, micro-copy |
Do not implement in audit mode. The output is the finding list.
Start from product hierarchy, not components
The failure this prevents: opening with "I need a Card, Card, Card, Table, Button" and producing a wall of equal-weight boxes where nothing is primary.
Ask first:
- What did the user come here to do?
- Then classify every piece of information on the page:
| Tier | Treatment |
| Primary | The thing they came for. Largest, highest contrast, earliest in reading order. |
| Supporting | Helps them act on the primary. Present but visually subordinate. |
| Contextual | Orientation — where am I, whose data, when. Small, quiet, never competing. |
| Actionable | One clear primary action. Everything else is secondary or tertiary. |
If three things are all "primary", the page has no hierarchy and the user's eye has nowhere to land. Choose.
Resist turning every piece of information into a card. A card is a container for something genuinely separable. Four numbers in a row are four numbers, not four cards.
Default visual character
Principles, not a theme. The product's own design system overrides this.
Prefer calm over decorative · strong typography over boxes · whitespace over separators · hierarchy over density · restrained radius · restrained shadows · neutral surfaces · one clear accent · progressive disclosure · content-first layouts
Avoid by default gradient-heavy heroes · card overuse · glassmorphism · decorative blobs · an icon in every heading · unnecessary badges · dashboard grids for ordinary content · three different border radii on one page · arbitrary shadows · oversized headings with no information hierarchy
Detail and worked examples: references/visual-principles.md.
Reuse before invention
Before adding any UI, inventory what already exists: colours, spacing scale, type scale, container widths, radius, buttons, inputs, tables, dialogs, navigation, breakpoints.
Then: reuse → extend → invent. Inventing a new spacing value or radius because it "looks better here" is how every feature becomes its own small design system. If you must invent, add it to the design system rather than inline.
New repo with no system yet? Establish the minimum first — spacing scale, type scale, content
width, radius, border, surface hierarchy, focus treatment, breakpoints — in
frontend/src/lib/design/. Eight decisions, made once.
Compose the page before implementing
State these explicitly:
page purpose · primary action · primary content · secondary content ·
navigation context · empty state · loading state · failure state · mobile behaviourA dashboard, badly:
[Card] [Card] [Card] [Card]
[Card] [Card] [Card] [Card]
[Table ─────────────────────]Better:
Page title Primary action
Critical status — the one thing that matters
Main working surface
──────────────────────────────────────────────────────
Secondary / contextual informationPatterns for list, detail, dashboard, settings, form workflow, auth and marketing pages:
references/page-patterns.md. They are patterns to adapt, not templates to copy.
States are part of the design
Every async surface owns all of these — designed, not defaulted:
loading · empty · success · partial · error · disabled · unauthorized · offline (if relevant)if (loading) return <p>Loading...</p> is not a loading state.
For each one ask: what should the user understand, and what can they do? An empty state that only says "No data" wastes the best teaching moment in the product.
Full treatment: references/interaction-states.md.
Responsive is a decision, not a media query
Don't say "make it responsive". Decide, per surface:
desktop layout → tablet transition → mobile layoutParticularly for: navigation, tables, forms, toolbars, dialogs, charts, sidebars.
A six-column table on mobile becomes compact record rows — not a horizontally crushed table and not a horizontally scrolling page. Decide which; both are legitimate, silence is not.
Accessibility is part of craft
Not a WCAG audit. The floor:
semantic HTML · keyboard operability · visible focus · real labels · accessible dialog behaviour (focus trap, Escape, focus return) · sufficient contrast · reduced-motion respected · meaning never encoded by colour alone
Visual polish must not regress accessibility. Removing a focus ring because it "looks cleaner" is a defect, not a style choice.
Motion must explain something
Motion may indicate: state transition · spatial relationship · feedback · continuity.
Motion may not exist merely because animation is possible. No animate-fade-in-up on every
section. Respect prefers-reduced-motion.
Evidence — required for visual work
For any change that alters what the user sees:
implement → run the app → render in a real browser
→ desktop screenshot → mobile screenshot
→ inspect affected interaction states → refineAt minimum, inspect one representative desktop viewport, one mobile viewport, and the interaction states the change touched.
Do not claim visual completion because tests pass. If you could not render it, say so plainly and say what remains unverified.
If the repo has scripts/seed-demo-data, run it first — an empty database renders an empty UI,
which proves nothing about how the design handles long titles, missing optional fields, status
variety, or enough rows to paginate.
Review rubric for judging your own output: references/review-rubric.md.
Boundaries this skill does not cross
Authorization, data shapes, business rules and API design belong to web-product-guardrails.
If making the UI good seems to require a hand-written DTO, a raw fetch(), or a rule enforced
only in the browser — that is the stop condition, not a styling decision.
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.

