一键导入
file-organization
Universal file and folder organization rules — naming conventions, refactoring, and when to split files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Universal file and folder organization rules — naming conventions, refactoring, and when to split files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Backend API coding standards — server file structure, response envelope, error handling, import rules, and route organization.
Frontend React coding standards — component structure, hooks, Panda CSS styling, state management, usecase extraction, react-query usage, sub-component barrel imports, and strict import ordering.
Master index for project coding standards. Load this to get a summary; load individual skills below for detailed rules.
| name | file-organization |
| description | Universal file and folder organization rules — naming conventions, refactoring, and when to split files. |
| What | Case | Example |
|---|---|---|
| Folders | kebab-case | my-component/, use-auth/ |
| React components | PascalCase | MyComponent.tsx |
| Hooks | kebab-case | use-some-feature.ts |
| Utility files | kebab-case | format-date.ts |
| Style files | kebab-case | styles.ts |
| Type files | kebab-case | types.ts |
A file that starts as a single file (e.g. whatsapp.ts) MUST be refactored into a folder when it gains any of these:
types.ts)utils.ts)usecases/)styles.ts)[name].ts + index.ts)/whatsapp
index.ts # Main export / router setup
whatsapp.ts # Core implementation / route handlers
types.ts # Type and interface definitions
utils.ts # Local helper/utility functions
usecases/ # Business logic (if applicable)
use-case-name.ts
styles.ts # Panda CSS styles (frontend only)
This rule applies to all contexts:
server/api/)src/components/)src/hooks/)src/utils/)src/repositories/)src/models/)index.ts that exports the main functionalitytypes.ts, utils.ts, etc.)Prevent files from becoming overly complex. Maintain clear separation of concerns. When a file grows beyond its original purpose, split it immediately — don't wait for it to become unmanageable.