Enforces naming conventions, prop typing patterns, file structure, and test coverage standards. Use when creating or modifying React components, custom hooks, or component tests. Trigger terms: React app, .tsx files, testing library, custom hooks, functional components
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
ComponentName.tsx in the feature folder; co-locate ComponentName.module.scss and ComponentName.test.tsxComponentNameProps with TypeScript; destructure in function signatureinterface UserCardProps { name: string; role: string }
export function UserCard({ name, role }: UserCardProps) {
return (
<div data-testid="user-card">
<h3>{name}</h3>
<span>{role}</span>
</div>
);
}tsconfig.json. See REFERENCE.md for detailed TypeScript patterns..module.scss) co-located with components.import { render, screen } from '@testing-library/react';
import { UserCard } from './UserCard';
test('renders user info', () => {
render(<UserCard name="Alice" role="Admin" />);
expect(screen.getByText('Alice')).toBeInTheDocument();
expect(screen.getByTestId('user-card')).toBeInTheDocument();
});Run these as part of your PR validation pipeline or locally:
pnpm lint # fixable issues: pnpm lint --fix
pnpm typecheck # run `pnpm tsc --noEmit` if alias not present
pnpm test # rerun failing tests with `pnpm test -- -t <name>`
pnpm build # ensure production build succeedsIf lint fails: run pnpm lint --fix and re-run. If typecheck fails: inspect reported files; add missing types. If tests fail: run with --runInBand to collect stack traces and reproduce locally.
f5c8508
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.