ba-diagrams
Skill1 starsChanged 8 days agoMITView on GitHub
Creates Business Analysis diagrams as Mermaid code — process flows (BPMN-style swimlanes), use case diagrams, sequence diagrams, ERDs, state diagrams, context diagrams and data flow — and picks the right diagram for the question being asked. Use when the user asks to draw, model, visualize or diagram a business process, As-Is/To-Be flow, use case, system interaction, data model or status lifecycle, or says "vẽ sơ đồ", "vẽ quy trình", "vẽ use case", "vẽ ERD", "sơ đồ trạng thái".
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-specSkill
- bpmn-modelingSkill
- decision-tableSkill
- domain-bankingSkill
- domain-ecommerceSkill
- domain-lendingSkill
- domain-logisticsSkill
- domain-paymentsSkill
- edge-case-finderSkill
- functional-decompositionSkill
- meeting-to-requirementsSkill
- requirements-linterSkill
- screen-specSkill
- user-story-writerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
If the user's request is ambiguous, pick the best fit, say why in one line, and offer the alternative.
- Very specific: line 33
State: every state reachable; terminal states go to [*].
- Very specific: line 47
Do not use end as a node ID (reserved).
- Very specific: line 48
No HTML except <br/> for line breaks.
- Distinctive: line 49
Keep ≤ 30 nodes per diagram.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
BA Diagrams
Act as a senior Business Analyst who chooses the right model for the audience, then draws it as valid Mermaid code that renders on GitHub, Notion, Confluence (Mermaid plugin), GitLab and mermaid.live.
Language
Labels in the user's language. Keep node IDs ASCII (A1, checkSlot) and put Vietnamese text inside quoted labels: A1["Kiểm tra lịch trống"].
Step 1 — Choose the diagram
| The question is… | Use | Mermaid type |
| Who does what, in which order, across roles? | Swimlane process flow (BPMN-style) | flowchart LR + subgraph per lane |
| What can each actor do with the system? | Use case diagram | flowchart LR with actor nodes and a system boundary subgraph |
| How do systems/components talk over time? | Sequence diagram | sequenceDiagram |
| What data do we store and how is it related? | ERD | erDiagram |
| What statuses does an object go through? | State diagram | stateDiagram-v2 |
| What is inside vs outside the system? | Context diagram | flowchart with the system in the center |
| What does the scope hierarchy look like? | Use the functional-decomposition skill | — |
If the user's request is ambiguous, pick the best fit, say why in one line, and offer the alternative.
Step 2 — Model rules
- Process flows: one start, explicit end(s); decisions are diamonds
{"Còn chỗ?"}with labelled exits (-->|Yes|); one lane per role; activities are verb-noun. - As-Is vs To-Be: draw both when asked to improve a process, and list the changes (removed steps, automated steps, pain points fixed).
- Use case: actors outside the boundary; use cases as rounded nodes
UC1(["Đặt lịch"]); show<<include>>/<<extend>>as labelled dotted edges-.->|include|. - Sequence: name participants by role/system; show the error path with
alt/else. - ERD: entities singular, PK/FK marked, cardinality explicit (
||--o{). - State: every state reachable; terminal states go to
[*]; transitions labelled with the triggering event.
Step 3 — Output
- One-line purpose of the diagram and audience.
- The Mermaid code block.
- A short legend / notes: assumptions, open questions, things deliberately left out.
- Offer the next useful diagram (e.g. after a process flow → the state diagram of the main object).
Domain knowledge
If the work belongs to a business domain that has a domain pack in this collection — domain-banking, domain-ecommerce (more under skills/domain-*) — load that skill too. Use the pack's status sets (data-model.md) for state diagrams, its processes (processes.md) for process flows, and its integration landscape (integrations.md) for context/sequence diagrams. If no pack exists, state which domain assumptions you made.
Mermaid safety checklist (avoid render errors)
- Quote any label containing
( ) [ ] { } : ; , " / #or non-ASCII →A["Huỷ lịch (trước 2h)"]. - Do not use
endas a node ID (reserved); useendNode. - No HTML except
<br/>for line breaks. - Keep ≤ 30 nodes per diagram; split large processes into sub-processes.
erDiagramattribute types must be a single word (string,int,datetime).
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.

