api-consistency

Reviews React component prop interfaces for naming inconsistencies and contract violations across a design system.

1|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/robritacca-dotcom/design-system --skill api-consistency-robritacca-dotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-consistency
Source: https://github.com/robritacca-dotcom/design-system/tree/main/.claude/skills/api-consistency
Command: npx skills add https://github.com/robritacca-dotcom/design-system --skill api-consistency-robritacca-dotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Component libraries drift over time: one component uses disabled while another uses isDisabled, size enums differ between siblings, and some components silently break the published contract by missing forwardRef or native prop extension. This Skill audits TypeScript prop interfaces across the design system and produces a grouped, prioritized findings report. ## Core Features & Use Cases - Contract conformance checks: Verifies forwardRef with displayName, {...rest} spread placement, props extending native element types, correct 'use client' usage, and standard event handler signatures like onValueChange and onCheckedChange. - Style-level consistency audit: Flags mixed boolean naming (disabled vs isDisabled), inconsistent size enums (sm/md/lg vs small/medium/large), non-standard event handler names, and missing standard props like className and disabled. - Family consistency analysis: Compares related components (e.g. Button, CircularButton, ButtonGroup) for shared size enums, icon prop patterns, and aligned default values. - Use Case: Before a design system release, ask for a prop consistency audit to catch breaking renames and missing props, then batch high-impact fixes into a planned breaking release. ## Quick Start Ask the AI to run a prop consistency audit on all components in src/components and report any API inconsistencies grouped by impact.

Frequently Asked Questions about api-consistency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit React component props for naming consistency?

Run a prop consistency audit that reads every component's TypeScript interface and flags mixed conventions like `disabled` versus `isDisabled`, mismatched size enums, and non-standard event handler names. The audit produces a grouped report prioritized by breaking impact.

How to check if components follow forwardRef and native props patterns?

The audit verifies each component forwards a ref to its primary DOM node with a matching displayName, spreads rest props onto that node, and extends the native element's props via React.ComponentPropsWithoutRef so data-* and aria-* attributes remain reachable.

Can I audit only specific components instead of the whole library?

Yes, the scope accepts a list of specific components, the keyword `all` to scan everything in src/components, or a category description like "all form inputs" from which the relevant components are inferred.

What standard props should interactive React components have?

Interactive components should expose `className`, components with visual disabled states should have `disabled`, and form-like components should have `id`. The audit flags missing standard props while treating `name` on non-native controls as a documented no-op rather than an omission.

When should prop renames be batched into a breaking release?

Renames that require consuming code changes are flagged as high impact so they can be batched into a planned breaking release. The audit prefers deprecations over removals, keeping old props working with a @deprecated tag naming their replacement.