component-quality-gate

Audits React and Next.js components against accessibility, performance, testing, and TypeScript contract criteria.

1|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/sabiscore/swarmxq --skill component-quality-gate-sabiscore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-quality-gate
Source: https://github.com/sabiscore/swarmxq/tree/main/.ai/skills/component-quality-gate
Command: npx skills add https://github.com/sabiscore/swarmxq --skill component-quality-gate-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing React components for production readiness requires checking accessibility, performance, TypeScript types, tests, Storybook stories, and error states — a process that is easy to do inconsistently or skip entirely. This Skill runs a structured six-dimension audit and returns specific issues, fixes, and corrected code. ## Core Features & Use Cases - Six-Dimension Audit: Checks TypeScript prop contracts, WCAG AA accessibility, render performance, test coverage, Storybook stories, and error/loading states. - Corrected Code Output: Produces a fixed version of the component with annotated changes, plus a Vitest/Testing Library test file and a Storybook story file. - ARIA Pattern Guidance: Provides correct markup patterns for custom widgets like dialogs, disclosures, and comboboxes. - Use Case: Paste a TSX button or form component and ask whether it is production-ready; receive a full audit report, an axe-compliant corrected component, three tests, and Storybook stories. ## Quick Start Paste your React or TSX component and ask the assistant to audit it for production readiness with corrected code, tests, and Storybook stories.

Frequently Asked Questions about component-quality-gate

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

FAQPage Schema
How do I check if a React component is production-ready?

Run a structured audit covering TypeScript prop types, WCAG AA accessibility, render performance, test coverage, Storybook stories, and error/loading states. Paste the TSX component and request a review to get specific issues, fixes, and corrected code.

How to write accessibility tests for React components?

Use jest-axe with Testing Library to run an axe scan on the rendered component and assert zero violations. Combine this with keyboard navigation tests using userEvent.tab() to verify focus management.

What ARIA attributes does a custom modal dialog need?

A dialog needs role="dialog", aria-modal="true", and aria-labelledby pointing to its title element. Focus must be trapped inside while open, which libraries like @radix-ui/react-dialog handle automatically.

Does this work with Next.js components and next/image?

Yes, the audit covers Next.js-specific patterns including next/image usage with width, height, and priority attributes, React Server Components, and lazy loading via dynamic imports for below-fold components.

Why do inline objects in JSX props cause performance problems?

Inline objects and arrays create a new reference on every render, breaking memoization in child components. Move static objects outside the component or wrap dynamic values in useMemo to keep references stable.