AgentSkillsCN

Component Scaffolder

自动创建 React 组件及其对应的 CSS 文件。

SKILL.md
--- frontmatter
name: Component Scaffolder
description: Automates the creation of React components and their CSS files.

Component Scaffolder

This skill helps you quickly create new React components in src/components.

Usage

  1. Run the script: Use run_command to execute the Node.js script. Pass the name of the component you want to create (e.g., MyNewComponent).

    bash
    node .agent/skills/component_scaffolder/scripts/scaffold.js [ComponentName]
    
    • [ComponentName]: The name of the component (e.g., Header, Footer, UserProfile). It will be automatically capitalized.
  2. Verify: The script will create:

    • src/components/[ComponentName].jsx
    • src/components/[ComponentName].css

Example

To create a ModelViewer component:

bash
node .agent/skills/component_scaffolder/scripts/scaffold.js ModelViewer

This will create src/components/ModelViewer.jsx and src/components/ModelViewer.css.