coding-standardslisted
Install: claude install-skill witchwasin/Axiom-PMO
# PMO Skill: Coding Standards
> **Purpose:** สร้าง Coding Standards Document ให้แต่ละ project
> Dev ทุกคนใช้ convention เดียวกัน ลด conflict, ลด review time
---
## 1. When to Use
- เมื่อเริ่ม project ใหม่ที่มี Dev team
- เมื่อสร้าง Code Scaffold (auto-load คู่กัน)
- เมื่อ Dev ถามว่า "ตั้งชื่อยังไง" หรือ "ใช้ pattern ไหน"
---
## 2. Standards Document Template
สร้างไฟล์ `{ProjectFolder}/Scaffold/CODING-STANDARDS.md`:
### 2.1 Naming Convention
| Item | Convention | Example |
|------|-----------|---------|
| **Files** | kebab-case | `user-service.ts`, `order-model.py` |
| **Classes** | PascalCase | `UserService`, `OrderModel` |
| **Functions** | camelCase (JS/TS) / snake_case (Python/Go) | `getUser()`, `get_user()` |
| **Constants** | UPPER_SNAKE | `MAX_RETRY`, `API_BASE_URL` |
| **DB Tables** | snake_case plural | `users`, `order_items` |
| **DB Columns** | snake_case | `created_at`, `user_id` |
| **API Endpoints** | kebab-case plural | `/api/v1/order-items` |
| **Components** | PascalCase | `UserProfile.tsx`, `OrderList.vue` |
### 2.2 Folder Structure Pattern
| Pattern | When to Use |
|---------|------------|
| **Feature-based** | Project > 10 modules, ทีม > 3 คน |
| **Layer-based** | Project < 10 modules, ทีม <= 3 คน |
| **Domain-driven** | Complex business logic, multiple bounded contexts |
### 2.3 Code Style Rules
| Rule | Standard |
|------|----------|
| **Indentation** | 2 spaces (JS/TS) / 4 spaces (Python) |
| **Max line length** | 100 characters |
| **Import