AgentSkillsCN

generate-feature

根据现有代码库的模式,生成符合规范的新功能、组件、服务与模块。

SKILL.md
--- frontmatter
name: generate-feature
description: "Generate new features, components, services, and modules that follow existing codebase patterns."

Generate Feature

Create new code following existing patterns in the codebase.

Available Generation Types

TypeDescription
componentUI component with tests
serviceBusiness logic service
apiAPI endpoint with route, controller, service
modelData model/entity
hookReact custom hook
testTest file for existing code

Quick Reference

User RequestAction
"Create a Button component"Generate component + test
"Add a UserService"Generate service + test
"New /products endpoint"Generate API route stack
"Add Order model"Generate model + validation
"Create useAuth hook"Generate hook + test

Agent

Use subagent_type: feature-generator with a detailed prompt including:

  • What type to generate (component, service, etc.)
  • Name for the feature
  • Specific requirements or behavior
  • Integration points if known