Architecture Diagram Builder skill
Creates evidence-backed current or target architecture diagrams.
by levnikolaevich·MIT license·★ 568 Stars on the repo·GitHub ↗
npx degit levnikolaevich/claude-code-skills/plugins/architecture-suite/skills/ln-25-architecture-diagram-builder#master ~/.claude/skills/ln-25-architecture-diagram-builderChecked ·commit master
Files of Architecture Diagram Builder
Show the full text99 lines
Architecture Diagram Builder
Goal: Create the smallest set of understandable, evidence-backed diagrams needed to communicate current or proposed architecture. Change only approved architecture documentation; do not invent relationships, perform visual product design, replace prose evidence, audit fitness, or edit implementation.
Execution contract: The checklist defines completion. Track each item internally as PENDING, PROVEN with evidence, CLEARED with evidence its condition is absent, or UNPROVEN with a gap; reading, delegation, tool failure, a zero exit status, or a self-reported success is not proof; only the observed outcome is. Reconcile after each section. Before returning, resolve all PENDING, count only PROVEN and CLEARED, and apply verdict and approval rules to every gap.
Preserve intent, scope, and existing authorization. Continue authorized work; ask only for consequential unresolved choices or required external approval. When no one can answer during the run, state the exact question and apply the skill's verdict for the remaining gap instead of waiting or guessing. Scale depth to material risk without skipping checks. Preserve dependency and safety order; otherwise choose an appropriate verification method.
Accept equivalent user or repository evidence; no other skill, named artifact, or complete lifecycle is required. Preserve source requirement and decision IDs. Bind reused evidence to relevant source versions, dirty changes, configuration, and environment; invalidate only affected claims.
On continuation, reconcile task, authorization, current state, and unresolved evidence. For long work, return a compact continuation record or update an already authorized artifact; read-only skills do not persist it. Distinguish artifact readiness, verified behavior, and external-action authority.
Prepare authorized work before required approval. If blocked by an instruction, cite its exact source and unresolved boundary; do not invent approval gates from caution.
Tool Routing
| Need | Preferred capability | Fallback |
|---|---|---|
| Architecture evidence | Repository files, runtime wiring, IaC, contracts, and approved artifacts | User-provided model with UNVERIFIED labels |
| Relationship tracing | Language intelligence, dependency tools, and focused search | Direct inspection of producers, consumers, and registrations |
| Diagram format | Existing repository convention and renderer | Mermaid in Markdown, then plain ASCII |
| Syntax verification | Repository renderer, parser, or preview | Manual fence, identifier, and relationship inspection |
| Document mutation | Minimal patch to approved diagram artifacts | Return BLOCKED if path or evidence boundary is unsafe |
Diagrams communicate a model; executable behavior remains authoritative for current state. Keep current, target, and transition views visibly distinct.
Artifact Rules
- Reuse an existing diagram convention or use
docs/architecture/diagrams/<view>.md. - Prefer Markdown with Mermaid for text-reviewable source; use ASCII when Mermaid is unsupported.
- For static structure, choose the context, container, or component level that answers the requested question; do not create prerequisite overview diagrams when existing context suffices.
- Keep diagram source reviewable in version control.
- Split views when one diagram needs multiple unrelated stories.
- Never use color as the only carrier of meaning.
- Use stable element identifiers and concise display labels so revisions produce reviewable diffs.
- Keep detailed evidence beside the diagram rather than crowding nodes and relationships.
- Preserve an understandable existing notation; introduce a new notation only when it answers the audience question better.
Checklist
1. Establish the Diagram Contract
- Resolve audience, question, current or target state, scope, approved destination, and required notation.
- Read repository instructions, relevant architecture artifacts, and existing diagram conventions.
- Select the minimum useful view or views; reject diagrams that add no relationship clarity.
- Define the evidence boundary and label user-supplied or proposed elements separately.
- Keep the run read-only except for approved architecture diagram documentation.
2. Build the Architecture Model
- Identify relevant people, systems, applications/data stores (C4 containers when using C4), components, queues, and external dependencies; distinguish logical containers from OS/container-runtime deployment units.
- Record responsibility, type, technology when decision-relevant, owner when known, and current/target status for each element.
- Resolve relationship direction, label, protocol or data, synchronicity, and trust or network boundary where relevant.
- Trace runtime discovery and registration before including current-state routes, handlers, jobs, plugins, or consumers.
- Mark uncertain elements or relationships
UNKNOWNrather than completing the picture aesthetically.
3. Select and Draw Views
- Create a system-context view when readers need system scope and external actors.
- Create a container or deployment view for responsibilities, deployability, stores, or operational topology; include nodes, regions, networks, scaling, and failover when relevant to the audience question.
- Create a component view only for a complex area whose internal boundaries change understanding.
- Create sequence or dynamic views for critical success, failure, retry, timeout, recovery, or migration interactions.
- Create data-flow or trust-boundary views when security, privacy, residency, or system-of-record questions require them.
- Avoid mixing abstraction levels in one view unless the exception is explicit and necessary.
4. Make the Diagram Self-Describing
- Add title, diagram type, scope, current/target marker, intended audience, and observation or proposal date.
- Add a legend for shapes, colors, line styles, abbreviations, and uncertainty markers.
- Label every relationship with intent or data; avoid generic arrows and unexplained acronyms.
- Keep names consistent with code, contracts, and shared architecture documents.
- Add compact evidence notes or links sufficient to trace current-state claims.
5. Verify and Report
- Validate syntax with the repository renderer or perform a complete manual syntax inspection.
- Inspect rendered readability when a preview is available and split overloaded views rather than shrinking labels. Without a renderer, record visual readability as
UNPROVEN; manual syntax inspection is not render proof. - Verify current-state elements and relationships against implementation evidence, and target-state elements against the declared proposal or explicitly labelled assumptions.
- Bind each view to current or proposed architecture and its authoritative source; expose contradictions rather than resolving them silently in a diagram.
- Use
READYwhen diagrams are valid, scoped, evidenced, and readable at the requested fidelity; useINCOMPLETEfor material unknown relationships or missing required render evidence; useBLOCKEDwhen scope, evidence, format, or destination prevents a trustworthy diagram.
Self-Check
- Reconcile before returning. Check item-level evidence, requirement coverage, contradictions, scope, verdict, and applicable cleanup. Correct the report or authorized artifacts. Reuse valid evidence; do not automatically rescan the repository or rerun successful commands. Repeat checks only for relevant changes, failures, or unresolved evidence. Disclose remaining gaps.
Output Contract
Report in the user's language, in this order; label all five fields and state each fact once. Use controlled plain language: one fact per sentence, usually under 20 words, active voice, and one term per concept, with no synonyms for verdicts, IDs, or states. Small results may use one line per field; omit empty tables and do not copy linked artifacts:
- Result: The exact skill-specific verdict token first, then the supported outcome.
- Scope: Reviewed/changed scope, exclusions, baseline, and material assumptions.
- Evidence: Skill-specific fields below; distinguish facts, inferences, and unverified claims. Link artifacts; use tables when useful.
- Verification: Checks/results, unavailable evidence, and applicable cleanup/external state.
- Completion:
Checklist: X/Y complete;Incomplete: Noneor eachUNPROVENitem's reason, outcome impact, and exact next action; residual risks and required decisions.
Skill-specific evidence: Artifact paths; each view’s current/target state, audience question, and evidence basis. Report syntax/render verification and current-state relationship checks, unknown relationships, and rendering limits that affect interpretation.
| 1 | |
| 2 | name ln-25-architecture-diagram-builder |
| 3 | description "Creates evidence-backed current or target architecture diagrams; not UI design." |
| 4 | |
| 5 | |
| 6 | # Architecture Diagram Builder |
| 7 | |
| 8 | **Goal:** Create the smallest set of understandable, evidence-backed diagrams needed to communicate current or proposed architecture. Change only approved architecture documentation; do not invent relationships, perform visual product design, replace prose evidence, audit fitness, or edit implementation. |
| 9 | |
| 10 | **Execution contract:** The checklist defines completion. Track each item internally as `PENDING`, `PROVEN` with evidence, `CLEARED` with evidence its condition is absent, or `UNPROVEN` with a gap; reading, delegation, tool failure, a zero exit status, or a self-reported success is not proof; only the observed outcome is. Reconcile after each section. Before returning, resolve all `PENDING`, count only `PROVEN` and `CLEARED`, and apply verdict and approval rules to every gap. |
| 11 | Preserve intent, scope, and existing authorization. Continue authorized work; ask only for consequential unresolved choices or required external approval. When no one can answer during the run, state the exact question and apply the skill's verdict for the remaining gap instead of waiting or guessing. Scale depth to material risk without skipping checks. Preserve dependency and safety order; otherwise choose an appropriate verification method. |
| 12 | Accept equivalent user or repository evidence; no other skill, named artifact, or complete lifecycle is required. Preserve source requirement and decision IDs. Bind reused evidence to relevant source versions, dirty changes, configuration, and environment; invalidate only affected claims. |
| 13 | On continuation, reconcile task, authorization, current state, and unresolved evidence. For long work, return a compact continuation record or update an already authorized artifact; read-only skills do not persist it. Distinguish artifact readiness, verified behavior, and external-action authority. |
| 14 | Prepare authorized work before required approval. If blocked by an instruction, cite its exact source and unresolved boundary; do not invent approval gates from caution. |
| 15 | |
| 16 | |
| 17 | ## Tool Routing |
| 18 | |
| 19 | | Need | Preferred capability | Fallback | |
| 20 | |---|---|---| |
| 21 | | Architecture evidence | Repository files, runtime wiring, IaC, contracts, and approved artifacts | User-provided model with `UNVERIFIED` labels | |
| 22 | | Relationship tracing | Language intelligence, dependency tools, and focused search | Direct inspection of producers, consumers, and registrations | |
| 23 | | Diagram format | Existing repository convention and renderer | Mermaid in Markdown, then plain ASCII | |
| 24 | | Syntax verification | Repository renderer, parser, or preview | Manual fence, identifier, and relationship inspection | |
| 25 | | Document mutation | Minimal patch to approved diagram artifacts | Return `BLOCKED` if path or evidence boundary is unsafe | |
| 26 | |
| 27 | Diagrams communicate a model; executable behavior remains authoritative for current state. Keep current, target, and transition views visibly distinct. |
| 28 | |
| 29 | ## Artifact Rules |
| 30 | |
| 31 | Reuse an existing diagram convention or use `docs/architecture/diagrams/<view>.md`. |
| 32 | Prefer Markdown with Mermaid for text-reviewable source; use ASCII when Mermaid is unsupported. |
| 33 | For static structure, choose the context, container, or component level that answers the requested question; do not create prerequisite overview diagrams when existing context suffices. |
| 34 | Keep diagram source reviewable in version control. |
| 35 | Split views when one diagram needs multiple unrelated stories. |
| 36 | Never use color as the only carrier of meaning. |
| 37 | Use stable element identifiers and concise display labels so revisions produce reviewable diffs. |
| 38 | Keep detailed evidence beside the diagram rather than crowding nodes and relationships. |
| 39 | Preserve an understandable existing notation; introduce a new notation only when it answers the audience question better. |
| 40 | |
| 41 | ## Checklist |
| 42 | |
| 43 | ### 1. Establish the Diagram Contract |
| 44 | |
| 45 | [ ] Resolve audience, question, current or target state, scope, approved destination, and required notation. |
| 46 | [ ] Read repository instructions, relevant architecture artifacts, and existing diagram conventions. |
| 47 | [ ] Select the minimum useful view or views; reject diagrams that add no relationship clarity. |
| 48 | [ ] Define the evidence boundary and label user-supplied or proposed elements separately. |
| 49 | [ ] Keep the run read-only except for approved architecture diagram documentation. |
| 50 | |
| 51 | ### 2. Build the Architecture Model |
| 52 | |
| 53 | [ ] Identify relevant people, systems, applications/data stores (C4 containers when using C4), components, queues, and external dependencies; distinguish logical containers from OS/container-runtime deployment units. |
| 54 | [ ] Record responsibility, type, technology when decision-relevant, owner when known, and current/target status for each element. |
| 55 | [ ] Resolve relationship direction, label, protocol or data, synchronicity, and trust or network boundary where relevant. |
| 56 | [ ] Trace runtime discovery and registration before including current-state routes, handlers, jobs, plugins, or consumers. |
| 57 | [ ] Mark uncertain elements or relationships `UNKNOWN` rather than completing the picture aesthetically. |
| 58 | |
| 59 | ### 3. Select and Draw Views |
| 60 | |
| 61 | [ ] Create a system-context view when readers need system scope and external actors. |
| 62 | [ ] Create a container or deployment view for responsibilities, deployability, stores, or operational topology; include nodes, regions, networks, scaling, and failover when relevant to the audience question. |
| 63 | [ ] Create a component view only for a complex area whose internal boundaries change understanding. |
| 64 | [ ] Create sequence or dynamic views for critical success, failure, retry, timeout, recovery, or migration interactions. |
| 65 | [ ] Create data-flow or trust-boundary views when security, privacy, residency, or system-of-record questions require them. |
| 66 | [ ] Avoid mixing abstraction levels in one view unless the exception is explicit and necessary. |
| 67 | |
| 68 | ### 4. Make the Diagram Self-Describing |
| 69 | |
| 70 | [ ] Add title, diagram type, scope, current/target marker, intended audience, and observation or proposal date. |
| 71 | [ ] Add a legend for shapes, colors, line styles, abbreviations, and uncertainty markers. |
| 72 | [ ] Label every relationship with intent or data; avoid generic arrows and unexplained acronyms. |
| 73 | [ ] Keep names consistent with code, contracts, and shared architecture documents. |
| 74 | [ ] Add compact evidence notes or links sufficient to trace current-state claims. |
| 75 | |
| 76 | ### 5. Verify and Report |
| 77 | |
| 78 | [ ] Validate syntax with the repository renderer or perform a complete manual syntax inspection. |
| 79 | [ ] Inspect rendered readability when a preview is available and split overloaded views rather than shrinking labels. Without a renderer, record visual readability as `UNPROVEN`; manual syntax inspection is not render proof. |
| 80 | [ ] Verify current-state elements and relationships against implementation evidence, and target-state elements against the declared proposal or explicitly labelled assumptions. |
| 81 | [ ] Bind each view to current or proposed architecture and its authoritative source; expose contradictions rather than resolving them silently in a diagram. |
| 82 | [ ] Use `READY` when diagrams are valid, scoped, evidenced, and readable at the requested fidelity; use `INCOMPLETE` for material unknown relationships or missing required render evidence; use `BLOCKED` when scope, evidence, format, or destination prevents a trustworthy diagram. |
| 83 | |
| 84 | ## Self-Check |
| 85 | |
| 86 | [ ] **Reconcile before returning.** Check item-level evidence, requirement coverage, contradictions, scope, verdict, and applicable cleanup. Correct the report or authorized artifacts. Reuse valid evidence; do not automatically rescan the repository or rerun successful commands. Repeat checks only for relevant changes, failures, or unresolved evidence. Disclose remaining gaps. |
| 87 | |
| 88 | ## Output Contract |
| 89 | |
| 90 | Report in the user's language, in this order; label all five fields and state each fact once. Use controlled plain language: one fact per sentence, usually under 20 words, active voice, and one term per concept, with no synonyms for verdicts, IDs, or states. Small results may use one line per field; omit empty tables and do not copy linked artifacts: |
| 91 | |
| 92 | **Result:** The exact skill-specific verdict token first, then the supported outcome. |
| 93 | **Scope:** Reviewed/changed scope, exclusions, baseline, and material assumptions. |
| 94 | **Evidence:** Skill-specific fields below; distinguish facts, inferences, and unverified claims. Link artifacts; use tables when useful. |
| 95 | **Verification:** Checks/results, unavailable evidence, and applicable cleanup/external state. |
| 96 | **Completion:** `Checklist: X/Y complete`; `Incomplete: None` or each `UNPROVEN` item's reason, outcome impact, and exact next action; residual risks and required decisions. |
| 97 | |
| 98 | **Skill-specific evidence:** Artifact paths; each view’s current/target state, audience question, and evidence basis. Report syntax/render verification and current-state relationship checks, unknown relationships, and rendering limits that affect interpretation. |
| 99 |
Discussion
Alternatives
Browse more free Claude skills or everything in Development.