loom-diagramming
Skill58 starsChanged 58 days agoMITView on GitHub
Create technical diagrams (Mermaid): architecture, sequences, ERDs, state machines. Not for: app/stage state.
In this repository75 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- loom-accessibilitySkill
- loom-api-designSkill
- loom-api-documentationSkill
- loom-argocdSkill
- loom-authSkill
- loom-background-jobsSkill
- loom-before-afterSkill
- loom-cachingSkill
- loom-ci-cdSkill
- loom-code-migrationSkill
- loom-code-reviewSkill
- loom-concurrencySkill
- loom-cppSkill
- loom-crossplaneSkill
- loom-csharpSkill
- loom-cSkill
- loom-dartSkill
- loom-database-designSkill
- loom-data-validationSkill
- loom-data-visualizationSkill
- loom-dead-code-checkSkill
- loom-debuggingSkill
- loom-dependency-scanSkill
- loom-dockerSkill
- loom-documentationSkill
- loom-e2e-testingSkill
- loom-elixirSkill
- loom-error-handlingSkill
- loom-event-drivenSkill
- loom-feature-flagsSkill
- loom-fluxcdSkill
- loom-git-workflowSkill
- loom-golangSkill
- loom-grafanaSkill
- loom-i18nSkill
- loom-istioSkill
- loom-javascriptSkill
- loom-javaSkill
- loom-karpenterSkill
- loom-kotlinSkill
- loom-kubernetesSkill
- loom-kustomizeSkill
- loom-logging-observabilitySkill
- loom-md-tablesSkill
- loom-model-evaluationSkill
- loom-orchestrationSkill
- loom-performance-testingSkill
- loom-phpSkill
- loom-plan-writerSkill
- loom-prometheusSkill
- loom-prompt-engineeringSkill
- loom-pythonSkill
- loom-rate-limitingSkill
- loom-reactSkill
- loom-refactoringSkill
- loom-rubySkill
- loom-rustSkill
- loom-scalaSkill
- loom-searchSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
Create maintainable technical diagrams in Mermaid (renders in GitHub, GitLab, and most doc tools).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diagramming
Overview
Create maintainable technical diagrams in Mermaid (renders in GitHub, GitLab, and most doc tools). Diagrams live in version control next to code — they must stay in sync or they mislead. This skill covers type selection, syntax, and the parsing footguns that waste the most time.
Choose the diagram type
| Type | Use when | Not when |
| Sequence | Interactions over time across participants | Showing static structure |
| Flowchart | Decision logic, process/pipeline steps | Timing between services (use sequence) |
| State | An entity's lifecycle + transitions/guards | Data flow or call order |
| ERD | Data model, tables, cardinality | Runtime behavior |
| Class | OO structure, interfaces, inheritance | Deployment or infra |
| C4 (Context) | System boundary + external actors/systems | Internal code detail |
| C4 (Container) | Deployable units + their tech + data stores | Class-level detail |
Rule of thumb: structure → flowchart/C4/class/ERD; behavior over time → sequence; lifecycle → state. For architecture, prefer C4's layered zoom (Context → Container → Component) over one sprawling diagram.
Gotchas (Mermaid parsing footguns)
These cause silent render failures or garbled output far more often than logic errors.
endis reserved in flowcharts. A lowercase node idendbreaks the parser. UseEnd,END, or quote it:id["end"]. Same care withsubgraph/click/classas bare ids.- Quote labels with special characters. Parentheses
(),{},[],#,:,;, and quotes inside a label break parsing — wrap the text:A["fetch(url)"],B["step: parse"]. For literal special chars inside a quoted label, use HTML entities:#quot;won't work — use",&,#(for#). - Line breaks:
<br/>inside a label, not\n:A["Line one<br/>Line two"]. - Edge labels with special chars must be quoted:
A -->|"retry (max 3)"| B. - Leading
o/xon an edge become arrowheads.A---oBrenders a circle end,A---xBa cross. Add a space (A --- oBis still risky) or rename the node so an edge doesn't touch a bareo/x. - Subgraph direction: set
direction LRinside the subgraph; note that edges crossing subgraph boundaries can override a subgraph's internal direction. - Comments are
%%on their own line. Semicolons are optional line terminators. - C4 diagrams (
C4Context/C4Container) have limited, sometimes experimental layout control and lag other Mermaid features — verify they render in your target tool before committing to them; a plainflowchartwith subgraphs is a robust fallback. - Don't build the giant diagram. Past ~15-20 nodes it's unreadable and un-reviewable. Split by concern or zoom level. One diagram, one idea.
Keep diagrams in sync
Diagrams are code artifacts: update the diagram in the same PR as the code it depicts, review it in the diff, and prefer a diagram that's easy to regenerate over a pixel-perfect one that rots. A wrong diagram is worse than none.
Syntax quick reference
- Direction:
flowchart TB(top-bottom),LR(left-right). Sequence diagrams auto-layout. - Node shapes:
[Rect]process ·(Rounded)start/end ·{Diamond}decision ·[(DB)]store ·((Circle))connector. - Edges:
-->solid ·-.->dotted/optional ·==>emphasis ·->>(sequence) sync message ·-->>async/return. - Sequence keywords:
participant,autonumber,alt/else/end,loop/end,par/and/end,Note over A,B.
Examples
C4 Context (Level 1)
C4Context
title System Context — E-Commerce Platform
Person(customer, "Customer", "Browses and purchases")
System(ecommerce, "E-Commerce Platform", "Core system")
System_Ext(payment, "Payment Gateway", "Processes payments")
Rel(customer, ecommerce, "Uses")
Rel(ecommerce, payment, "Charges", "HTTPS")C4 Container (Level 2)
C4Container
title Containers — E-Commerce Platform
Person(customer, "Customer")
Container_Boundary(ec, "E-Commerce Platform") {
Container(web, "Web App", "React", "Customer UI")
Container(api, "API Gateway", "Node.js", "REST API")
ContainerDb(db, "Database", "PostgreSQL", "Stores data")
ContainerQueue(queue, "Queue", "RabbitMQ", "Async events")
}
Rel(customer, web, "Uses", "HTTPS")
Rel(web, api, "Calls", "JSON/HTTPS")
Rel(api, db, "Reads/writes")
Rel(api, queue, "Publishes")Sequence — request flow with conditionals
sequenceDiagram
autonumber
participant C as Client
participant S as Service
participant D as Database
C->>S: POST /api/users
S->>S: Validate input
alt Validation fails
S-->>C: 400 Bad Request
else Valid
S->>D: INSERT user
alt Constraint violation
D-->>S: Duplicate key
S-->>C: 409 Conflict
else Success
D-->>S: Created
S-->>C: 201 Created
end
endSequence — parallel work
sequenceDiagram
participant O as Order Service
participant I as Inventory
participant P as Payment
par Check inventory and authorize payment
O->>I: Check stock
I-->>O: Available
and
O->>P: Authorize
P-->>O: Authorized
end
O->>P: Capture paymentFlowchart — decision logic
flowchart TD
A[User Login] --> B{Valid credentials?}
B -->|No| D[Show error]
D --> A
B -->|Yes| C{2FA enabled?}
C -->|No| G[Create session]
C -->|Yes| E[Send 2FA code]
E --> F{Code valid?}
F -->|Yes| G
F -->|No| H{Attempts < 3?}
H -->|Yes| E
H -->|No| I[Lock account]
G --> J[Dashboard]ERD
Cardinality: || exactly one · o| zero-or-one · }| one-or-more · }o zero-or-more (left char = min, right char = max, read toward the entity).
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : contains
ORDER_ITEM }|--|| PRODUCT : references
USER {
uuid id PK
string email UK
timestamp created_at
}
ORDER {
uuid id PK
uuid user_id FK
string status
}State machine
stateDiagram-v2
[*] --> Draft: create
Draft --> Pending: submit
Pending --> Confirmed: payment received
Pending --> Cancelled: payment failed / timeout
Confirmed --> Shipped: fulfill
Shipped --> Delivered: confirmed
Delivered --> [*]
note right of Pending
Auto-cancels after 24h
end noteClass diagram
classDiagram
class Repository~T~ {
<<interface>>
+findById(id) T
+save(entity: T) T
}
class UserRepository {
-db: Database
+findByEmail(email) User
}
Repository~T~ <|.. UserRepository
UserRepository --> UserVerify before done
- Diagram renders in the target tool (GitHub/GitLab/docs), not just a local previewer — especially for C4.
- Labels with
(),#,:,,, or quotes are wrapped in"…"; no bareendnode id in a flowchart. - Diagram type matches intent (behavior→sequence, structure→flowchart/C4, lifecycle→state).
- ≤~20 nodes; split otherwise. One diagram, one concept.
- Matches current code; updated in the same PR as the change it depicts.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

