← スキル一覧に戻る

project-structure
by SammySnake-d
⭐ 0🍴 0📅 2026年1月4日
SKILL.md
name: project-structure description: 项目目录结构详解。Use when understanding project structure, creating new modules, or deciding where to place files. Triggers on: file placement questions, creating new features, directory organization.
Project Structure Guide
项目目录结构与文件组织规范。
Core Directories
| Directory | Purpose |
|---|---|
app/ | Routes, layouts, pages (App Router) |
components/ui/ | shadcn/ui primitives |
components/layout/ | Layout components |
components/common/ | Business components |
lib/services/ | API service layer |
lib/utils.ts | Utility functions |
types/ | Type declarations |
hooks/ | Custom hooks |
contexts/ | React contexts |
Route Groups
app/
├── (auth)/ # Login, register
├── (main)/ # Dashboard, settings
├── (marketing)/ # Landing, pricing
└── (admin)/ # Admin panel
Forbidden Directories
src/- Conflicts with App Routershared/- Usecomponents/commonhelpers/- Uselib/utilsservices/(root) - Must be inlib/services
File Naming
- Directories:
kebab-case(user-profile/) - Components:
kebab-case.tsx(user-card.tsx) - Services:
[name].service.ts - Types:
types.ts
Example: Add User Feature
app/(main)/users/
├── page.tsx
└── [id]/page.tsx
components/common/users/
├── user-table.tsx
└── user-filters.tsx
lib/services/user/
├── user.service.ts
├── types.ts
└── index.ts
Modularization Rules
| Condition | Action |
|---|---|
| Component > 150 lines | Split into subcomponents |
| Page > 200 lines | Extract to components |
| Repeated code 2+ times | Create reusable component |
| Sample data > 20 lines | Extract to data.ts |
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です