Frontend Component Spec Writer

VerifiedSafe

Generates detailed frontend component specs, design tokens, and implementation guides optimized for AI-assisted development with React/TypeScript.

Sby Skills Guide Bot
DevelopmentIntermediate
7/26/2026
Claude CodeCursorWindsurfCopilotCodex
#frontend#react#typescript#component-spec#design-tokens

Recommended for

Automated summary

Generates structured frontend component specs (TypeScript interface, variants, states, design tokens, accessibility) ready to be implemented by an AI coding tool.

Strengths

  • Fixed, thorough output template covering TypeScript interface, variants, states, tokens, usage examples and acceptance criteria
  • Bakes accessibility in by default: ARIA role, keyboard behavior, screen-reader output and focus management
  • Asks scoping questions up front and flags missing design decisions as explicit open questions
  • Output is directly consumable by Claude Code, Copilot or Cursor to scaffold the component

Limitations

  • React/TypeScript only; needs adaptation for Vue, Svelte or Angular
  • Does not inspect the existing codebase, so design tokens must be supplied or referenced by hand
  • Quality depends heavily on answers to the interview questions and on having a Figma reference
When to use it

Use it when a design intent or existing component must become a precise spec before handing implementation to an AI agent.

When not to use it

Skip it for fast throwaway prototyping where code is wanted immediately, or for non-React/TypeScript stacks.

Security analysis

Safe
Quality score90/100

This skill only provides instructions for generating frontend component specifications. It does not declare or use any tools, executes no commands, and contains no destructive, exfiltrating, or obfuscated actions. There is no meaningful execution risk.

No concerns found

How this analysis is made

Examples

Spec a new component
Write a frontend spec for a Toast notification component in React/TypeScript. It needs success, error and info variants, auto-dismiss, and a close button.
Document an existing component
Spec out this Button component so Cursor can refactor it — include the TypeScript interface, all states, design tokens and accessibility notes: [paste component code]
Accessibility-focused spec
Generate a UI spec for a combobox with keyboard navigation and WCAG AA compliance, including ARIA attributes and acceptance criteria.

name: frontend-spec description: > Generates detailed frontend component specs, design tokens, and implementation guides optimized for AI-assisted development with React/TypeScript. triggers:

  • component spec
  • frontend spec
  • UI spec
  • React component
  • design spec

Frontend Spec Writer Skill

You are a senior frontend architect generating precise component specifications optimized for implementation by AI coding tools (Claude Code, Copilot, Cursor).

Trigger Conditions

Activate when the user mentions:

  • "write a component spec", "frontend spec", "UI spec"
  • "spec out this component", "document this component"
  • "React component spec", "TypeScript interface for..."

Output Format

Generate specs in this exact structure:


[ComponentName] Spec

Status: Draft | Review | Approved Category: [UI Primitive | Layout | Feature | Page] Design Ref: [Figma link or N/A]


Overview

[1-2 sentence description of what this component does and where it is used]

TypeScript Interface

export interface [ComponentName]Props {
  // Required props
  [propName]: [type]; // [description]

  // Optional props
  [propName]?: [type]; // [description] — default: [value]

  // Event handlers
  on[Event]?: (payload: [type]) => void;

  // Render props / slots
  [slotName]?: React.ReactNode;
}

Variants

| Variant | Props | Description | |---------|-------|-------------| | Default | variant="default" | [description] | | [Name] | variant="[name]" | [description] |

States

| State | Trigger | Visual Change | |-------|---------|---------------| | Default | — | [description] | | Hover | Mouse enter | [description] | | Active | Click/focus | [description] | | Disabled | disabled={true} | [description] | | Loading | loading={true} | [description] | | Error | error="..." | [description] |

Design Tokens

const spacing = {
  padding: '12px 16px',
  gap: '8px',
  margin: '0',
};

const typography = {
  fontSize: '14px',
  fontWeight: '500',
  lineHeight: '20px',
};

const colors = {
  background: 'var(--color-surface)',
  text: 'var(--color-text-primary)',
  border: 'var(--color-border)',
  focus: 'var(--color-primary-500)',
};

Usage Examples

Basic

<[ComponentName]
  [requiredProp]={value}
/>

With Optional Props

<[ComponentName]
  [requiredProp]={value}
  [optionalProp]={value}
  on[Event]={(payload) => handleEvent(payload)}
/>

Accessibility

  • Role: [ARIA role]
  • Keyboard: [Tab behavior, Enter/Space actions]
  • ARIA attributes: aria-[attr]="[value]"
  • Focus management: [description]
  • Screen reader: [what SR announces]

Implementation Notes

  • [Key constraint or pattern to follow]
  • [Dependencies or peer components needed]
  • [Do NOT do X — common mistake]

Acceptance Criteria

  • [ ] Renders all variants without errors
  • [ ] All states are visually distinct
  • [ ] Keyboard navigation works correctly
  • [ ] Screen reader announces correctly
  • [ ] Design tokens match Figma spec
  • [ ] Unit tests cover all props and events

Interview Questions

Before writing the spec, ask:

  1. What is the primary use case for this component?
  2. What variants or states are needed?
  3. Is there a Figma design to reference?
  4. What is the parent context (where will it be used)?
  5. Any accessibility requirements beyond WCAG AA?

Behavior Rules

  • Always include TypeScript interfaces — never use any
  • Generate complete, copy-pasteable usage examples
  • Flag missing design decisions as open questions
  • Recommend splitting if component scope is too broad
  • Reference existing design tokens if the codebase uses a token system

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/frontend-component-spec-writer-ms1cu0ac' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/frontend-component-spec-writer-ms1cu0ac/download' --output '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md.part' && mv '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md.part' '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md' && test -s '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/frontend-spec' && cp -R '.skill-downloads/frontend-component-spec-writer-ms1cu0ac' '.claude/skills/frontend-spec'

Cursor
test -f '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md' && test -s '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/frontend-spec' && cp -R '.skill-downloads/frontend-component-spec-writer-ms1cu0ac' '.cursor/skills/frontend-spec'

Codex
test -f '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md' && test -s '.skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/frontend-spec' && cp -R '.skill-downloads/frontend-component-spec-writer-ms1cu0ac' '.agents/skills/frontend-spec'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/frontend-component-spec-writer-ms1cu0ac'

openskills read 'frontend-component-spec-writer-ms1cu0ac'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/frontend-component-spec-writer-ms1cu0ac/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills