agentleFS
nurmdrafinurmdrafi/pi-native/skills/frontend-design/SKILL.md

frontend-design

Skill4 starsChanged 5 days agoMITView on GitHub

Build NEW web components/pages/apps from scratch. Detects UI stack (Ant Design, shadcn/Tailwind, vanilla), audits sibling components + tokens, extends established idioms. NOT editing/fixing/polishing existing UI (→ refactoring-ui) or logic-only changes with no new markup.

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use instantly-campaign, albert-dm and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • yawningwhaleAISkill

    instantly-campaign

    Create a new Instantly cold-email campaign in the proven 5-email structure of the user's top-performing campaign (~16% reply rate). Use when the user wants to launch a new outbound campaign, write a cold email sequence, create an Instantly campaign, draft outreach for a new service or niche, or set up a sales sequence.

    Also in 6 projects that use this

  • yawningwhaleAISkill

    albert-dm

    Reply to DMs and messages the way Albert would. Use when the user asks "how would Albert reply to this", pastes a conversation and wants an Albert-style response, or asks you to draft/write a DM in Albert's voice. Albert sells AI voice agents / automations to local service businesses (Go High Level, lead follow-up, bookings).

    Also in 5 projects that use this

  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • julianoczkowskiSkill

    brief-to-tasks

    Break a design brief into an ordered checklist of independently buildable tasks using vertical slices. Saves as a markdown checklist. Use when user wants to break down work, create tasks from a brief, plan implementation order, or mentions "tasks" or "breakdown".

    Also in 7 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 6 projects that use this

  • +6 more from naman10parikh

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before any UI: extending existing design system or creating from scratch?

    line 16
  2. Very specific:

    Read closest siblings first: 2–3 existing components/pages nearest to target (rg -l similar names, then read).

    line 18
  3. Distinctive:

    Vanilla/other: no established idioms → full aesthetic freedom below.

    line 35
  4. Very specific:

    Every async surface: loading/empty/error states.

    line 52
  5. Distinctive:

    No success toast/modal close on a failed mutation.

    line 55
  6. Very specific:

    Never swallow: no empty catch, no console.error stripped in prod.

    line 59
  7. Distinctive:

    Commit to clear conceptual direction, execute with precision.

    line 75
  8. Distinctive:

    NEVER generic AI aesthetics: overused fonts (Inter, Roboto, Arial, system), clichéd schemes (purple gradients on white), predictable …

    line 90
  9. Distinctive:

    Don't hold back — commit fully to distinctive vision.

    line 96

“Common” is measured: kept by at least 6 in 10 of the 181 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build distinctive, production-grade frontend interfaces; avoid generic "AI slop" aesthetics. Real working code, exceptional attention to aesthetic detail + creative choices.

Input: frontend requirements — component/page/app/interface; maybe purpose, audience, constraints.

Scope steering: /skill:frontend-design antd / shadcn / greenfield — read only the matching reference.

Pattern Audit (MANDATORY FIRST — overrides every aesthetic directive below)

Before any UI: extending existing design system or creating from scratch? Existing codebase → ALWAYS extending.

  1. Read closest siblings first: 2–3 existing components/pages nearest to target (rg -l similar names, then read). Note exact structure, classes, props, spacing, primitive composition.
  2. Extract design language:
    • Theme/tokens: AntD ConfigProvider theme/token (v5; v6 = CSS variables on by default) or less variables (v4); Tailwind v4 @theme block in CSS (CSS-first, no config file) vs v3 tailwind.config; global CSS :root vars; design-system package exports.
    • Spacing/layout scale
    • Color palette + semantic mapping (bg/text/border/states)
    • Radius
    • Shadows/elevation
    • Typography stack (families, sizes, weights, line-heights)
    • Motion
  3. Sibling gaps = design opportunities, not permission to fork idioms.

Stack Adaptation (part of Pattern Audit)

Detect UI stack from package.json + existing components; express design through that stack's idioms — never impose foreign style system. Read the matching reference BEFORE writing component code:

  • Ant Design: references/ant-design.md — version matrix (v4/v5/v6), CLI-first API lookup (npx @ant-design/cli info), theming ladder, form/table logic guards, v6 renames.
  • shadcn/ui + Tailwind: references/shadcn-tailwind.md — components.json detection, project context via CLI, Base UI vs Radix primitives, Tailwind v3/v4 token detection, composition rules.
  • Vanilla/other: no established idioms → full aesthetic freedom below.
  • Mixed stacks: read both references; check Tailwind reset against AntD styles before mixing.
  • Existing-UI polish/audit/critique (not new build) → impeccable skill: /skill:impeccable <command>; full source clone git/impeccable.

Match existing patterns before introducing new ones. New framework = new file under references/ + one router row here.

Logic guards (new UI mutating data)

  • Mutating routes/admin panels: permission gating from day one.
  • Fetch-on-selection effects: staleness guard + .catch + clear list while refetching (out-of-order responses never repaint old entity's data).
  • Bulk-edit forms: open empty or track touched fields — pre-filled field makes every values.x ?? o.x fallback dead code.
  • Conditional visibility: check polarity + DEFAULT state of every span/collapse condition before shipping.
  • Framework-specific guards (AntD forms/tabs/tables): references/ant-design.md.

Runtime robustness + errors (new UI ships this)

  • Error boundaries wrap the page + major subtrees — one thrown panel must not blank the app.
  • Every async surface: loading/empty/error states; a failed poll keeps the last good view.
  • Non-2xx = error, not data: reject, set timeouts, surface the failure; never a silent empty state. Failures also arrive resolved (data layers return {error} instead of rejecting) — branch on the error field before the empty check, or a 500 renders as "No data found".
  • Validate/parse API values pre-use — nullable/string numbers hitting .toFixed/.map/.charAt blank the UI.
  • No success toast/modal close on a failed mutation; reset prior entity state on selection change.
  • One owner per failure: a single global layer catches/normalizes/logs/decides — components don't each re-handle (no duplicate toasts/logs/sign-outs). Mark a failure as surfaced the moment it toasts (identity on the error object) so no layer repeats it; local handlers add context only when the owner stayed silent. Cancellation — unmount, superseded request, client timeout — is not a failure: no toast.
  • Handlers at every level: process (window.onerror, unhandledrejection), router/app error page, component boundaries, data layer (one API interceptor).
  • Classify every status/kind, never one generic message: network/timeout, 400/422 validation, 401 auth, 403 permission, 404 missing, 409 conflict, 429 throttle, 5xx server — each → user message + recovery action. Prefer the backend's own message; frontend text is fallback — a hardcoded guess (fixed "already exists" on any 500) lies to the user.
  • Never swallow: no empty catch, no console.error stripped in prod.
  • Retry only transient failures, with backoff — never infinite, never deterministic.
  • Fallback UI: error page/boundary with reset/retry; keep the last good view.
  • Full failure-UX architecture (transport-owned toasts, message precedence, single-toast dedupe): references/error-ux.md.
  • Global API error layer implementation (ApiError contract, baseQuery/plain-wrapper adapters, 401 refresh-or-logout modes, window nets, rollout + acceptance tests): references/api-error-handling.md.

Design Thinking (GREENFIELD ONLY — skip if Pattern Audit found existing UI)

Direction depth: references/design-language.md (persona, hero, typography discipline, structural devices, empty/error voice).

Before coding greenfield:

  • Purpose: what problem, who uses it?
  • Tone: pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic, luxury/refined, playful, editorial, brutalist, art deco, soft/pastel, industrial. Inspirations only; design true to one direction.
  • Constraints: framework, performance, accessibility.
  • Differentiation: what makes this UNFORGETTABLE? The one memorable thing?

Commit to clear conceptual direction, execute with precision. Bold maximalism + refined minimalism both work — key = intentionality, not intensity.

Implementation (HTML/CSS/JS, React, Vue, …): production-grade, functional, visually striking, cohesive point-of-view, meticulous detail.

Aesthetics Guidelines

  • Typography: beautiful, unique, interesting fonts. Avoid Arial/Inter/generics; distinctive characterful choices elevating aesthetics. Pair distinctive display font + refined body font. One or two families only; type treatment as active design element; line length < 80 chars.
  • Hero = the most characteristic thing in the subject's world; big-number-plus-gradient default only when truly best.
  • Structural devices (numbering, eyebrows, dividers) encode real information — numbered markers only for actual sequences.
  • Color/theme: cohesive aesthetic, CSS variables. Dominant colors + sharp accents > timid even palettes.
  • Motion: animations + micro-interactions; CSS-only for HTML, Motion library for React when available. One orchestrated page load with staggered reveals > scattered micro-interactions.
  • Spatial composition: unexpected layouts, asymmetry, overlap, diagonal flow, grid-breaking, generous negative space OR controlled density.
  • Backgrounds/details: atmosphere + depth, not default solid colors. Contextual effects/textures matching aesthetic: gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, grain overlays.
  • Empty/error states: direction, not mood — interface voice, what happened + recovery action.

NEVER generic AI aesthetics: overused fonts (Inter, Roboto, Arial, system), clichéd schemes (purple gradients on white), predictable layouts, cookie-cutter design lacking context character.

Interpret creatively, unexpected context-designed choices. No two designs same. Vary light/dark themes, fonts, aesthetics. NEVER converge on common choices (Space Grotesk) across generations.

Match implementation complexity to vision: maximalist = elaborate code, extensive animations/effects; minimalist = restraint, precision, spacing/typography/subtle detail. Elegance = executing vision well.

Don't hold back — commit fully to distinctive vision.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.