agentleFS
lechithinhlechithinh/ba-claude-skills/skills/ba-diagrams/SKILL.md

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".

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
  1. Distinctive:

    If the user's request is ambiguous, pick the best fit, say why in one line, and offer the alternative.

    line 25
  2. Very specific:

    State: every state reachable; terminal states go to [*].

    line 33
  3. Very specific:

    Do not use end as a node ID (reserved).

    line 47
  4. Very specific:

    No HTML except <br/> for line breaks.

    line 48
  5. Distinctive:

    Keep ≤ 30 nodes per diagram.

    line 49

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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…UseMermaid 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 diagramflowchart LR with actor nodes and a system boundary subgraph
How do systems/components talk over time?Sequence diagramsequenceDiagram
What data do we store and how is it related?ERDerDiagram
What statuses does an object go through?State diagramstateDiagram-v2
What is inside vs outside the system?Context diagramflowchart 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

  1. One-line purpose of the diagram and audience.
  2. The Mermaid code block.
  3. A short legend / notes: assumptions, open questions, things deliberately left out.
  4. 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 end as a node ID (reserved); use endNode.
  • No HTML except <br/> for line breaks.
  • Keep ≤ 30 nodes per diagram; split large processes into sub-processes.
  • erDiagram attribute types must be a single word (string, int, datetime).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.