360 Secure SkillHub
360 安全技能中心

architecture-diagrams

该 Skill 提供系统架构、C4 上下文、组件、部署、数据流、序列和类图的参考指南与 Mermaid 示例,帮助把架构与设计描述转化为可版本控制的代码化图表;文件列表还包含 schema 校验脚本和迁移 SQL 模板。

aj-geddes
热度 17.32
最近更新 2026-10-19 07:39:11
分类:开发依赖:读写文件应用场景:代码生成 / 工作流 / 模板 / 概念解释

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add aj-geddes/useful-ai-prompts/architecture-diagrams
Metadata
name
architecture-diagrams
description
Create system architecture diagrams using Mermaid, PlantUML, C4 model, flowcharts, and sequence diagrams. Use when documenting architecture, system design, data flows, or technical workflows.

Architecture Diagrams

Table of Contents

Overview

Create clear, maintainable architecture diagrams using code-based diagramming tools like Mermaid and PlantUML for system design, data flows, and technical documentation.

When to Use

  • System architecture documentation
  • C4 model diagrams
  • Data flow diagrams
  • Sequence diagrams
  • Component relationships
  • Deployment diagrams
  • Infrastructure architecture
  • Microservices architecture
  • Database schemas (visual)
  • Integration patterns

Quick Start

Minimal working example:

graph TB
    subgraph "Client Layer"
        Web[Web App]
        Mobile[Mobile App]
        CLI[CLI Tool]
    end

    subgraph "API Gateway Layer"
        Gateway[API Gateway<br/>Rate Limiting<br/>Authentication]
    end

    subgraph "Service Layer"
        Auth[Auth Service]
        User[User Service]
        Order[Order Service]
        Payment[Payment Service]
        Notification[Notification Service]
    end

    subgraph "Data Layer"
        UserDB[(User DB<br/>PostgreSQL)]
        OrderDB[(Order DB<br/>PostgreSQL)]
        Cache[(Redis Cache)]
        Queue[Message Queue<br/>RabbitMQ]
    end
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
System Architecture Diagram System Architecture Diagram
Sequence Diagram Sequence Diagram
C4 Context Diagram C4 Context Diagram
Component Diagram Component Diagram
Deployment Diagram Deployment Diagram
Data Flow Diagram Data Flow Diagram
Class Diagram Class Diagram
Component Diagram Component Diagram
Deployment Diagram Deployment Diagram

Best Practices

✅ DO

  • Use consistent notation and symbols
  • Include legends for complex diagrams
  • Keep diagrams focused on one aspect
  • Use color coding meaningfully
  • Include titles and descriptions
  • Version control your diagrams
  • Use text-based formats (Mermaid, PlantUML)
  • Show data flow direction clearly
  • Include deployment details
  • Document diagram conventions
  • Keep diagrams up-to-date with code
  • Use subgraphs for logical grouping

❌ DON'T

  • Overcrowd diagrams with details
  • Use inconsistent styling
  • Skip diagram legends
  • Create binary image files only
  • Forget to document relationships
  • Mix abstraction levels in one diagram
  • Use proprietary formats