/design-system-ops:component-api-validatorfrom design-system-ops
Audits prop APIs across a component library for naming consistency, boolean/default patterns, type coverage, exported types, and breaking changes between versions. Useful for cross-library API consistency reviews.
Ships in design-system-ops. 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.
None: SKILL.md is the whole skill.
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.
Confirm that every path in this skill's frontmatter references: exists relative to this SKILL.md. If any is missing, stop: the install is incomplete, usually because a flattening installer (for example npx skills install) dropped the repo-root knowledge-notes/ directory. Tell the user to reinstall by a method in 1-INSTALL.md and run verify-install.sh from the install root. Proceed without the references only if the user explicitly says to, and then say in the output that it was produced without the pack's reference material.
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.
Do NOT use this skill for: deciding the semver bump for a release (use version-bump-advisor) or checking one component against its design spec (use design-to-code-check).
If .ds-ops-config.yml exists, follow the configuration-and-recurring knowledge note (../../knowledge-notes/configuration-and-recurring.md) for loading, integration fallbacks and recurring runs. This skill reads:
system.framework — determines the prop extraction methodsystem.styling — styling approachseverity.api_* — overrides for API finding severityintegrations.github — component source (see below)integrations.storybook — prop metadata (see below)GitHub (integrations.github.enabled: true):
Storybook (integrations.storybook.enabled: true):
Figma (integrations.figma.enabled: true):
Read before asking. package.json gives the package name, version, exports, main and types; the entry point gives the public component list; tsconfig.json or the presence of .d.ts, PropTypes or JSDoc gives the typing approach; the framework shows in the dependencies. Confirm what you found in one line and ask only for:
npm pack <pkg>@<prev> and read its .d.ts files, or an api-extractor report); a git tag or release branch works if nothing was publishedIf no component source is in reach (no path, no checkout, no package to unpack), stop and ask for one; an API audit of described components produces guesses.
For each component in the source path:
react-docgen-typescript (npx react-docgen-typescript or its API) gives name, type, required, default and description per prop from the interfaces. Storybook argTypes (from integrations.storybook) are the same data if the docs addon is set up.vue-component-meta for <script setup> and defineProps; fall back to reading defineProps by hand.npx custom-elements-manifest analyze, or an existing custom-elements.json) lists attributes, properties, events, slots and CSS custom properties; it is the standard, so read it rather than re-deriving it.let declarations, events, slots (read by hand; note that in the Scope block).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.false, so the common case needs no prop. hideLabel is the right shape when labels usually show; showLabel defaulting to true forces showLabel={false} at every call site that hides one. Flag a boolean whose default is true, and flag a library that uses both forms for the same concept (hideLabel on one component, showLabel on another). Don't flag a negative name on its own.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, compare the published type declarations of both versions, not the source. Source can differ from what shipped, and declarations show the whole public surface. Diff the package exports (components, hooks, types, utilities) as well as props — a removed export breaks consumers just as surely as a removed prop.
string → 'a' | 'b')Classify each:
Only when a Figma library or exported spec is in reach. Otherwise write "skipped: no design source" under Scope and move on; don't infer design variants from prop names. With a source, cross-reference the API surface against the design-to-code contract:
aria-* attributes passed through to the underlying element? Do icon-only variants require an accessible label (e.g. a required aria-label or label prop in the type for the icon-only case)? A consumer-settable role prop is not required, and usually a smell# Component API Validation Report
[Headline sentence: the most important API problem and how widespread it is]
## 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 → dominant convention → deviations → ✅ PASS / ⚠️ WARN / ❌ FAIL per pattern]
[Counts, e.g. "14 of 19 components use `variant`; 4 use `type`; 1 uses `appearance`" (illustrative)]
### Boolean Patterns
[Findings: negative booleans, boolean-should-be-enum, prefix inconsistency]
### Default Values
[Findings: missing defaults, inconsistent defaults]
### Type Coverage
[Overall: X of Y props 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
| ID | Severity | Component | Prop | Evidence | Finding | Remediation |
|---|---|---|---|---|---|---|
| AV-01 | 🟠 High | Badge | `type` | `src/components/Badge/Badge.tsx:12` | 14 of 19 components use `variant`; Badge uses `type` for the same concept | Rename to `variant`, keep `type` as a deprecated alias for one minor |
Severity: 🔴 Critical for a breaking change that shipped without a major, or `any`/untyped on a public prop of an interactive component; 🟠 High for one concept named two ways across the library, a missing exported prop type, or a required prop with no description; 🟡 Medium for inconsistent defaults, missing descriptions, or a boolean that should be an enum; ⚪ Low for style (prefix conventions, slot naming). Evidence is the file and line of the prop's declaration, or the `.d.ts` line when comparing versions.
## Prioritised Recommendations
[Grouped: 🔴 Critical (breaking/type safety) → 🟠 High (consistency) → 🟡 Medium (documentation) → ⚪ Low (style)]
**Scope**
- **Inspected:** [source paths, entry points, declaration files, previous version compared against]
- **Not inspected:** [components not exported from the entry point, runtime behaviour, packages out of reach]
- **How "none found" was checked:** [e.g. "no breaking changes" — both versions' `.d.ts` exports were diffed and the diff did pick up the props added in this release]
- **Assumptions:** [e.g. the entry point defines the public API]
If any of these inconsistencies are deliberate (a legacy name kept for compatibility, a convention you've chosen on purpose), tell me and I'll treat them as accepted in future runs.
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."
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
36 skills in this plugin
/accessibility-per-componentAudit one design system component's accessibility against WCAG 2.2 AA: keyboard, screen reader, contrast, focus, ARIA, target size. Trigger: a11y audit, is this accessible, WCAG check, screen reader support, keyboard navigation check. Not for page- or product-wide audits./adoption-reportAdoption report: coverage (what the system provides), reach (teams with access) and adoption (teams shipping with it), design vs engineering, trend and at-risk teams. Triggers: adoption report, usage metrics, which teams use the system. Not docs coverage — use docs-coverage./agent-instructionsWrite the AGENTS.md that tells coding agents how to use this design system: where things live, sourced rules, how to check work, what not to do; Claude, Cursor or Copilot pointers on request. Triggers: AGENTS.md for our system, make it AI-navigable, agent instructions. Inventory: codebase-index./ai-component-descriptionWrite a six-section prose description (purpose, props, anti-patterns, composition, accessibility, examples) for a Figma component's description field so LLMs read it via MCP. Triggers: describe this component for AI, Figma MCP description. JSON metadata files: use metadata-schema-generator./backlog-generatorTurn existing audit findings into sprint-ready tickets with T-shirt estimates, acceptance criteria, dependencies and phases. Triggers: tickets from audit, backlog from findings, sprint planning from report. Not for the contribution process (contribution-workflow)./change-communicationWrite release notes, a migration guide and a team announcement for a design system change that is already decided, scaled to its impact. Triggers: release notes, announce this change, tell teams about a breaking change. Semver call: version-bump-advisor. Deprecation plan: deprecation-process.Generated from the plugin's indexed repository (murphytrueman/design-system-ops) — no native marketplace selected
npx claudepluginhub p/murphytrueman-design-system-opsOther plugins' skills for the same job