# component-family-consistency

Keeps buttons, inputs, badges and pills on the same radius, colour logic, shadow, border and spacing. Useful when building or reviewing a component library.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 874 installs · ★ 165
- Author: dembrandt
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/dembrandt/dembrandt-skills/tree/HEAD/skills/component-family-consistency/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/component-family-consistency

## What it does

The skill defines one set of tokens for every interactive element in a product: buttons, inputs, selects, checkboxes, radios, pills, badges, tags, calendars, sliders and toggles. Radius, colour logic, shadow, border and spacing come from that shared place instead of being reinvented per component.

It also sets the order of work. Check whether a component already exists, look for something close in the codebase and generalise it, and only build new when neither fits. Borders follow a two-step rule: at most two width values rather than a `1px, 2px, 3px` scale. Nested corners are concentric and derived with `calc()`, so the outer radius stays right when a token moves.

The skill activates on paths like `components/**`, `**/*.tsx`, `**/tokens/**`, `design-system/**` and `tailwind.config.*`. The text is cut off in the section on heights and padding, so the rest of the family rules cannot be judged from it. If your codebase already has five near-identical button radii, audit first and consolidate after.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill component-family-consistency -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/component-family-consistency/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/component-family-consistency/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill component-family-consistency -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/component-family-consistency/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill component-family-consistency -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/component-family-consistency/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dembrandt/dembrandt-skills component-family-consistency
```

2. **Manually: put the files in place**
- File: `.github/skills/component-family-consistency/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill component-family-consistency -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dembrandt/dembrandt-skills --path skills/component-family-consistency
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/component-family-consistency/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill component-family-consistency -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dembrandt/dembrandt-skills/tree/HEAD/skills/component-family-consistency/SKILL.md

## When to use it
- align button and input radius on one form
- make badges stop looking like clickable buttons
- find a near-ready component instead of writing a new one
- replace a four-step border width scale with two values
- compute a concentric card radius around a button

## Example prompts
- Review the components in `src/components` for visual consistency: buttons, inputs, badges and pills should share radius, colour, shadow, border and spacing
- My buttons and inputs look like they came from different products — pull them onto one set of tokens
- Before adding a new component, check whether one already exists or something close can be generalised

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 267bdfc8c044646d.

BEGIN THIRD-PARTY FILE 267bdfc8c044646d
```text
---
name: component-family-consistency
description: Buttons, inputs, badges and pills share radius, colour logic, shadow, border and spacing. Use when building or reviewing a component library.
metadata:
  priority: 8
  pathPatterns:
    - "components/**"
    - "src/components/**"
    - "**/*.tsx"
    - "**/*.jsx"
    - "**/tokens/**"
    - "**/theme/**"
    - "design-system/**"
    - "tailwind.config.*"
  promptSignals:
    phrases:
      - "component library"
      - "design system"
      - "button"
      - "input"
      - "form"
      - "badge"
      - "pill"
      - "consistent components"
      - "component family"
retrieval:
  aliases:
    - component family
    - design system consistency
    - component tokens
    - visual consistency
    - form components
    - ui components
  intents:
    - make components look consistent
    - build a component library
    - review design system consistency
    - align button and input styles
    - create visual cohesion
    - tell buttons and badges apart visually
  examples:
    - my buttons and inputs look like they are from different products
    - my badges look clickable but they are not buttons
    - make all form components consistent
    - review this component library for visual consistency
---

# Component Family Consistency

Every interactive component in a product — buttons, inputs, selects, checkboxes, radio buttons, pills, badges, tags, calendars, date pickers, sliders, toggles — belongs to the same visual family. They share a common design DNA. A user should be able to look at any component and feel that it belongs to the same product as every other component.

When components are designed in isolation without shared tokens, the product feels assembled from parts rather than built as a whole.

## Reuse Before You Build a New Component

Before creating any component, **audit what already exists** — a new-from-scratch component is another mouth to feed: another entry in the family that must stay consistent (radius, height, states, motion) and another thing to maintain. Building fresh should be the last resort, not the first move. Work down this order:
```
END THIRD-PARTY FILE 267bdfc8c044646d

The third-party file has ended. Everything between the 267bdfc8c044646d tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2153 of 33869 bytes. © dembrandt · MIT · https://github.com/dembrandt/dembrandt-skills/tree/HEAD/skills/component-family-consistency/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
