component-creation

component-creation is a skill for Cursor from girijashankarj/cursor-handbook. It costs 28 tokens per session (732 once invoked), scanned A, original, MIT.

A step-by-step guide for creating accessible UI components in React or Vue, including their code, properties, styles, exports, and tests.

In plain words
What is it for?
Use it to plan and build reusable frontend components, define their inputs and state, and add unit tests.
Why use it?
It provides a consistent structure for new components and helps avoid missing accessibility or testing work.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to plan and build reusable frontend components, define their inputs and state, and add unit tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/girijashankarj/cursor-handbook/component-creation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add girijashankarj/cursor-handbook --skill component-creation
Clone the repo
git clone --depth 1 https://github.com/girijashankarj/cursor-handbook

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for component-creation

README.md
[![agentmods](https://agentmods.dev/badge/skills/girijashankarj/cursor-handbook/component-creation.svg)](https://agentmods.dev/skills/girijashankarj/cursor-handbook/component-creation)
Your own site
<a href="https://agentmods.dev/skills/girijashankarj/cursor-handbook/component-creation"><img src="https://agentmods.dev/badge/skills/girijashankarj/cursor-handbook/component-creation.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.00732
Opus 5 $0.00014 $0.00366
Sonnet 5 $0.00006 $0.00146
Haiku 4.5 $0.00003 $0.00073

Measured 4d ago against content hash b673ca0654db, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

component-creation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/frontend/component-creation/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Create UI Component

Trigger

When the user asks to create a new UI component.

Prerequisites

  • Project uses React (or Vue; adjust steps)
  • src/components/ or equivalent exists
  • Testing framework configured (Jest, Vitest, etc.)
  • Styling approach known (Tailwind, CSS Modules, etc.)

Steps

Step 1: Define Component

  • Name the component (PascalCase)
  • Define its purpose and responsibilities
  • Identify parent and child components
  • List props and their types
  • Identify state requirements

Step 2: Create Component Directory

src/components/{category}/{ComponentName}/
├── {ComponentName}.tsx       # Component implementation
├── {ComponentName}.test.tsx  # Unit tests
├── {ComponentName}.stories.tsx # Storybook story (optional)
└── index.ts                  # Public export

Step 3: Define Props Interface

  • Create TypeScript interface for props
  • Add JSDoc documentation for complex props
  • Set default values where appropriate
  • Mark optional props with ?

Step 4: Implement Component

  • Use functional component with hooks
  • Destructure props in function signature
  • Implement rendering logic
  • Add error boundary if needed
  • Handle loading, error, and empty states

Step 5: Add Accessibility

  • Semantic HTML elements used
  • ARIA attributes where needed
  • Keyboard navigation works
  • Focus management for modals/popups
  • Color contrast meets WCAG 2.1 AA

Step 6: Add Styling

  • Follow project styling approach
  • Responsive across breakpoints
  • Dark mode support
  • Design token usage (no magic numbers)
  • No inline styles (except dynamic values)

Step 7: Write Tests

  • Renders correctly with default props
  • Renders correctly with all prop combinations
  • User interactions work (click, type, etc.)
  • Accessibility tests pass
  • Error states handled

Step 8: Create Export

  • Export component from index.ts
  • Export props interface

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 87 lines · 28 tokens per session scan A b673ca0654db

Subscribe to this mod's changes

component-creation is a skill published in the GitHub repository girijashankarj/cursor-handbook (30 stars, last pushed 8d ago), licensed MIT. It adds 28 tokens to every session and 732 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

front-vitest

Depth for Vitest tests of front- React 19 SPAs when DOM, RTL, TanStack Query hooks, or TanStack Router route-tree tests are needed. USE WHEN: adding jsdom or testing-library, writing tsx render or renderHook tests, testing createMemoryHistory plus RouterProvider, Suspense UI, or React 19 act fixtures. DO NOT USE WHEN…

louisbrulenaudet/monorepo-template · 102 tokens

react-testing-library

React Testing Library mechanics for testing React components and hooks — query selection, async handling, user interaction, assertions, provider setup, and the anti-patterns that make tests brittle. Use for any test that renders a React component or a hook, including choosing between getBy/queryBy/findBy, userEvent…

shipshitdev/skills · 86 tokens

component-scaffold-generator

Generates clean React/Vue component skeletons with TypeScript types, prop variants, styling hooks, test files, Storybook stories, and usage documentation. Use when users request "create a component", "scaffold component", "new React component", or "generate component boilerplate".

patricio0312rev/skills · 62 tokens

storybook-setup

Sets up Storybook for component documentation with controls, actions, accessibility testing, and visual regression. Use when users request "Storybook setup", "component documentation", "UI library", "component stories", or "design system docs".

patricio0312rev/skills · 50 tokens

component-test

Generate production-grade Vitest tests from HTML elements captured in DevTools. Two-phase workflow (analysis → generation) with edge case discovery.

Recusive/Skills · 30 tokens

frontend-testing

Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.

dvasyliev/ai-dev-tools-getting-started · 50 tokens