AGENT SKILL
项目设计文档编写
architecture.write_design
在编写代码之前,根据项目的 PRD(产品需求文档)编写项目的设计文档。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 155
- Forks
- 170
01 前言 Front Matter
- model
- opus
- description
- Write the design docs of a project from its PRD, before the code
03 SKILL.md 正文
Goal
- Given a PRD (Product Requirement Document), write
docs/design.architecture.mdand onedocs/design.<component>.mdper component - Design before the code exists: do not write code
Input
<PRD>: the PRD file, e.g.,docs/prd.md<DOCS_DIR>: thedocs/dir of the project, optional- If missing, use the dir of
<PRD>
- If missing, use the dir of
Workflow
Read the Inputs
- Read
<PRD>and the existing docs in<DOCS_DIR> - Read the existing code and docs of the repo that the design must fit
- Read
.claude/skills/architecture.rules.mdand.claude/skills/C4.rules.md
Ask If the PRD Is Unclear
- If a requirement is ambiguous or two requirements conflict:
- Do not guess
- Ask the user for clarification
- Wait for the answers
Split Into Components
- Propose the components, each with one responsibility
- Respect the layering rules in
.claude/skills/architecture.rules.md - Show the proposal to the user and wait for confirmation before writing the docs
Write the Overview
- Create
<DOCS_DIR>/design.architecture.md - Follow the template
.claude/templates/project_design.template.md - Show the context and the containers with a PlantUML C4 diagram, per
.claude/skills/C4.rules.md - Map each requirement
R<N>of the PRD to the component that satisfies it- Link each
R<N>to its H3 in the PRD, per.claude/skills/project.rules.mdsection "Link Requirements and Decisions"
- Link each
Write One Doc per Component
- Create
<DOCS_DIR>/design.<component>.mdfor each component - Follow the rules in
.claude/skills/project.rules.mdsection "Write a Design Doc" - Follow the template
.claude/templates/project_design.template.md - Distinguish facts about existing code from decisions made in the design
- Record each non-obvious choice in
<DOCS_DIR>/decisions.md, following the template.claude/templates/project_decisions.template.md- Create the file if it does not exist
- Link each decision from the design docs that follow it, per
.claude/skills/project.rules.mdsection "Link Requirements and Decisions"
Update the Index
- Add a row for each new doc to
<DOCS_DIR>/README.md, if the file exists
Conventions
- Follow
.claude/skills/project.rules.mdfor the docs of a project - Follow
.claude/skills/architecture.rules.mdfor layering and interfaces - Follow
.claude/skills/markdown.rules.mdand.claude/skills/text.rules.md
Constraints
- Do not implement any code
- Short snippets (a class interface, a schema, a function signature) are fine
- Do not use this skill to document a Python file that already exists: use
.claude/skills/readme.write_architecture/SKILL.md - Do not commit any change
Verification
- [ ] Every requirement of the PRD maps to a component
- [ ] Every component has one responsibility and one design doc
- [ ] The overview has a PlantUML C4 diagram
- [ ] No design doc has a Mermaid C4 diagram
- [ ] Every non-obvious choice is in
decisions.md - [ ] Every requirement id and decision id in a design doc is a link to its H3
- [ ] No design doc contains full implementation code
04 同仓库更多 Skills
Docker 文件同步与模板对齐
tutorial_in_60_mins.propagate_docker_changes
同步教程和课程项目的 Docker 文件,使其与 project_template 保持一致。
★ 155
Markdown 合并至 Jupyter Notebook
tutorial_in_60_mins.merge_markdown
将 Markdown 文件的内容合并到 Jupyter Notebook 中。
★ 155
60 分钟教程格式规范化
tutorial_in_60_mins.format
格式化目录,使其遵循「Learn X in 60 Minutes」(60 分钟学会 X)教程约定。
★ 155
60 分钟教程目录创建
tutorial_in_60_mins.create
按照「Learn X in 60 Minutes」(60 分钟学会 X)约定创建教程目录。
★ 155
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
★ 155
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage
★ 155