From dev-tasks
Reuse-before-invent checklist for any UI-touching change. Forces a grep-and-survey of existing components, layouts, tokens, and patterns before writing new ones. Cuts visual drift and the "we already had a component for that" cycle.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-tasks:design-consistencyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before writing UI code in any of these:
Before writing UI code in any of these:
.claude/rules/ui-design.md)Also referenced from /production-quality-ownership Q6.
grep -r "ComponentName" components/ or search by behavior keyword. If a component exists for the exact concept, use it. Close-but-not-quite → extend it (add a prop) before forking.
Most projects wrap raw HTML with themed components (e.g. <ThemedInput />). If typing <input or <select, stop and check whether a themed version exists. Project conventions live in the consumer's overlay or .claude/rules/ui-design.md.
components/ui/*)Card, Dialog, Tooltip, Popover, DropdownMenu, Tabs, Accordion, Sheet, Toast, Badge, Progress, Skeleton, Alert, Separator, Checkbox. Run ls components/ui/ before inventing modal/popover/tabs/accordion/etc.
Copy from adjacent pages. Reuse design tokens verbatim, not approximated. Canonical token list in .claude/rules/ui-design.md.
lucide-react). Pick names consistent with adjacent pages. Never inline SVG when an icon exists.useToast()). Never alert() or inline div.<Skeleton />).Emails: no <style> tags survive, inline CSS only. Reuse from project's email template utilities. Never copy UI-page rules to emails — emails follow different conventions (dark text on light, max ~600px width, brand colors via inline style).
Before writing new component, run two greps:
grep -r "behavior-keyword" components/
grep -r "card-or-modal-or-button-thing" app/ components/
If either returns >0 results, read those files before inventing.
All four must be true:
Then: invent as properly-named reusable in components/ui/ or components/<domain>/, not inline. Document WHY in architecture-decisions doc or PR description.
Design consistency pass — PR #N
Components surveyed:
✅ Existing <DomainCard /> reused — match
⚠️ New <StatusPill /> added — was existing <Badge /> adequate? Check.
❌ Inline <input> in path/to/file.tsx:42 — should use themed wrapper
Layout: matches existing patterns
Iconography: from project's library
Verdict: 1 BLOCKER (raw input), 1 IMPROVEMENT (consider Badge over StatusPill).
bg-white/15, bg-white/12, bg-white/10 all on different pages<NewComponent /> to fill in later — never gets reused.claude/rules/ui-design.md — project's themed components, tokens, layoutcomponents/ui/ — stock primitives (run ls first).claude/skills/production-quality-ownership/SKILL.md Q6 — short versionnpx claudepluginhub step-network/dev-tasks --plugin dev-tasksGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.