All skills
mblode avatar

/ui-design

@e7db33d
by Matthew Blodemblode/agent-skills136 stars
12

Designs and builds React/Next/Tailwind UI and audits visual and interaction defects. Use when asked to "build a landing page", "extract our design system", "add dark mode", "make this responsive", "remove UI slop", or "audit this component". For product decisions use product-design; for browser measurements use ui-verification; for motion use ui-animation.

Use this Skill: https://skilld.dev/gh/mblode/agent-skills/ui-design

This session only. Nothing lands on disk.

componentize.md

≈609 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Componentize

Use when componentizing, extracting, or organizing UI code into reusable components, or cleaning up Tailwind class lists.

Load First

  • For Tailwind class cleanup (standalone or finishing pass), load canonicalize-tailwind.md for the npx @tailwindcss/cli canonicalize workflow and commands.
  • Component extraction needs no companion files.

Workflow

  1. Inspect existing project component patterns before creating new ones.
  2. Identify repeated patterns, logical sections, and self-contained UI blocks.
  3. Extract components with call-site spacing and configurable class merging.
  4. Reuse or extend existing project components where available.
  5. Re-scan extracted components for remaining duplication.
  6. Finish with a Tailwind canonicalize pass over the touched class lists (canonicalize-tailwind.md).

Rules

  • Break designs into small, focused components instead of one large component: extract repeated patterns, logical sections, and self-contained UI blocks
  • Never bake margins into components: apply margins at the call site; every component must accept a class attribute and merge it with the classes on the component's top-level element
  • Use the project's existing class-merging helper (cn in a shadcn/Tailwind project, from the cn package) to merge classes in client-side components
  • Always extract form controls into reusable components organized by HTML element: one Input for all <input> types (text, email, password, etc.), one Select for <select>, one Textarea for <textarea>; never type-specific components like EmailInput or PasswordInput; check the project for existing ones first
  • When two or more elements share the same structure and styling but differ only in props (labels, placeholders, types): extract them into a single component parameterized by those differences
  • After extracting, scan components for duplicated patterns and extract shared elements into reusable components: e.g. repeated section container/max-width/padding wrappers, heading group structures (eyebrow + heading + subheading), card shells, button styles
  • Always use existing project components when available: reuse or extend instead of creating new ones; buttons and form elements are especially common candidates

Verify

  • Extracted components preserve the original UI and behavior.

Source: SKILL.md on GitHub

No alerts8d5 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    A comprehensive UI design and auditing skill that uses standard developer tools and trusted services like Tailwind CSS and placeholder asset APIs to build and verify React/Next.js interfaces. It includes explicit guardrails to prevent instruction following from analyzed project files.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

  • Runlayer6mo

    4/5 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e7db33d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 1 hour ago.

Activeupdated last week

README badge

README badge for mblode/agent-skills/ui-design