From design-system-ops
Audits component library APIs for prop naming consistency, breaking changes, TypeScript coverage, default patterns, and design-to-code contract compliance.
npx claudepluginhub murphytrueman/design-system-opsThis skill uses the workspace's default tool permissions.
A skill for auditing the public API surface of a component library — prop naming consistency, type coverage, default value patterns, breaking change detection, and alignment with the design-to-code contract. Treats the component API as infrastructure: the public contract that consuming teams depend on.
Audits design system component libraries for usage signals, complexity, duplication, and coverage gaps, producing tiered findings, inventory, and prioritized recommendations.
Detects design systems in code, identifies token drifts with paired evidence blocks showing definitions vs conflicting usages. Use for auditing UI consistency.
Reviews React components for architecture, hooks usage, React 19 patterns, state management, performance optimization, accessibility, and TypeScript. Use before merging PRs, after new features, or for validation.
Share bugs, ideas, or general feedback.
A skill for auditing the public API surface of a component library — prop naming consistency, type coverage, default value patterns, breaking change detection, and alignment with the design-to-code contract. Treats the component API as infrastructure: the public contract that consuming teams depend on.
A component library's most important output is not its visual rendering — it is its API. The props, types, defaults, and composition patterns form a contract with every consuming team. When that contract is inconsistent (some components use variant, others use type, others use appearance for the same concept), unclear (prop types are any or undocumented), or unstable (breaking changes ship without versioning), consuming teams lose trust. And when trust erodes, teams start wrapping system components in local abstractions, which is the beginning of drift.
API validation is not about enforcing a single naming convention. It is about detecting where the library's public surface is working against the teams consuming it. A library where every component follows the same patterns for sizing, variants, event handlers, and composition is a library that teams can learn once and apply everywhere. A library where each component invents its own conventions is a library that requires re-learning for every component.
This skill evaluates the API surface as a whole — not one component at a time, but the patterns that emerge across the library. Individual component reviews are useful but miss the cross-library inconsistencies that frustrate consumers most.
Check for .ds-ops-config.yml in the project root. If present, load:
system.framework — React, Vue, Web Components, Svelte, Angular, etc. (determines prop extraction method)system.styling — CSS Modules, Styled Components, Tailwind, Emotion, etc.severity.api_* — overrides for API finding severityintegrations.github — if enabled, pull component source directly from the repointegrations.storybook — if enabled, extract prop metadata from Storybook's component analysisGitHub (integrations.github.enabled: true):
Storybook (integrations.storybook.enabled: true):
Figma (integrations.figma.enabled: true):
If an integration fails, log it and proceed with manual input.
Ask for or confirm:
src/components/)For each component in the source path:
any/unknown/untyped)children/slots?This is the core of the skill. Evaluate patterns across the entire library, not within individual components.
Look for the same concept implemented with different names across components:
| Concept | Consistent pattern | Inconsistent examples |
|---|---|---|
| Visual variant | All use variant | Some use variant, others type, others appearance, others kind |
| Size | All use size | Some use size, others scale, others dimension |
| Disabled state | All use disabled | Some use disabled, others isDisabled |
| Loading state | All use loading | Some use loading, others isLoading, others pending |
| Event handlers | All use onAction | Some use onChange, others handleChange, others onValueChange |
| Colour/intent | All use intent | Some use intent, others color, others severity, others status |
For each inconsistency, report:
Boolean props are a common source of API inconsistency:
isDisabled or disabled? Pick one, flag deviations.noWrap, hideLabel, disableAnimation are harder to reason about than their positive equivalents (wrap, showLabel, animate). Flag negative booleans and suggest positive alternatives where the inversion doesn't lose clarity.compact) but should be an enum (density: 'compact' | 'default' | 'comfortable'). Flag booleans that limit future extensibility.size default to 'medium' in some components and 'md' in others?variant default to the most common use case? Flag surprising defaults.'sm' | 'md' | 'lg') or vague (string)?Select<T>), are they consistently applied?onChange vs onValueChange vs handleChange. Identify the library's convention and flag deviations.value/onChange vs defaultValue)?If a previous version is available:
string → 'a' | 'b')Classify each:
Cross-reference the API surface against the design-to-code contract:
# Component API Validation Report
## Executive Summary
[Library name, component count, framework, TypeScript coverage, headline findings]
## API Inventory
| Component | Props | Typed | Required | Optional | Defaults | Description coverage |
|-----------|-------|-------|----------|----------|----------|---------------------|
[One row per component]
## Cross-Library Consistency
### Prop Naming
[Table of concept → convention → deviations]
Consistency score: X% (Y/Z props follow the dominant convention)
### Boolean Patterns
[Findings: negative booleans, boolean-should-be-enum, prefix inconsistency]
### Default Values
[Findings: missing defaults, inconsistent defaults]
### Type Coverage
[Overall: X% of props are explicitly typed]
[Breakdown: full TypeScript / JSDoc / PropTypes / untyped per component]
### Event Handlers
[Convention identified, deviations listed]
### Composition Patterns
[Ref forwarding coverage, children vs render props consistency, slot naming]
## Breaking Change Analysis
[If previous version available]
| Change | Component | Prop | Type | Impact |
|--------|-----------|------|------|--------|
[One row per change]
## Design-to-Code Contract
[Findings: design variants without props, props without design equivalents, missing state coverage]
## Findings Summary
[All findings with IDs (AV-01, AV-02, etc.), severity, and remediation]
## Prioritised Recommendations
[Grouped: critical (breaking/type safety) → high (consistency) → medium (documentation) → low (style)]
Before delivering the report, verify:
variant, 4 use type, 1 uses appearance"type to variant in AlertDialog, Badge, Toast"For libraries with fewer than 10 components: run the same analysis but present as a single consolidated view. Every finding gets individual attention. Consistency is easier to achieve in a small library — the bar should be 100% consistency, not "mostly consistent."