/design-engine:component-library-architecturefrom design-engine
Defines reusable component anatomy, variants, states, slots, composition strategies, and API surfaces for design systems. Use when structuring a component library or designing a single component's props and interactive states.
Ships in design-engine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
primary | secondary | ghost | destructive), sizes, and the props/slots that drive them.design-tokens-and-naming — this skill consumes those tokens.design-handoff-and-dev-spec.dark-mode-and-theming (this skill keeps every value token-referenced precisely so theming stays free).accessibility-wcag-2-2-compliance; here you build a11y in rather than audit it.ux-writing-and-microcopy.| Input | Source | Required? | Evidence |
|---|---|---|---|
| Semantic tokens and supported themes | design-tokens-and-naming | yes | Token source and theme map |
| Component inventory and priority | Product and engineering owners | yes | Ranked use cases and consumers |
| Platform and accessibility contract | Target repositories and WCAG policy | yes | Framework constraints and required states |
design-tokens-and-naming). If absent, stop and build tokens first; a component library built on hex literals cannot be themed and is not a system.children, named regions) differ.doctrine/references/wcag-2.2-criteria.md).references/atomic-structure.md. Do not let an atom grow a layout or a molecule grow business logic — that is the #1 architecture smell.variant="primary-large-loading-icon" string. State the axes explicitly so the matrix is finite and reviewable.doctrine/references/wcag-2.2-criteria.md). Never outline: none without a replacement.aria-busy/a live status, and error must pair the color with text + aria-invalid + aria-describedby.Card.Header, Card.Body, Select + Select.Option). Expose layout regions as slots; keep behavior in the parent. See references/atomic-structure.md §Composition. This is the doctrine "authored, not templated" lever applied to APIs — a small composable primitive beats a fat configurable one.--color-action-bg, --space-3, --radius-control, --duration-fast), never literals. This is what makes the component themeable, dark-mode-ready, and multi-brand for free. Map per-component tokens to semantic ones (per design-tokens-and-naming); a hard-coded #2563eb in a component is a defect.prefers-reduced-motion on any state transition (2.3.3); every drag affordance has a single-pointer alternative (2.5.7). All from doctrine/references/wcag-2.2-criteria.md. Motion durations come from motion tokens, not magic numbers.references/component-doc-template.md. A component without this doc is not "done" — undocumented variants get reinvented and the library forks.doctrine/design-doctrine.md). The default-looking Button (flat fill, generic radius, blue) is the convergent AI mean. Make the one authored choice — a deliberate radius, a considered pressed-state shift, a focus ring that belongs to the brand — and apply it systematically through tokens so it reads as one skilled hand, not a template.draft, in review, approved, needs work), documentation/a11y checks, version/changelog impact, consumer notification, and the next review date. Track adoption/reuse, one-off exceptions, defects, and drift as signals for the next priority.| Condition | Architecture choice | Wrong-choice failure |
|---|---|---|
| Variations are mutually exclusive | One typed variant axis | Boolean soup permits contradictory combinations |
| Consumer supplies structured content | Slot or compound composition | Content props expand into an unmaintainable API |
| Behaviour and semantics differ materially | Separate components sharing primitives | One mega-component accumulates conditional branches |
| Difference is only visual role | Same component with semantic variant | Duplicate components drift in behaviour and accessibility |
| A component is requested outside the agreed boundary | Record it as a proposal and route it through contribution review | Silent scope growth makes the system unmaintainable |
| The library has no owner, docs, or review route | Stop release and assign the operating controls | An ownerless library becomes a second source of truth |
Read and search are required across tokens, usage, components, and accessibility tests. Editing is allowed only for authorised implementation. Execution is required to claim state, API, visual-regression, or accessibility compatibility; publishing a library requires separate authority.
Without repository access, return a proposed inventory, API, and state matrix rather than claiming compatibility. Without test or render capability, mark keyboard, assistive-technology, responsive, and theme evidence unverified and block publication.
outline: none with no replacement — a WCAG 2.4.7 failure and the single most common a11y regression in component libraries.isPrimary, isSecondary, isGhost, isDanger booleans (mutually exclusive states as separate flags) instead of one variant enum; switch to enums + composition.variant="primary-lg-loading" collapses orthogonal axes into one string — un-typed, un-composable, combinatorially exploding.| Artefact | Consumer | Evidence and acceptance condition |
|---|---|---|
| Component inventory and composition map | Design-system owners | Scope, dependencies, and ownership are explicit |
| Variant, state, slot, and API contracts | Designers and engineers | Reachable combinations are finite, typed, token-backed, and accessible |
| Component documentation and verification record | Consumers and QA | Examples, theme renders, interaction tests, and known gaps are recorded |
| System operating record | Design-system owner and consuming teams | Scope, owner, contribution status, release change, adoption/quality signals, and review date are visible |
references/component-doc-template.md, with the a11y contract referencing WCAG 2.2 criteria.examples/button-component-spec.md — a complete, concrete Button spec: 4 variants × 3 sizes × 9 states, every cell mapped to semantic tokens, the prop/slot API, the focus-ring and target-size a11y contract, and do/don't pairs. Use it as the pattern for any new component. (See CONTRIBUTING.md — examples are mandatory and never lorem.)references/design-system-operating-model.md — token source of truth, component contract, inclusive component rules, pilots and governance, adoption scorecard, evidence chain.doctrine/design-doctrine.md — the anti-slop charter; §0 "looks human-made" applied to API design (composition over configuration, one authored choice applied systematically).doctrine/references/wcag-2.2-criteria.md — the a11y floor cited throughout: focus-visible & contrast (2.4.7, 1.4.11), focus-not-obscured (2.4.11), target size 24px (2.5.8), reduced motion (2.3.3), dragging alternative (2.5.7), name/role/value (4.1.2), color-not-alone (1.4.1).references/atomic-structure.md — the atomic ladder, classification rules, and composition (slots/compound) decision guide.references/component-doc-template.md — the per-component documentation template (anatomy, variant API, state matrix, a11y contract, do/don't).design-tokens-and-naming (tokens this skill consumes), dark-mode-and-theming, design-handoff-and-dev-spec, accessibility-wcag-2-2-compliance.Use the design-system operating model for scenario-led component contracts and complete state coverage.
Use references/design-system-operating-model.md §4-5 for product-first pilots, variation-led abstraction, governance, and outcome metrics from the supplied design-systems book.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
React, Vue, CSS, TypeScript
component-library, design-system, component-api, variants, composition
110 skills in this plugin
/accessibility-wcag-2-2-complianceUse when designing or auditing an interactive UI for WCAG 2.2 AA, keyboard and focus behaviour, accessible names, screen readers, target size, reflow, authentication, or reduced motion. Use inclusive-and-assistive-design for needs beyond the compliance floor./accessible-color-and-contrastUse when verifying or fixing text, UI, focus, border, status, or data colours for contrast and colour-vision accessibility. Unlike color-system-and-palette, this is the focused WCAG/APCA and non-colour-cue gate, not palette creation./advertising-creative-art-directionOther plugins' skills for the same job
npx claudepluginhub peterbamuhigire/chwezi-design-engine --plugin design-engine