frontend-component

Generate React and Next.js components with TypeScript props, tests, and styles.

232|12|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/qf-studio/navigator --skill frontend-component-qf-studio
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-component
Source: https://github.com/qf-studio/navigator/tree/main/skills/frontend-component
Command: npx skills add https://github.com/qf-studio/navigator --skill frontend-component-qf-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually scaffolding React or Next.js components means repeatedly writing the same boilerplate: props interfaces, test files, style modules, and barrel exports. This Skill automates that scaffolding so every component follows consistent naming, typing, testing, and styling conventions from the start. ## Core Features & Use Cases - Component Generation: Creates TypeScript component files from templates for simple, hooks-based, and container components, plus Next.js App Router variants (page, layout, server, and client components) with Next.js 15+ conventions baked in. - Test and Style Scaffolding: Generates React Testing Library test files and CSS Modules, styled-components, or Tailwind styling, plus a barrel export (index.ts) for clean imports. - Validation and Knowledge Reuse: Validates PascalCase naming against reserved words, queries a project knowledge graph for existing patterns and decisions, and emits an execution summary so future runs reuse what was learned. - Use Case: Ask for a new UserProfile component and receive a complete src/components/UserProfile/ directory containing the component, tests, styles, and exports, ready to import and customize. ## Quick Start Ask the AI to create a new React component named UserProfile with a userId string prop and an optional onUpdate callback, including tests and CSS module styles.

Frequently Asked Questions about frontend-component

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

FAQPage Schema
How do I generate a React component with TypeScript and tests?▼

Provide a PascalCase component name, a type (simple, with-hooks, or container), and optional props. The skill generates the component file, a React Testing Library test file, a style file, and an index.ts barrel export in a dedicated folder.

Does this support Next.js App Router components?▼

Yes. When next is detected in package.json, it offers four App Router variants: nextjs-page, nextjs-layout, nextjs-server, and nextjs-client. Templates encode Next.js 15+ conventions like async params, 'use client' placement, and Tailwind styling.

What styling approaches are supported for generated components?▼

Three approaches are supported: CSS Modules (default for generic React), styled-components, and Tailwind. Tailwind is the default for Next.js component types, and no separate CSS file is generated in that case.

Why does my component name fail validation?▼

Names must be PascalCase, at least 4 characters, alphanumeric only, and not reserved words like Component or Element. Names starting with My, The, New, or Test are also rejected; the validator can suggest a corrected name.

What tests are included in the generated test file?▼

The generated test file uses React Testing Library and includes a render-without-crashing test, a children rendering test, and a custom className test. You can extend it with event handler and accessibility tests for your props.