跳到正文
cccskills
免费在 GitHub 公开

common-architecture-diagramming

Draws architecture diagrams as editable draw.io files with a fixed house style, C4 levels, evidence-tagged shapes, and optional multi-view identity checks. Use when producing a system context, container, component, deployment, data flow, sequence, state, or ERD, or redrawing an ASCII or Mermaid one.

中文简介正在准备中。当前显示原文说明。

集成工具Azure

实测评分 未实测

查看安装方法

包含的文件(65)

  • SKILL.md5.0 KB
  • assets/fixtures/component.drawio8.2 KB
  • assets/fixtures/component.spec.json3.9 KB
  • assets/fixtures/container.drawio13.1 KB
  • assets/fixtures/container.spec.json2.5 KB
  • assets/fixtures/context.drawio10.4 KB
  • assets/fixtures/context.spec.json1.5 KB
  • assets/fixtures/dataflow.drawio11.7 KB
  • assets/fixtures/dataflow.spec.json1.6 KB
  • assets/fixtures/deployment.drawio18.3 KB
  • assets/fixtures/deployment.spec.json2.3 KB
  • assets/fixtures/erd.drawio9.8 KB
  • assets/fixtures/erd.spec.json2.1 KB
  • assets/fixtures/evidence/component-view.md476 B
  • assets/fixtures/evidence/orders_api.py395 B
  • assets/fixtures/evidence/orders_retry.py427 B
  • assets/fixtures/evidence/orders_schema.sql169 B
  • assets/fixtures/schemas/orders_models.py834 B
  • assets/fixtures/schemas/orders_models.py.expected.json3.2 KB
  • assets/fixtures/schemas/orders.entity.ts729 B
  • assets/fixtures/schemas/orders.entity.ts.expected.json2.3 KB
  • assets/fixtures/schemas/orders.prisma451 B
  • assets/fixtures/schemas/orders.prisma.expected.json2.3 KB
  • assets/fixtures/schemas/orders.sql427 B
  • assets/fixtures/schemas/orders.sql.expected.json2.5 KB
  • assets/fixtures/sequence.drawio10.1 KB
  • assets/fixtures/sequence.spec.json1.4 KB
  • assets/fixtures/state.drawio9.2 KB
  • assets/fixtures/state.spec.json1.4 KB
  • assets/fixtures/view-manifest.json1.5 KB
  • assets/fixtures/views/orders-containers.spec.json2.6 KB
  • evals/evals.json14.3 KB
  • references/best-practices.md3.0 KB
  • references/c4-model.md968 B
  • references/checklist.md3.9 KB
  • references/cloud-architecture.md2.8 KB
  • references/diagram-selection.md2.7 KB
  • references/diagram-spec.md10.0 KB
  • references/exec-readability.md1.9 KB
  • references/house-style.md2.3 KB
  • references/layout-rules.md3.0 KB
  • references/mermaid-fallback.md2.9 KB
  • references/source-extraction.md2.5 KB
  • references/style-catalog.md3.2 KB
  • references/view-manifest.md4.6 KB
  • scripts/check_layout.py8.5 KB
  • scripts/export_drawio.py3.4 KB
  • scripts/render_drawio.py29.2 KB
  • scripts/render_erd.py3.8 KB
  • scripts/schema_parsers/__init__.py1.2 KB
  • scripts/schema_parsers/django_sqlalchemy.py3.7 KB
  • scripts/schema_parsers/model.py762 B
  • scripts/schema_parsers/prisma.py2.7 KB
  • scripts/schema_parsers/sql_ddl.py3.5 KB
  • scripts/schema_parsers/typeorm.py3.4 KB
  • scripts/schema_to_spec.py4.3 KB
  • scripts/style_catalog.py11.3 KB
  • scripts/test_check_layout.py13.1 KB
  • scripts/test_fixtures.py2.6 KB
  • scripts/test_render_drawio.py46.0 KB
  • scripts/test_schema_parsers.py9.0 KB
  • scripts/test_schema_to_spec.py3.1 KB
  • scripts/test_view_manifest.py19.1 KB
  • scripts/validate_manifest.py18.8 KB
  • scripts/validate_spec.py20.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Architecture Diagramming Standard

Priority: P1 (HIGH)

Pipeline

Never hand-write mxGraph XML. Write a spec; the scripts own every visual decision, so diagrams stay identical across authors, repositories, and sessions.

  1. Write spec.json — schema in diagram-spec.md. For an ERD, generate it: python3 scripts/schema_to_spec.py db/schema.sql --title "<System> — ERD" -o spec.json
  2. python3 scripts/validate_spec.py spec.json
  3. python3 scripts/render_drawio.py spec.json -o docs/architecture/<slug>.drawio --strict (exit 2 = a layout finding; change the spec, per layout-rules.md)
  4. For related views, optionally validate view-manifest.md: python3 scripts/validate_manifest.py view-manifest.json
  5. Export the image: a draw.io MCP tool if the session has one, else python3 scripts/export_drawio.py docs/architecture/<slug>.drawio -f png -o docs/architecture/<slug>.png, else ship the .drawio and say the image was not exported. See export paths.
  6. Inspect the exported image at normal reading size; strict validation cannot prove labels and edges are legible. Fix the spec and re-export before handoff.

The JSON spec is the semantic source of truth; .drawio is the editable presentation and the image is a copy for a deck. Generated XML records its own baseline; regeneration protects manual edits by default. Use --acknowledge-manual-edits only after returning semantic changes to the spec.

Guidelines

  • Name the audience and the decision before drawing anything.
  • One C4 level per diagram: context, container, or component, never mixed.
  • Pick the type from the message, not from habit. See diagram-selection.md.
  • Evidence and confidence are separate. Code citations are documented evidence, not runtime observations; use assumed or unverified for honest design uncertainty.
  • Put the number on the box. metric carries the load or SLO that sized the node, constraint says why it exists; never invent either.
  • Label every edge with its protocol or event; use style: async for events.
  • Cloud icons only where verified. gcp:* and aws:* are official icons; every other vendor is a cloud:* kind with the service named in sublabel. No Azure logos exist in the bundle, so Azure is always cloud:*.
  • Exec audience caps at 12 nodes. Past that, split by level or by flow.
  • Legend and title block are generated. Do not remove or duplicate them.
  • Refine in the spec, not by mutating generated XML. Regeneration preserves files with a valid own baseline, but refuses hand mutation until explicitly acknowledged.

Anti-Patterns

  • No hand-written XML: Write the spec, run the renderer.
  • No invented boxes: Omit what the evidence does not support.
  • No mixed levels: Table columns never appear in a context diagram.
  • No unlabeled arrows: State the protocol or the event.
  • No mystery acronyms: Expand every abbreviation on first use.
  • No orphan nodes: Connect it or cut it.

Red Flags

ThoughtReality
"It is one box, I will write the XML"The renderer owns style, legend, and title block. Use it.
"Close enough, I will guess this service"Guesses ship as facts. Omit the evidence and let it render UNVERIFIED.
"Managers want the whole system on one page"Past 12 nodes they stop reading. Split it.

References

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.

中文简介正在准备中。当前显示原文说明。

HoangNguyen0403/agent-skills-standard5812026年10月24日 更新

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.

中文简介正在准备中。当前显示原文说明。

HoangNguyen0403/agent-skills-standard5812026年10月24日 更新

Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.

中文简介正在准备中。当前显示原文说明。

HoangNguyen0403/agent-skills-standard5812026年10月24日 更新

Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.

中文简介正在准备中。当前显示原文说明。

HoangNguyen0403/agent-skills-standard5812026年10月24日 更新

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

中文简介正在准备中。当前显示原文说明。

HoangNguyen0403/agent-skills-standard5812026年10月24日 更新

Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test recipes to their specific skills.

中文简介正在准备中。当前显示原文说明。

HoangNguyen0403/agent-skills-standard5812026年10月24日 更新

查看 HoangNguyen0403 的全部技能

报告此技能的问题