component-generator

Generates Vue component trees with Props, Emits, Slots interfaces and state management plans.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/fen-zx/NovelToScript --skill component-generator-fen-zx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: component-generator
Source: https://github.com/fen-zx/NovelToScript/tree/main/.agents/skills/component-generator
Command: npx skills add https://github.com/fen-zx/NovelToScript --skill component-generator-fen-zx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a page prototype into code requires deciding component boundaries, interfaces, and state ownership upfront; doing this ad hoc leads to tangled components and rework. This Skill converts page specs or prototype descriptions into a complete frontend component design plan before any code is written. ## Core Features & Use Cases - Component Tree Generation: Produces a hierarchical component tree from page specs, marking conditional rendering such as modals with v-if. - Interface Definition: Defines Props, Emits, and Slots for each component with types, required flags, defaults, and trigger timing, enabling parallel development. - State Management Planning: Maps data flow (Props down, Emits up), assigns state to parent components, Pinia/Vuex stores, or Composables, and suggests hooks for side-effect logic. - Use Case: After confirming a user management page prototype, feed the component list and interaction flow into this Skill to receive a component tree, per-component interface tables, a useUserList Composable suggestion, and a views/ directory layout ready for coding. ## Quick Start Ask the AI to generate a component design plan from your page prototype description, including the component tree, Props/Emits/Slots interfaces, and state management scheme.

Frequently Asked Questions about component-generator

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

FAQPage Schema
How do I design Vue component interfaces before coding?▼

Define each component's Props (name, type, required, default), Emits (event name, payload, trigger timing), and Slots in a table format. This Skill generates these interface definitions from a page prototype description, producing a component tree plus per-component specs.

How to split a page into Vue components?▼

Split by single responsibility: a component deserves independence when it has its own Props/Emits, is reusable across pages, has distinct loading/empty/error states, or exceeds roughly 150 lines of template. Avoid splitting trivial wrapper divs.

When should Vue state go in Pinia versus component state?▼

Keep cross-component page data (lists, filters, pagination) in the parent component, UI-only state (input values, expand/collapse) inside the component, and cross-page data (user info, permissions) in a Pinia/Vuex store. Side-effect logic like requests belongs in Composables.

Does this component design skill generate actual Vue code?▼

No, it only outputs interface definitions and design plans, not template or script implementations. It defines Props, Emits, Slots, state flow diagrams, and directory suggestions as the final intermediate layer before coding.

What input does the component generator need?▼

It accepts Markdown prototype descriptions from a low-fidelity prototype generator, PAGE_SPECS documents with component suggestions and data sources, or plain ASCII layouts with functional descriptions listing modules and interactions.