component-scaffold

Generate UI component file trees with tests, stories, and Gherkin specs.

23|7|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/kinncj/MAPLE --skill component-scaffold-kinncj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-scaffold
Source: https://github.com/kinncj/MAPLE/tree/main/template/.opencode/skills/component-scaffold
Command: npx skills add https://github.com/kinncj/MAPLE --skill component-scaffold-kinncj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate a complete UI component scaffold with a full file tree, including implementation, Storybook stories, unit tests, and Gherkin bindings, all wired to design tokens when available.

Core Features & Use Cases

  • Automatically scaffolds a full component directory with index.tsx, .stories.tsx, .test.tsx, and .spec.ts for Gherkin bindings.
  • Detects the target stack from project.config.yaml (e.g., react-mantine, react-tailwind, html) and scaffolds accordingly.
  • Wires in design tokens when tokens exist, and preserves existing files to avoid overwrites.

Quick Start

Run the scaffold script with your component name, story ID, and target stack to generate the full component tree.

Frequently Asked Questions about component-scaffold

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

FAQPage Schema
How do I scaffold a React UI component with Storybook stories and tests together?

Scaffolding a React UI component with stories and tests is automated by generating a full file tree including index.tsx, .stories.tsx, .test.tsx, and .spec.ts files simultaneously. The process detects your stack and wires design tokens automatically.

Can I generate Gherkin spec stubs alongside my UI component implementation?

Yes, you can generate Gherkin spec stubs alongside your UI component implementation. The scaffolding creates a .spec.ts file for Gherkin bindings in the same directory as your component index.tsx and Storybook stories.

Does the scaffolder support React Mantine and Tailwind stacks?

Yes, the scaffolder supports React Mantine and Tailwind stacks, alongside plain HTML. It auto-detects the target stack from your project.config.yaml file and scaffolds the component accordingly.

How do I wire design tokens into a new UI component automatically?

To wire design tokens into a new UI component automatically, the scaffolder checks for existing tokens in your project. When tokens are present, it wires them into the generated index.tsx file during the scaffolding process.

Will scaffolding a new component overwrite my existing files?

No, scaffolding a new component will not overwrite existing files. The tool explicitly preserves existing files and avoids overwrites, ensuring your current modifications remain intact while generating new stubs.

What's the best way to structure a complete UI component file tree?

The best way to structure a complete UI component file tree is using a scaffolding script that generates index.tsx, Storybook stories, unit tests, and Gherkin specs in a single directory, wiring design tokens if available.