一键导入
code-scaffold
Generate โครงสร้างไฟล์ + API stubs + DB migration + test stubs จาก SystemFlow + Dev Handoff Package ไม่ใช่ full code แต่ให้ Dev มี starting point
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate โครงสร้างไฟล์ + API stubs + DB migration + test stubs จาก SystemFlow + Dev Handoff Package ไม่ใช่ full code แต่ให้ Dev มี starting point
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Pre/Post execution validation + Phase Gate enforcement — ป้องกันการข้าม step, auto-validate output, ให้คะแนน quality score
สแกน code ใน Scaffold/ ด้วย 53 security rules (6 หมวด) — secrets, permissions, injection, AI-specific, config, dependencies — ก่อน deploy หรือหลัง Dev report
Coordinate PM/Dev/QA agents แบบ Pipeline Pattern — auto-route งานตาม role, ส่งต่ออัตโนมัติเมื่อ status เปลี่ยน, track progress ทุก handoff
Create color-coded teaching scripts / presenter talking-point documents (.md) that serve as a "live reading book" for speakers. The output is a markdown file where each color tells the presenter what to do: blue = speak this line, red = pronunciation guide, dark blue = slide header, black = stage direction & audience engagement, yellow box = terminology. Use this skill whenever the user mentions: teaching script, talking points, presenter script, key talking point, speaker notes, lecture script, training script, presentation script, สคริปต์การสอน, สคริปต์วิทยากร, คำพูดที่ต้องอ่าน, หนังสือสำหรับพูด, or any request to create a document that guides a speaker through a slide deck with exact words to say, pronunciation help, and stage directions. Also trigger when the user uploads a PowerPoint (.pptx) and asks to write a script, narration, or talking points for it.
Use for QA evidence, release readiness, rollback review, and close-out decisions.
Use for build completion evidence, code review readiness, and ready-for-QA checks.
| name | Code Scaffold |
| description | Generate โครงสร้างไฟล์ + API stubs + DB migration + test stubs จาก SystemFlow + Dev Handoff Package ไม่ใช่ full code แต่ให้ Dev มี starting point |
Purpose: แปลง Dev Handoff Package เป็น boilerplate code ที่ Dev เอาไปต่อได้ทันที ไม่ใช่ full implementation แต่ให้โครงสร้างที่ถูกต้องตั้งแต่เริ่ม
ก่อนรัน scaffold ต้องมี:
pmo-dev-handoff) — Data Model, API Spec, Component Inventorypmo-coding-standards ถ้ามี) — naming convention, folder structure{project-code}-scaffold/
├── README.md <- Setup instructions
├── docker-compose.yml <- Local dev environment
├── .env.example <- Environment variables template
│
├── backend/
│ ├── src/
│ │ ├── models/ <- DB models from Data Model spec
│ │ │ └── {entity}.{ext} <- One file per entity
│ │ ├── routes/ <- API routes from API Spec
│ │ │ └── {resource}.{ext} <- One file per resource
│ │ ├── services/ <- Business logic stubs
│ │ │ └── {module}.{ext} <- One file per module
│ │ ├── middleware/ <- Auth, validation, error handling
│ │ └── config/ <- DB config, app config
│ ├── tests/
│ │ ├── unit/ <- Unit test stubs
│ │ └── integration/ <- Integration test stubs
│ └── migrations/ <- DB migration files
│
├── frontend/
│ ├── src/
│ │ ├── pages/ <- Pages from Component Inventory
│ │ ├── components/ <- Shared components
│ │ ├── hooks/ <- Custom hooks
│ │ ├── services/ <- API client
│ │ └── types/ <- TypeScript interfaces
│ └── tests/
│
└── docs/
├── API.md <- API documentation (from spec)
└── DB-SCHEMA.md <- Database schema (from Data Model)
| Stack | Backend | Frontend | DB | ORM |
|---|---|---|---|---|
| Python + React | FastAPI / Django | Next.js / React | PostgreSQL | SQLAlchemy / Prisma |
| Node + React | Express / NestJS | Next.js / React | PostgreSQL | Prisma / TypeORM |
| Go + React | Gin / Echo | Next.js / React | PostgreSQL | GORM |
| Custom | ถาม user | ถาม user | ถาม user | ถาม user |
สำหรับแต่ละ entity ใน Data Model:
ตัวอย่าง (Python/SQLAlchemy):
# models/user.py
# Generated from Dev Handoff: P07-PROJECT Data Model
# TODO: Add validation rules per SystemFlow Module 09
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
email = Column(String(255), unique=True, nullable=False)
role = Column(String(50), nullable=False) # Ref: MOM#1 - Role types
status = Column(String(20), default="active")
created_at = Column(DateTime, default=func.now())
# Relationships
# TODO: Define based on SystemFlow cross-module dependencies
สำหรับแต่ละ endpoint ใน API Spec:
สำหรับแต่ละ page ใน Component Inventory:
สำหรับแต่ละ module:
ทุกไฟล์ที่ generate ต้องมี header comment:
// Generated by PMO-Template Code Scaffold
// Project: {project-code}
// Source: Dev Handoff Package v{date}
// Module: {module-name} [Ref: MOM#{X}]
// TODO items reference SystemFlow steps
Scaffold output บันทึกใน: {ProjectFolder}/Scaffold/
เป็น AI-Managed folder (เพิ่มใหม่ใน v2.0.0)
| Artifact | รายละเอียด |
|---|---|
| Migration | Initial schema จาก Data Model (Prisma/Alembic/GORM/TypeORM), up + down |
| Seed | Sample data ตาม test cases, แยก dev/staging |
| Analyze | Index recommendations จาก relationships, TODO สำหรับ query optimize |
| Pattern | Stub ที่สร้าง |
|---|---|
| Auth | JWT + refresh token + middleware |
| Provider abstraction (SendGrid/SES/Resend) | |
| File upload | Multipart + storage abstraction |
| Queue/Job | Async job processor (Bull/Celery) |
| Cache | Redis/Memcached abstraction |
| Logger | Structured logging (Winston/Loguru/Zap) |
pmo-coding-standards (รวม language + security rules)pmo-security-scan quick check (v2.1.0)