From spec-writer
Use when creating, updating, or maintaining structured requirement/screen specification documents for a software project — especially when the spec will feed an external test-spec generation system AND/OR be used to plan and code. Produces a two-tier spec (master requirements + per-screen detail) with a traceability index, in the style of a Japanese/Vietnamese requirements-definition + screen-spec workflow. Orchestrates the pipeline Q&A → spec → plan → code, and can stop at the spec stage. Trigger phrases: "tạo spec", "tạo tài liệu yêu cầu", "spec màn hình", "update spec", "requirements document", "screen spec", "đặc tả".
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-writer:spec-writerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Tạo và duy trì bộ tài liệu đặc tả **2 tầng** cho một dự án phần mềm:
Tạo và duy trì bộ tài liệu đặc tả 2 tầng cho một dự án phần mềm:
01_requirements.md) — Tài liệu Định nghĩa Yêu cầu cấp cao.screens/F-NNN_*.md) — Đặc tả chi tiết từng màn hình/chức năng.00_index.md) — nguồn sự thật về quan hệ F-NNN ↔ màn hình ↔ NFR ↔ file.Mục tiêu: tài liệu dùng làm đầu vào cho hệ thống tạo test spec bên ngoài, đồng thời dùng được để lập plan và code.
Ngôn ngữ mặc định: tiếng Việt là chính; field name/thuật ngữ kỹ thuật và message UI để tiếng Anh (theo mẫu).
Write/Edit tool. TUYỆT ĐỐI KHÔNG in/dán toàn bộ nội dung tài liệu ra chat (file dài → chat phình, lag).F-NNN, số màn, NFR chính). Người dùng muốn xem thì mở file.01_requirements.md với F-001~F-003, xem & cho ý kiến?") — không lặp lại nội dung file trong chat.spec-writer chèn bước spec có cấu trúc vào pipeline superpowers, dừng được ở bất kỳ stage:
| Stage | Việc | Cơ chế |
|---|---|---|
| 1. Hỏi/đáp | Khai thác yêu cầu | Gọi superpowers:brainstorming nếu có; khi brainstorming định gọi writing-plans, trả quyền lại đây; KHÔNG sinh design doc riêng của brainstorming. Nếu chưa cài superpowers → tự hỏi-đáp (xem Fallback dưới) rồi sang Stage 2 |
| 2. Spec | Sinh docs/spec/ (spec tổng + spec con màn hình) | Lõi skill — deliverable mặc định, dừng được ở đây |
| 3. DB | Thiết kế CSDL từ spec | Gọi skill db-designer (tùy chọn) — sinh docs/spec/database/, cập nhật truy vết |
| 4. API | Thiết kế API từ spec + DB | Gọi skill api-designer (tùy chọn) — sinh docs/spec/api/, cập nhật truy vết |
| 4.5. Test | Sinh chiến lược & test case từ spec/DB/API (tùy chọn) | Xem references/test-strategy.md — map mọi test về F-NNN/API-ID/NFR |
| 5. Plan | Lập kế hoạch code | Gọi superpowers:writing-plans, dùng spec/DB/API làm đầu vào (tùy chọn) |
| 6. Code | Triển khai | Gọi executing-plans/subagent-driven-development (tùy chọn) |
Hết Stage 2 LUÔN hỏi người dùng: "Dừng ở spec, hay tiếp tục sang DB (Stage 3, skill db-designer)?" — dừng được ở bất kỳ stage.
Truy vết xuyên pipeline:
db-designervàapi-designerđọc & cập nhật chung00_index.md. Trong pipeline này màn hình =F-NNN(không tạo hệSCR-IDsong song). Mapping đầy đủ:F-NNN ↔ màn ↔ bảng DB ↔ API-ID— để hệ tạo test spec / code join lại được.
superpowers:brainstorming. Khi brainstorming tới bước viết design doc / writing-plans → dừng nó lại, quay về đây.docs/spec/.docs/spec/ (xem bên dưới). Sinh 01_requirements.md theo references/master-spec-template.md, gán ID F-NNN, NFR-X-NNN, ACT-NNN (theo references/id-and-style-rules.md).conventions.md theo references/conventions-template.md.00_index.md theo references/traceability-index-template.md.db-designer) không.00_index.md + 01_requirements.md để lấy ngữ cảnh, ID đã có, NFR liên quan.screens/F-NNN_<slug>.md theo references/screen-spec-template.md — gồm Gherkin/Expected result (§5A.1), State Transition nếu có trạng thái; thiết kế trực quan dùng Claude design (https://claude.ai/design), KHÔNG Figma; điền mục Responsive & Accessibility (bám NFR-U).Thuộc: F-NNN, NFR liên quan.00_index.md thêm dòng truy vết.design/design-prompt.md (tạo theo references/design-prompt-template.md nếu chưa có) — thêm/sửa mục F-NNN khớp bảng Items. Đây là file prompt DUY NHẤT để dán vào Claude design.00_index.md để xác định MỌI file bị ảnh hưởng (spec tổng + các spec con + NFR + transition).design/design-prompt.md nếu màn bị đổi).00_index.md (trạng thái, quan hệ mới nếu có).references/cross-doc-checks.md (spec ↔ DB ↔ API); báo các điểm CRITICAL/WARNING trước khi kết thúc.conventions.md hoặc mục NFR trong 01_requirements.md.docs/spec/
├── 00_index.md # Traceability index — nguồn sự thật
├── 01_requirements.md # Spec tổng (master)
├── conventions.md # Quy ước chung
├── design/
│ └── design-prompt.md # 1 file prompt DUY NHẤT cấp cho Claude design (mọi màn)
└── screens/
└── F-NNN_<slug>.md # Spec con
Tên file spec con: F-NNN_<slug>.md khớp ID trong index.
references/master-spec-template.md — khuôn spec tổng.references/screen-spec-template.md — khuôn spec con (có Gherkin/Expected result, State Transition).references/conventions-template.md — quy ước data, status dict, search/filter/pagination, State Transition Matrix, chuẩn Label, chuẩn Message.references/traceability-index-template.md — khuôn index.references/id-and-style-rules.md — quy tắc ID, song ngữ, Gherkin, RBAC matrix, changelog & version.references/design-prompt-template.md — khuôn file prompt DUY NHẤT cho Claude design (design/design-prompt.md).references/cross-doc-checks.md — kiểm tra toàn vẹn chéo spec ↔ DB ↔ API (dùng ở Nhánh 3 / review).references/test-strategy.md — chiến lược test & nguồn sinh test từ spec (Stage Test, tùy chọn).TBD/TODO/ô trống vô nghĩa (trừ phần cố ý đánh dấu Cần xác nhận).F-NNN tương ứng trong 00_index.md; mọi F-NNN có dòng index.conventions.md, có Lịch sử thay đổi + version.npx claudepluginhub lvh149/create-document-skill --plugin spec-writerSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.