add-new-component

Guide developers to create reusable Vue components with types, docs, and test pages.

Updated Sep 11, 2025
One-click install
npx skills add https://github.com/ruan-cat/11comm-app --skill add-new-component
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-new-component
Source: https://github.com/ruan-cat/11comm-app/tree/main/.claude/skills/add-new-component
Command: npx skills add https://github.com/ruan-cat/11comm-app --skill add-new-component

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes uncertainty and repetitive manual steps when adding standardized, reusable components to the project's common components folder by providing a clear checklist, file templates, naming rules, TypeScript typing guidance, documentation format, and required test page conventions.

Core Features & Use Cases

  • Standardized scaffolding: Defines folder layout with index.vue, types.ts, and index.md and enforces kebab-case folder names for predictable imports and auto-registration.
  • TypeScript and props guidance: Prescribes exporting Props interfaces with JSDoc, using withDefaults and defineProps in script setup, and naming conventions for types.
  • Documentation and test pages: Requires a usage document and a dedicated test page under src/pages/test-use to demonstrate all props and scenarios.
  • Real-world use: Ideal for creating cross-page UI elements such as form-section-title, activity-actions, activity-info, and z-paging-loading that must be typed, documented, and demoed.

Quick Start

Use the add-new-component skill to scaffold a new reusable component named form-section-title in src/components/common with a types file, an index.md usage document, and a test page under src/pages/test-use.

Frequently Asked Questions about add-new-component

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

FAQPage Schema
How do I scaffold a reusable Vue3 component with TypeScript in uniapp?

Scaffold a reusable Vue3 component by generating a kebab-case folder in src/components/common containing index.vue, types.ts, and index.md, then export Props interfaces with JSDoc and use withDefaults with defineProps in script setup.

What folder structure do I need for common Vue components in a uniapp project?

A common Vue component folder structure requires a kebab-case directory in src/components/common with index.vue, types.ts, and index.md. You must also create a dedicated test page under src/pages/test-use to demonstrate all props and scenarios.

Does this component scaffolding approach work with Vue3 and uniapp projects?

Yes, this component scaffolding approach is designed specifically for Vue3 and uniapp TypeScript projects. It enforces predictable imports and auto-registration by applying a consistent folder layout and naming rules for common UI components.

How do I document and test reusable UI components in a Vue3 TypeScript project?

Document and test reusable UI components by creating an index.md usage document inside the component folder and building a dedicated test page under src/pages/test-use to demonstrate all props and usage scenarios for the component.

What naming conventions are required when adding a new common Vue component?

Adding a new common Vue component requires kebab-case naming for the folder to ensure predictable imports and auto-registration. You must also export Props interfaces with JSDoc and follow defined TypeScript type naming conventions.