92foodlimited-buildercodex/builder-codex/writing-feature-specs
Claude Code and agent skill by 92foodlimited-buildercodex/builder-codex
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Apply spec-driven development to AI coding tasks by creating structured SPEC.md, PLAN.md, and TASKS.md artifacts before implementation, preventing AI drift and reducing rework. Use this skill at the start of any feature larger than a single function, when an AI agent has begun drifting from intent, when requirements are ambiguous, or when handing work off between AI sessions or between AI tools.
Install
npx vskill@latest install 92foodlimited-buildercodex/builder-codex/writing-feature-specsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as 92foodlimited-buildercodex/builder-codex/writing-feature-specs.
Writing Feature Specs
Codex reference: P-29 (Spec → Plan → Tasks Artifacts)Based on: GitHub Spec Kit, AWS Kiro, OpenSpec 3-phase, BuildBetter BB-SkillsWhen to load: เริ่ม feature > 1 function, AI drift จาก intent, requirement ไม่ชัด, handoff ระหว่าง session/tool
หลักการ
ปัญหาที่ spec-driven แก้: AI สร้างโค้ดที่ "ดูเหมือนถูก" แต่ drift จาก intent — ไม่มี artifact ที่จับต้องได้ระหว่างทาง → ไม่มีอะไรเทียบว่า "ทำตรงที่ตั้งใจ" ไหม
Solution: แยกออกเป็น artifacts ที่ commit ลง Git ก่อนเขียนโค้ด
"Specs are the new code. The code is just the output."
Workflow (สำหรับ solo builder — simplified จาก GitHub Spec Kit)
ไม่ต้องทำครบทุกขั้นทุกครั้ง — เริ่มจาก SPEC + TASKS อย่างน้อย ก็พอลด drift แล้ว
Folder Structure
Naming: {ID}-{kebab-case-description} — ID เป็น sequential หรือ ticket number
SPEC.md Template
PLAN.md Template
TASKS.md Template
REVIEW.md Template
Clarify Phase Questions (ก่อนเขียน Plan)
ถามให้ครบจน answer ทุกข้อ:
ถ้ายังไม่ clarify → อย่าเขียน Plan
Analyze Phase (ก่อน Implement)
When NOT to Use Spec-Driven
Spec-driven มี overhead — ใช้กับ task ที่คุ้ม:
✅ ใช้:
- Feature ใหม่ที่ touch หลายไฟล์
- Refactor ที่มี risk
- Integration ที่ซับซ้อน
- Feature ที่ต้อง handoff
- Anything ที่กระทบ user data (PDPA)
❌ ไม่ใช้ (overhead เกินคุณค่า):
- Typo fix
- Single function ที่ self-contained
- Experimental spike (เขียนเพื่อ learn, ไม่ ship)
- Hotfix ที่ urgent (ทำก่อน, doc ทีหลัง)
Anti-patterns
- ❌ เขียน SPEC.md หลัง implement (ไม่ใช่ spec แล้ว — เป็น doc)
- ❌ SPEC ที่ vague ("good UX", "fast")
- ❌ Acceptance criteria ที่ไม่ testable
- ❌ Plan ที่ไม่ระบุ files
- ❌ Tasks ที่ไม่ atomic (1 task = 1 commit ได้)
- ❌ Skip CLARIFY phase แล้วเจอ ambiguity ตอน implement
- ❌ ไม่ update spec เมื่อ requirement เปลี่ยน
Multi-Session Handoff
เมื่อ session ใหม่ (Claude/Cursor instance ใหม่) มาทำ feature ต่อ:
ถ้าครบ — agent ใหม่ resume ได้ทันที โดยไม่ต้อง re-explain
Integration with Compounding Loop
| Loop phase | Spec artifact | |
|---|---|---|
| Plan | SPEC.md + PLAN.md + TASKS.md | |
| Work | Implementation + tick TASKS | |
| Review | REVIEW.md | |
| Compound | CAPTURE_LOG entry + promote pattern to Codex |
Quick Decision
Spec-Driven กับ Vibe Coding
Spec-driven ไม่ใช่ "anti-vibe" — มันคือ "vibe ด้วย guardrails"
- Vibe coding pure = describe → AI generate (ไม่มี spec) = drift
- Spec-driven vibe = describe → AI write spec → review → AI implement = aligned
Token cost:
- Pure vibe: ดูเหมือนถูก, จ่ายตอน rework
- Spec-driven: จ่าย upfront, แต่ลด rework 60-80%
ROI โดยเฉลี่ย: spec-driven ประหยัด 30-50% token + เวลา ตามรายงาน 2026
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/writing-feature-specs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/92foodlimited-buildercodex/builder-codex/writing-feature-specs)