
Generating Mermaid Diagrams
Generate consistent Mermaid flowcharts that document Salesforce Agentforce service agents, topics, actions, and conversation paths for planning and reviews.
Overview
Generating Mermaid Diagrams is an agent skill most often used in Build (also Ship review) that outputs Mermaid templates for Agentforce agent architecture, topics, actions, and conversation flows.
Install
npx skills add https://github.com/forcedotcom/sf-skills --skill generating-mermaid-diagramsWhat is this skill?
- Copy-ready Mermaid flowchart TB template with tuned node and rank spacing via init config
- Service-agent subgraph pattern: description, topics, and behavioral instructions in one view
- Per-topic subgraphs for scope, description, and actions labeled Apex vs Flow
- Supports architecture reviews, topic/action planning, and conversation-flow visualization
- Aligned to Agentforce agent structure rather than generic software diagrams
- Mermaid flowchart TB template with agent, per-topic, and action subgraph patterns
Adoption & trust: 693 installs on skills.sh; 513 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Agentforce designs are hard to align on when topics, actions, and flows live only in prose or one-off sketches.
Who is it for?
Solo builders or small teams documenting or planning Salesforce Agentforce service agents who already work in Markdown-friendly repos.
Skip if: Teams not on Agentforce/Salesforce who only need generic system diagrams, or shops that mandate a non-Mermaid diagram standard with no Mermaid render path.
When should I use this skill?
Documenting Agentforce agent structure, planning agent topics and actions, visualizing conversation flows, or running architecture reviews.
What do I get? / Deliverables
You leave with structured Mermaid diagrams ready for planning docs and architecture reviews that match Agentforce topic and action conventions.
- Mermaid source for agent-level and topic-level flowcharts
- Architecture-review-ready visualization of topics, instructions, and actions
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Agentforce structure is defined during agent build and tooling setup; this skill is the canonical shelf for that design work even when diagrams are reused in later reviews. Templates map directly to agent topics, instructions, Apex/Flow actions, and escalation—core agent-tooling artifacts, not generic app UI.
Where it fits
Map Order Status and Return Request topics with Apex and Flow actions before configuring the live agent.
Paste the service-agent subgraph into the repo README so collaborators see topic boundaries at a glance.
Attach an updated Mermaid flow to a pre-launch architecture review checklist.
How it compares
Use as an Agentforce-specific diagram template skill, not a general-purpose diagram MCP or whiteboard integration.
Common Questions / FAQ
Who is generating-mermaid-diagrams for?
It is for builders and architects working on Salesforce Agentforce agents who need repeatable Mermaid visuals for topics, actions, and conversation structure.
When should I use generating-mermaid-diagrams?
Use it during Build when planning agent topics and actions, before architecture reviews, and in Ship when you need updated flow visuals for launch or security conversations.
Is generating-mermaid-diagrams safe to install?
It is documentation template content with no runtime side effects by itself; review the Security Audits panel on this Prism page before trusting any bundled repo scripts.
SKILL.md
READMESKILL.md - Generating Mermaid Diagrams
# Agentforce Flow Diagram Template Flowchart template for visualizing Agentforce agent architecture and conversation flows. ## When to Use - Documenting Agentforce agent structure - Planning agent topics and actions - Visualizing conversation flows - Architecture reviews ## Mermaid Template - Agent Structure ```mermaid %%{init: {"flowchart": {"nodeSpacing": 80, "rankSpacing": 70}} }%% flowchart TB subgraph agent["🤖 SERVICE AGENT"] direction TB DESC[/"Agent Description:<br/>AI-powered customer service<br/>assistant for order management"/] subgraph topics["📋 TOPICS"] direction LR T1[Order Status] T2[Return Request] T3[Product Info] T4[Escalation] end subgraph instructions["📝 INSTRUCTIONS"] I1[Greet professionally] I2[Verify customer identity] I3[Use knowledge base first] I4[Escalate if frustrated] end end subgraph topic_order["📦 TOPIC: ORDER STATUS"] direction TB TO_DESC[/"Help customers check<br/>order and shipping status"/] TO_SCOPE[Scope: Order tracking,<br/>delivery estimates] subgraph to_actions["ACTIONS"] TO_A1[Get Order Details<br/>⚡ Apex] TO_A2[Check Shipping<br/>🔄 Flow] end end subgraph topic_return["🔄 TOPIC: RETURN REQUEST"] direction TB TR_DESC[/"Process return and<br/>refund requests"/] TR_SCOPE[Scope: Returns, refunds,<br/>exchanges] subgraph tr_actions["ACTIONS"] TR_A1[Create Case<br/>🔄 Flow] TR_A2[Generate Label<br/>⚡ Apex] TR_A3[Process Refund<br/>⚡ Apex] end end %% Connections T1 --> topic_order T2 --> topic_return TO_A1 --> ORDER_SVC[Order Service] TO_A2 --> SHIP_API[Shipping API] TR_A1 --> CASE_OBJ[(Case Object)] TR_A2 --> SHIP_API TR_A3 --> PAY_API[Payment API] %% Node Styling - Topics (violet-200) style T1 fill:#ddd6fe,stroke:#6d28d9,color:#1f2937 style T2 fill:#ddd6fe,stroke:#6d28d9,color:#1f2937 style T3 fill:#ddd6fe,stroke:#6d28d9,color:#1f2937 style T4 fill:#ddd6fe,stroke:#6d28d9,color:#1f2937 %% Node Styling - Actions (emerald-200) style TO_A1 fill:#a7f3d0,stroke:#047857,color:#1f2937 style TO_A2 fill:#a7f3d0,stroke:#047857,color:#1f2937 style TR_A1 fill:#a7f3d0,stroke:#047857,color:#1f2937 style TR_A2 fill:#a7f3d0,stroke:#047857,color:#1f2937 style TR_A3 fill:#a7f3d0,stroke:#047857,color:#1f2937 %% Node Styling - External (orange-200) style ORDER_SVC fill:#fed7aa,stroke:#c2410c,color:#1f2937 style SHIP_API fill:#fed7aa,stroke:#c2410c,color:#1f2937 style PAY_API fill:#fed7aa,stroke:#c2410c,color:#1f2937 style CASE_OBJ fill:#fde68a,stroke:#b45309,color:#1f2937 %% Node Styling - Descriptions (slate-200) style DESC fill:#e2e8f0,stroke:#334155,color:#1f2937 style TO_DESC fill:#e2e8f0,stroke:#334155,color:#1f2937 style TO_SCOPE fill:#e2e8f0,stroke:#334155,color:#1f2937 style TR_DESC fill:#e2e8f0,stroke:#334155,color:#1f2937 style TR_SCOPE fill:#e2e8f0,stroke:#334155,color:#1f2937 style I1 fill:#e2e8f0,stroke:#334155,color:#1f2937 style I2 fill:#e2e8f0,stroke:#334155,color:#1f2937 style I3 fill:#e2e8f0,stroke:#334155,color:#1f2937 style I4 fill:#e2e8f0,stroke:#334155,color:#1f2937 %% Subgraph Styling - 50-level fills with dashed borders style agent fill:#fdf2f8,stroke:#be185d,stroke-dasharray:5 style topics fill:#f5f3ff,stroke:#6d28d9,stroke-dasharray:5 style instructions fill:#f8fafc,stroke:#334155,stroke-dasharray:5 style topic_order fill:#f5f3ff,stroke:#6d28d9,stroke-dasharray:5 style to_actions fill:#ecfdf5,stroke:#047857,stroke-dasharray:5 style topic_return fill:#f5f3ff,stroke:#6d28d9,stroke-dasharray:5 style tr_actions fill:#ecfdf5,stroke:#047857,stroke-dasharray:5 ``` ## Mermaid Template - Conver