AgentSkillsCN

smart-file-structure

按照统一的 src 目录结构组织新功能与模块(如 app、components、lib、config、tests)。适用于创建新功能时,或当用户提出“新建模块”“添加功能”等需求时,亦可在项目初始化阶段使用。

SKILL.md
--- frontmatter
name: smart-file-structure
description: Organizes new features and modules into a consistent src layout (app, components, lib, config, tests). Use when creating new features, user says "create new module" or "add feature", or on project initialization.

Smart File Structure Organizer

When to Trigger

  • Creating new features
  • User says "create new module", "add feature"
  • Project initialization

What to Do

Propose or create structure following project conventions, e.g.:

code
src/
├── app/
│   ├── (auth)/ login, register
│   ├── (dashboard)/ [feature]
│   └── api/ [resource]/ [id]/
├── components/
│   ├── ui/
│   ├── features/
│   └── layouts/
├── lib/
│   ├── services/
│   ├── utils/
│   ├── hooks/
│   └── types/
├── config/
└── tests/ unit, integration, e2e

Auto-create where appropriate: README per feature, index.ts for exports, types.ts, constants.ts. Align with existing .cursorrules and docs (e.g. docs/ structure).