new-component

Generate a web component scaffold with TSX, CSS module, and barrel export.

Updated Aug 9, 2025
One-click install
npx skills add https://github.com/pabloibanezcom/fintrak --skill new-component-pabloibanezcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-component
Source: https://github.com/pabloibanezcom/fintrak/tree/main/.claude/skills/new-component
Command: npx skills add https://github.com/pabloibanezcom/fintrak --skill new-component-pabloibanezcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a reusable, well-structured web component quickly by generating a standard folder layout, TypeScript typings, a CSS module, and a barrel export.

Core Features & Use Cases

  • Automated scaffolding: Generates a ComponentName/ folder containing ComponentName.tsx, ComponentName.module.css, and index.ts.
  • Typed props: Produces a component with a typed props interface to improve DX and maintainability.
  • Barrel export: Ensures an index.ts barrel export to simplify imports across the codebase.
  • Use Case: Rapidly spin up consistent UI elements for dashboards and pages with minimal boilerplate.

Quick Start

Provide the component name and I will generate the folder and files following the template.

Frequently Asked Questions about new-component

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

FAQPage Schema
How do I scaffold a TypeScript web component with CSS modules?

The best way to create a reusable web component is to generate a standard folder layout with a typed TSX file and a CSS module. This approach ensures consistent UI elements by producing ComponentName.tsx, ComponentName.module.css, and an index.ts barrel export with minimal boilerplate.

Why use a barrel export when creating a TypeScript UI library?

You use a barrel export when creating a TypeScript UI library to simplify imports across the codebase. Generating an index.ts barrel export re-exports the component module, allowing consumers to import components directly from the parent directory path.

Can I use this scaffolding approach for frontend UI development without dependencies?

Yes, you can use this scaffolding approach for frontend UI development without dependencies. The component generator operates independently to produce the required TSX, CSS module, and barrel export files, requiring only the component name to execute the scaffolding process.

What is the standard folder layout for a reusable web component with typed props?

The standard folder layout for a reusable web component with typed props is a ComponentName directory containing ComponentName.tsx, ComponentName.module.css, and index.ts. The TSX file includes a typed props interface to improve developer experience and maintainability.

Does scaffolding a web component with a CSS module limit my styling approach?

Scaffolding a web component with a CSS module scopes styles locally to prevent naming conflicts, but it does not inherently limit global styling. You can supplement the generated ComponentName.module.css file with additional global stylesheets as needed for your web application.