building-components

Builds, restructures, and standardizes React components according to project conventions (placement, folder/file naming, exports, props patterns). Use when adding components or when reorganizing existing components during refactors, migrations, or component moves.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "building-components" with this command: npx skills add ilya-valasiuk/agent-skills/ilya-valasiuk-agent-skills-building-components

Creating Components

Workflow

Copy this checklist and track progress:

Component Progress:
- [ ] Step 1: Determine placement
- [ ] Step 2: Create folder structure
- [ ] Step 3: Create component file
- [ ] Step 4: Add sub-components (if needed)
- [ ] Step 5: Validate against checklist
- [ ] Step 6: Run lint fix and re-check

Step 1: Determine placement

Infer from context if possible, otherwise ask the user. See references/placement.md for paths and conventions for each type:

  • Shared (common) component
  • Page-specific component
  • Sub-component of existing component
  • Page component

Step 2: Create folder structure

Create a kebab-case folder in the appropriate location. See references/folder-structures.md for diagrams of each scenario.

Step 3: Create component file

Create a PascalCase .tsx file inside the folder. Follow the conventions in references/REFERENCE.md.

Step 4: Add sub-components (if needed)

If the component needs sub-components, create a components/ folder inside it. Each sub-component follows the same rules. See references/placement.md for the sub-component pattern.

Step 5: Validate against checklist

Run through the validation checklist below before considering the component complete.

Step 6: Run lint fix and re-check

Run linter with auto-fix scoped only to the created or modified files. If errors remain after auto-fix, notify the user that manual fixes are required and stop — do NOT suppress errors with eslint-disable, @ts-ignore, @ts-expect-error, or any other suppression directives.


Validation checklist

After creating a component, verify every item:

Naming

  • Folder name is kebab-case (e.g., card-content)
  • File name is PascalCase and matches the exported component (e.g., CardContent.tsx exports CardContent)
  • File is inside its own folder (not loose in a parent directory)

Exports

  • Uses named export: export const ComponentName: React.FC<Props>
  • No default exports
  • One component per file

Props

  • Props defined as type Props (not interface)
  • Props ordered: required → optional → function callbacks
  • React.FC<Props> used (or React.FC if no props)

Structure

  • Component placed in the correct directory (common vs page-specific)
  • Sub-components live in a components/ subfolder, not alongside the parent
  • Implicit return used when the body is JSX-only

Files

  • Optional helper files (types.ts, constants.ts, helpers.ts, index.ts) created only if needed

Linting

  • Lint was run for changed component files
  • Lint auto-fix was run
  • No new lint errors remain in touched files

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

Repository Source
85.9K23Kvercel
Automation

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

Repository Source
60.3K23Kvercel
Automation

supabase-postgres-best-practices

Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.

Repository Source
35.1K1.6Ksupabase
Automation

sleek-design-mobile-apps

Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").

Repository Source