Token导航 LogoToken导航TokenDH.com
开发可写文件github未标认证来源可访问许可证需确认审计通过

system-design-doc系统设计文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

196

周安装

8

GitHub Stars

公开资料未说明

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:system-design-doc(系统设计文档)
来源仓库:https://github.com/mounchons/agentmarketplace
仓库路径:skills/system-design-doc
安装命令:
npx skills add https://github.com/mounchons/agentmarketplace --skill system-design-doc
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mounchons/agentmarketplace --skill system-design-doc

简介

system-design-doc 用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写,适合让 Agent 提炼结构、补齐章节或统一术语。

  • 适用于文档编写与内容整理场景,需保留项目已有事实和路径。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和维护状态。
  • 涉及对外文案时,应避免过度营销或夸大能力。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

System Design Document Skill

Response Language: Always respond to users in Thai (ภาษาไทย)

Skill for creating enterprise-grade standardized system design documents with Mermaid diagrams. Supports both creating new documents and reverse engineering from existing codebases, including Architecture patterns for Microservices, Event-driven, Clean Architecture, and DDD.


Commands Overview

CommandDescription
/create-design-docCreate a new system design document from requirements
/reverse-engineerCreate a document from an existing codebase
/create-diagramCreate a specific diagram type (ER, Flow, DFD, Sequence, etc.)
/edit-sectionEdit a specific section of the document
/validate-design-docValidate completeness and consistency
/import-planImport a document from an implementation plan or free-form design doc
/sync-with-mockupsSync entities and pages with ui-mockup
/sync-with-featuresSync APIs and entities with long-running
/validate-integrationValidate cross-references across all 3 plugins
/brainstorm-designInteractive brainstorming and Q&A session for system design
/system-design-docGeneral command (supports all modes)

Quick Start Examples

What you needExample command
Full document/create-design-doc สร้างเอกสารสำหรับระบบ HR
From Codebase/reverse-engineer วิเคราะห์ codebase นี้
ER Diagram/create-diagram ER Diagram สำหรับระบบจองห้องประชุม
ER from Code/reverse-engineer สร้าง ER Diagram จาก entities
Flow Diagram/create-diagram Flow Diagram สำหรับกระบวนการอนุมัติลา
Data Dictionary/create-diagram Data Dictionary สำหรับตาราง employees
DFD/create-diagram DFD Level 1 สำหรับระบบสั่งซื้อ
Sitemap/create-diagram Sitemap สำหรับเว็บ E-commerce
Sequence Diagram/create-diagram Sequence Diagram สำหรับ Login process
Edit Section/edit-section ER Diagram - เพิ่ม entity Payment
Validate document/validate-design-doc

Workflow Diagrams

Workflow 1: Create New Document from Requirements

flowchart TD
    A[Start] --> B{design_doc_list.json exists?}
    B -->|No| C[Create .design-docs/ and design_doc_list.json]
    B -->|Yes| D[Read project info]
    C --> D
    D --> E[Gather Requirements]
    E --> F[Define 10-Section Structure]
    F --> G[Design Data Model]
    G --> H[Create Diagrams]
    H --> I[Create Data Dictionary]
    I --> J[Generate .md file]
    J --> K[Update design_doc_list.json]
    K --> L[Validate]
    L --> M[End]

Workflow 2: Reverse Engineering from Codebase

flowchart TD
    A[Start] --> B[Scan Project Structure]
    B --> C{Technology identified?}
    C -->|Yes| D[Analyze by Framework]
    C -->|No| E[Ask User for info]
    E --> D
    D --> F[Analyze Models/Entities]
    F --> G[Analyze Controllers/Routes]
    G --> H[Analyze Services/Logic]
    H --> I[Extract data and convert to Diagrams]
    I --> J[Create document from Template]
    J --> K[Validate against Code]
    K --> L{Match?}
    L -->|Yes| M[Save file]
    L -->|No| N[Fix and Re-validate]
    N --> K
    M --> O[End]

Workflow 3: Create Specific Diagram

flowchart TD
    A[Start] --> B{Diagram type specified?}
    B -->|ER| C[Use ER Diagram Pattern]
    B -->|Flow| D[Use Flow Diagram Pattern]
    B -->|DFD| E[Use DFD Pattern]
    B -->|Sequence| F[Use Sequence Pattern]
    B -->|Sitemap| G[Use Sitemap Pattern]
    B -->|State| H[Use State Diagram Pattern]
    B -->|Architecture| I[Use Architecture Pattern]
    C --> J[Gather Entities and Relationships]
    D --> K[Gather Steps and Decisions]
    E --> L[Gather Processes and Data Stores]
    F --> M[Gather Participants and Messages]
    G --> N[Gather Pages and Hierarchy]
    H --> O[Gather States and Transitions]
    I --> P[Select Architecture Pattern]
    J --> Q[Create Mermaid Diagram]
    K --> Q
    L --> Q
    M --> Q
    N --> Q
    O --> Q
    P --> Q
    Q --> R[Validate Syntax]
    R --> S[Output]

Workflow 4: Integration with Other Skills

flowchart LR
    subgraph DesignPhase["Design Phase"]
        SD[system-design-doc]
    end

    subgraph MockupPhase["Mockup Phase"]
        UM[ui-mockup]
    end

    subgraph DevPhase["Development Phase"]
        LR[long-running]
        DN[dotnet-dev]
    end

    SD -->|Sitemap, Entities| UM
    SD -->|Data Model, APIs| LR
    UM -->|Component specs| LR
    SD -->|.NET specific| DN
    LR -->|Feature tracking| SD

Document Structure (10 Sections)

The system design document consists of 10 main sections:

#SectionDescriptionRequired Diagrams
1Introduction & OverviewProject info, objectives, scope, StakeholdersHigh-Level Architecture
2System RequirementsFR, NFR, Business Rules, Constraints-
3Module OverviewList of modules, dependenciesModule Dependency Diagram
4Data ModelEntity overview, relationshipsClass Diagram (optional)
5Data Flow DiagramData movement, processes, storesDFD Level 0, 1, 2
6Flow DiagramsBusiness processes, workflowsFlowcharts
7ER DiagramEntity relationships, cardinalityER Diagram
8Data DictionaryTable definitions, columns, constraints-
9SitemapPage hierarchy, navigationSitemap Diagram
10User Roles & PermissionsRoles, permission matrix, access rules-

Diagram Types Supported

Diagram TypeMermaid SyntaxUse Case
ER DiagramerDiagramEntity relationships, database design
Flow Diagramflowchart TD/LRBusiness processes, approval workflows
DFDflowchart + subgraphsData flow between systems
Sequence DiagramsequenceDiagramAPI calls, system interactions
Sitemapflowchart TDPage structure, navigation
State DiagramstateDiagram-v2Status transitions, lifecycle
Class DiagramclassDiagramData model, OOP structure
Architectureflowchart + subgraphsSystem architecture, microservices

Architecture Patterns

Supported Patterns

CategoryPatterns
MicroservicesService Boundary, API Gateway, Service Mesh, Database per Service
Event-drivenEvent Sourcing, CQRS, Saga (Choreography/Orchestration), Message Broker
Clean ArchitectureLayer Diagram, Dependency Flow, Use Case Flow
DDDBounded Context, Aggregate, Domain Events, Context Mapping

When to Use

PatternUse When
MicroservicesLarge team, independent deployment needs
Event-DrivenLoose coupling, async processing needed
CQRSDifferent read/write patterns
Event SourcingFull audit history required
Clean ArchitectureLong-lived apps, testability priority
DDDComplex domain logic

Technology Support

Supported Frameworks for Reverse Engineering

TechnologyDetection FilesEntities LocationRoutes Location
.NET Core*.csproj, *.slnModels/, Entities/Controllers/
Node.js/Expresspackage.jsonmodels/routes/
Node.js/Prismapackage.json, schema.prismaprisma/schema.prismaroutes/
Python/Djangorequirements.txt*/models.py*/urls.py
Laravelcomposer.jsonapp/Models/routes/web.php
Java/Springpom.xml, build.gradle**/entity/*.java**/controller/
Gogo.modmodels/handlers/
Ruby/RailsGemfileapp/models/config/routes.rb

Legacy Support

TechnologyFiles to Analyze
ASP.NET WebForms*.aspx, App_Code/, Web.config
Classic ASP*.asp, includes/

⚠️ CRITICAL RULES (MUST FOLLOW)

Section Completeness

  1. ALL 10 sections are mandatory — Introduction, Requirements, Modules, Data Model, DFD, Flow Diagrams, ER Diagram, Data Dictionary, Sitemap, User Roles & Permissions
  2. No abbreviation — every section must have full content, not summaries or placeholders
  3. No placeholder text — "[TBD]", "[TODO]", "will be added later" is forbidden

Diagram Rules

  1. Validate Mermaid syntax — every diagram must render without errors
  2. Valid entity names — use PascalCase or snake_case only (no hyphens, no spaces in identifiers)
  3. Close all subgraphs — every subgraph must have a matching end

Consistency Rules

  1. ER ↔ Data Dictionary — every entity in ER Diagram must have a matching table in Data Dictionary, and vice versa
  2. DFD Level 0 ↔ Level 1 — all processes in Level 0 must be decomposed in Level 1
  3. Sitemap ↔ User Roles — every page in Sitemap must have access rules defined in User Roles section

Quality Rules

  1. Unique FR IDs — every Functional Requirement must have a unique ID (FR-001, FR-002, etc.)
  2. PK required — every table in Data Dictionary must have a Primary Key defined
  3. FK valid — every Foreign Key must reference an existing table and column
  4. Permission matrix complete — every role must have permissions defined for every module/page

Cross-Validation Rules (v1.5.0 — from audit findings)

Background: Audit found 8 types of inconsistencies: ER tables not in DD, DD tables not in DDL, section numbering gaps, FK type mismatches, and stale ER diagrams after schema changes.
  1. Section numbering continuous — DD section numbers (e.g., 8.1, 8.2,...) must be sequential with no gaps
  2. Table count declared = actual — if summary claims "N tables", verify actual DD section count matches
  3. ER ↔ DD bidirectional — every table in ER must have a DD section AND every DD section must appear in ER
  4. DD ↔ DDL sync — if DDL files exist, every CREATE TABLE must have a DD section and vice versa
  5. FK column type consistency — if DD says column_id FK → other_table, verify:

- The FK column type matches the PK type of the referenced table - If ER shows FK relationship but DD shows VARCHAR, flag as inconsistency

  1. API ↔ DD cross-reference — entities referenced in API docs must have DD sections
  2. ER auto-update rule — when DD is edited (add/remove/rename table), ER diagram MUST be updated in the same edit session

Living Document Rules (v1.5.0)

  1. ER diagrams are living documents — NOT one-time creations. When DD changes, ER must update.
  2. Schema redesign tracking — when a table is redesigned (e.g., FK → VARCHAR, 4 tables → 2 tables consolidated), the ER diagram must reflect the current design, not the original design
  3. Post-edit consistency report — after any edit to DD or ER, generate a brief consistency check: Tables Summary: - DD sections: N - ER unique tables: M - DDL CREATE TABLE: P (if DDL exists) - Mismatches: [list or "none"]

🔍 Self-Check Checklist (MANDATORY before submitting output)

Before completing the design document, verify EVERY item:

  • All 10 sections present with full content?
  • All Mermaid diagrams render without errors?
  • ER Diagram entities match Data Dictionary tables? (bidirectional check)
  • DD section numbers are sequential with no gaps? (v1.5.0)
  • Declared table count matches actual DD section count? (v1.5.0)
  • Every FK column type matches referenced table's PK type? (v1.5.0)
  • DDL tables match DD tables? (if DDL exists) (v1.5.0)
  • API-referenced entities have DD sections? (v1.5.0)
  • DFD Level 0 processes match Level 1 decomposition?
  • Sitemap pages match User Roles access rules?
  • All Functional Requirements have unique IDs?
  • All tables have Primary Keys defined?
  • All Foreign Keys reference valid tables?
  • No placeholder text remaining ("[TBD]", "[TODO]")?
  • Permission matrix is complete for all roles?

If ANY checkbox is unchecked, DO NOT submit. Fix the issue first.

❌ Output Rejection Criteria

Your output will be REJECTED and you must REDO the entire task if:

  • Any of the 10 sections is missing or contains only placeholder text
  • ER Diagram entities don't match Data Dictionary tables (mismatch in either direction)
  • DD section numbers have gaps (e.g., 8.31 jumps to 8.33)
  • Declared table count doesn't match actual count
  • FK column types don't match referenced PK types
  • ER diagram shows tables that were redesigned/consolidated but not updated
  • Mermaid diagrams have syntax errors
  • Placeholder text remains in any section
  • Permission matrix is incomplete

⚠️ Penalty

Violating these rules means the document is INVALID. You must redo the ENTIRE document from scratch. There are no partial passes — either ALL rules are followed or the output is REJECTED.


Consistency Checks

Changed SectionAlso Verify
ER DiagramData Dictionary (bidirectional), Data Model, DDL files
Data DictionaryER Diagram (bidirectional), DDL files, section numbering, table count
Flow DiagramsDFD, Sequence Diagrams
SitemapUser Roles (access)
User RolesSitemap (access rules)
ModulesFlow Diagrams, ER Diagram
API DocsData Dictionary (entity existence), ER Diagram
DDL FilesData Dictionary (sync), ER Diagram

Post-Edit Consistency Report (v1.5.0 — MANDATORY)

After editing any section, generate this report:

Consistency Report:
───────────────────────────────────
DD sections: N
ER unique tables: M
DDL CREATE TABLE: P (if exists)
Section numbering: sequential / gap at [X]
FK type mismatches: N
Mismatches: [list or "none"]
───────────────────────────────────

Integration with Other Skills

ui-mockup Integration

system-design-doc → ui-mockup

Data passed:
• Sitemap → mockup_list.json pages
• Entities → Form fields, Table columns
• User Roles → Access control per page
• Flow Diagrams → User journey reference

long-running Integration

system-design-doc → long-running

Data passed:
• Modules → Feature breakdown
• Data Model → Entity implementation
• APIs (Sequence) → Endpoint implementation
• Flow Diagrams → Business logic reference

dotnet-dev Integration

system-design-doc → dotnet-dev

Data passed:
• Entities → C# Model classes
• Relationships → EF Core configurations
• Data Dictionary → Database migrations
• APIs → Controller scaffolding

Output Files

Directory Structure

.design-docs/
├── design_doc_list.json          # Tracking file
├── system-design-[project].md    # Main document
├── diagrams/                     # (optional) Exported diagrams
│   ├── er-diagram.png
│   └── architecture.png
└── exports/                      # (optional) Exported formats
    ├── system-design.pdf
    └── system-design.docx

File Naming Convention

TypePatternExample
Main Documentsystem-design-[project-name].mdsystem-design-hr-management.md
Tracking Filedesign_doc_list.json-

Success Output Examples

Full Document

✅ สร้าง System Design Document สำเร็จ!

📁 File: .design-docs/system-design-hr-management.md

📊 Document Summary:
   • 10 sections completed
   • 7 diagrams (ER, 3 Flow, DFD L0+L1, Sitemap, 2 Sequence)
   • 12 tables in Data Dictionary
   • 4 User Roles defined

📈 Statistics:
   • Entities: 8
   • Relationships: 12
   • API Endpoints: 15
   • Pages: 20

💡 Next steps:
   • /ui-mockup → สร้าง UI Mockups จากเอกสาร
   • /validate-design-doc → ตรวจสอบความครบถ้วน

Single Diagram

✅ สร้าง ER Diagram สำเร็จ!

📊 ER Diagram:
   • Entities: 8
   • Relationships: 12

💡 Next steps:
   • /create-design-doc → สร้างเอกสารฉบับเต็ม
   • /create-diagram Data Dictionary → สร้าง DD

Resources

ResourceLocationDescription
Codebase Analysis Guidereferences/codebase-analysis.mdHow to analyze code for various frameworks
Mermaid Patternsreferences/mermaid-patterns.mdAll diagram patterns
Architecture Patternsreferences/architecture-patterns.mdMicroservices, Event-driven, Clean, DDD
Document Sectionsreferences/document-sections.mdDetails of each section
Data Dictionary Templatereferences/data-dictionary-template.mdData Dictionary format
Troubleshootingreferences/troubleshooting.mdCommon problem solutions
Full Templatetemplates/design-doc-template.mdFull document template
Tracking Filetemplates/design_doc_list.jsonTracking schema

Troubleshooting Quick Reference

ProblemSolution
Mermaid syntax errorSee references/troubleshooting.md Section 1
No models foundSearch with pattern *.entity.*, *.model.*
Missing relationshipsCheck DbContext, Fluent API, or migrations
ER ↔ DD mismatchCheck naming convention and column count
DFD inconsistencyCheck external entities and data stores

Version History

VersionDateChanges
1.5.02026-03-24Added cross-validation rules from audit: section numbering validation, ER↔DD bidirectional check, DD↔DDL sync, FK column type consistency, API↔DD cross-reference, table count validation, ER auto-update rule, living document enforcement, post-edit consistency report
1.4.0- Added CRITICAL RULES with self-check checklist, output rejection criteria, and penalty- Added /brainstorm-design command (8-phase interactive brainstorming)- Added hybrid brainstorm auto-detect in /create-design-doc- Translated all content to English for AI comprehension
1.3.02025-01-25Added /import-plan command, cross-plugin integration (/sync-with-mockups, /sync-with-features, /validate-integration), schema v2.1.0 with CRUD enabled/disabled + soft delete strategy
1.2.02025-01-20Added 5 granular commands, architecture patterns, troubleshooting, tracking file
1.1.02024-12-15Added DDD patterns, improved reverse engineering
1.0.02024-11-01Initial release

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.07%
按下载量换算23

Claude

29.48%
按下载量换算19

Cursor

19.5%
按下载量换算12

Gemini CLI

9.5%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills