AgentSkillsCN

file-organization

面向可扩展前端代码库的文件与目录组织方式。关键词:文件结构、文件夹结构、功能模块文件夹、组织架构。

SKILL.md
--- frontmatter
name: file-organization
description: "File and directory organization for scalable frontend codebases. Keywords: file structure, folder structure, feature folders, organization."

File Organization

This skill describes a feature-oriented folder structure that scales.


Recommended structure

text
src/
  features/
    <feature>/
      api/
      components/
      hooks/
      helpers/
      types/
      index.ts
  components/        # truly reusable UI components
  routes/            # routing entries (if using file-based routing)
  lib/               # shared utilities (api client, monitoring, etc.)

Rules:

  • Feature folders own domain-specific UI and data logic.
  • Shared components/ should be generic and reusable across features.
  • Keep public exports in feature index.ts small and intentional.