Agent skill

Component Family Consistency Skill for Shared UI Tokens

The component-family-consistency skill makes an AI coding agent give buttons, inputs, badges and pills one shared radius, border, height and state set, so a UI reads as one product.

Install
git clone https://github.com/dembrandt/dembrandt-skills.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the component-family-consistency skill?

Component-family-consistency is a skill from the dembrandt-skills repository. It tells an AI coding agent that buttons, inputs, badges, pills and other controls share one set of tokens for radius, border, height, spacing and states. It also says to reuse existing components before building new ones.

Component-family-consistency is a single SKILL.md inside the dembrandt-skills repository. Its premise is plain: every interactive control in a product, from buttons and selects to toggles, sliders and date pickers, should look like it came from the same hands.

When controls are designed one at a time, a product feels assembled from parts. The skill gives the agent a shared token set to inherit from, so a new field or chip joins the family instead of inventing its own look.

What changes in the agent's output

  • Radius comes from tokens: a base of 8px for buttons, inputs and selects, 4px for checkboxes and small badges, 12px for cards and modals, and a full radius for pills.
  • A button and an input on the same form get the same height. Sizes are tokens of 2rem, 2.5rem and 3rem rather than whatever padding happens to produce.
  • Nested rounded boxes use concentric corners: the outer radius equals the inner radius plus the gap, written with calc() so it follows the tokens.
  • Border widths stay within two options, such as 1px and 4px, instead of a 1px, 2px, 3px ladder.
  • Before creating a component, the agent audits what exists and extends it with a prop or variant rather than cloning it.

How a row of controls stays level

The skill's rule is to set a control's height instead of deriving it from line height, padding and border. Use min-height, box-sizing border-box and a transparent border on borderless variants, so outlined and ghost siblings match.

  • One shared class owns the box, the content slot and every state for a row. An instance may set colour and nothing else.
  • Hover, focus and transition edits happen on the class, never on a single sibling, which is how rows drift apart over months.
  • Icons are nudged per icon, not with one shared offset. The skill suggests measuring the alpha centroid of a rasterised glyph against its box.
  • Buttons set cursor: pointer, because browsers render a button with the default cursor.

Who the component-family-consistency skill is for

Best for

  • Building or reviewing a component library, for example one built with shadcn, where drift between buttons, inputs and badges is the usual complaint.
  • Fixing a form that looks stitched together from different products.
  • Teams moving old pages toward newer components. The skill calls the newest components the best evidence of current intent, and says to confirm before deprecating a style.

Not for

  • Choosing brand colours or a type scale. The skill governs how components relate to each other. For light and dark themes, see color-mode-and-theme.
  • Auditing accessibility. For focus and semantics, use fixing-accessibility.
  • A critique of a finished screen. For that, see critique.

Use it with UiChemy

The skill only changes the code or components your agent writes. To get that build into WordPress, bring it in through UiChemy: AI to WordPress imports an AI build, and Figma to WordPress converts a Figma design. Click Get Started on uichemy.com.