Agent skill

External Diagram Mermaid Generate

by forcedotcom in forcedotcom/sf-skills

Salesforce architecture diagrams using Mermaid with ASCII fallback.

Apache-2.0Auto-check passedDevelopment

Install External Diagram Mermaid Generate

skills CLI
$ npx skills add forcedotcom/sf-skills --skill external-diagram-mermaid-generate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills external-diagram-mermaid-generate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/external-diagram-mermaid-generate .claude/skills/external-diagram-mermaid-generate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
external-diagram-mermaid-generate
GitHub stars
1.1k
Token cost
~2.7k tokens
SKILL.md length
820 words
Files
42 (incl. scripts, references, assets)
Skills in repo
252
Repo updated
First seen
Licence
Apache-2.0

At a glance

Salesforce architecture diagrams using Mermaid with ASCII fallback.

  • Works in 5 steps: Pick the right diagram structure → Gather data → Generate Mermaid first → …
  • Generating text-based diagrams for Salesforce architecture
  • SKILL.md covers Scope, Supported Diagram Families, Required Context to Gather First and Recommended Workflow, plus 7 more sections
  • Integration sequences

What it does

External Diagram Mermaid Generate is an agent skill from forcedotcom/sf-skills. Salesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user asks about non-Salesforce systems.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 45 other files, including scripts, reference files and assets (for example `README.md`, `assets/agentforce/agent-flow.md` and `assets/architecture/system-landscape.md`).

It sits in Development, covering Diagrams. It works with Mermaid and Salesforce. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • Generating text-based diagrams for Salesforce architecture
  • Integration sequences
  • Agentforce structure
  • : user says diagram

Example prompts

  • “diagram”
  • “visualize”
  • “/external-diagram-mermaid-generate”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Pick the right diagram structure
  2. Gather data
  3. Generate Mermaid first
  4. Add ASCII fallback when useful
  5. Explain the diagram briefly

What it can do on your machine

Read from SKILL.md and the folder at commit 4bbae5c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

External Diagram Mermaid Generate loads about 2.7k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 117 tokens; SKILL.md has 820 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit 4bbae5c, republished under its Apache-2.0 licence (© forcedotcom). 820 words, ~2,709 tokens.

Download SKILL.mdSave it as .claude/skills/external-diagram-mermaid-generate/SKILL.md (or your agent's skills folder). This skill also uses 41 other files; get the full folder from GitHub.
name
external-diagram-mermaid-generate
description
Salesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user asks about non-Salesforce systems.
metadata.version
1.0
metadata.domains
External
metadata.relatedSkills
agentforce-generate, automation-flow-generate, integration-connectivity-connected-app-configure, integration-connectivity-generate, platform-apex-generate…

external-diagram-mermaid-generate: Salesforce Diagram Generation

Use this skill when the user needs text-based diagrams: Mermaid diagrams for architecture, OAuth, integration flows, ERDs, or Agentforce structure, plus ASCII fallback when plain-text compatibility matters.

Scope

In Scope

Use external-diagram-mermaid-generate when the user wants:

  • Mermaid output
  • ASCII fallback diagrams
  • architecture, sequence, flowchart, or ERD views in markdown-friendly form
  • diagrams that can live directly in docs, READMEs, or issues
Out of Scope — Delegate elsewhere when the user wants:

Supported Diagram Families

TypePreferred Mermaid formTypical use
OAuth / auth flowssequenceDiagramAuthorization Code, JWT, PKCE, Device Flow
ERD / data modelflowchart LRobject relationships and sharing context
integration sequencesequenceDiagramrequest/response or event choreography
system landscapeflowcharthigh-level architecture
role / access hierarchyflowchartusers, profiles, permissions
Agentforce behavior mapflowchartagent → topic → action relationships

Required Context to Gather First

Ask for or infer:

  • diagram type
  • scope and entities / systems involved
  • output preference: Mermaid only, ASCII only, or both
  • whether styling should be minimal, documentation-first, or presentation-friendly
  • for ERDs: whether org metadata is available for grounding

1. Pick the right diagram structure
  • use sequenceDiagram for time-ordered interactions
  • use flowchart LR for ERDs and capability maps
  • keep a single primary story per diagram when possible
2. Gather data

For ERDs and grounded diagrams:

3. Generate Mermaid first

Apply:

  • accurate labels
  • simple readable node text
  • consistent relationship notation
  • restrained styling that renders cleanly in markdown viewers
4. Add ASCII fallback when useful

Provide an ASCII version when the user wants terminal compatibility or plaintext documentation.

5. Explain the diagram briefly

Call out the key relationships, flow direction, and any assumptions.


High-Signal Rules

For sequence diagrams
  • use autonumber when step order matters
  • distinguish requests vs responses clearly
  • use notes sparingly for protocol detail
For ERDs
  • prefer flowchart LR
  • keep object cards simple
  • use clear relationship arrows
  • avoid field overload unless the user explicitly asks for field-level detail
  • color-code object types only when it improves readability
For ASCII output
  • keep width reasonable
  • align arrows and boxes consistently
  • optimize for readability over decoration

Output Format

markdown
## <Diagram Title>

### Mermaid Diagram
```mermaid
<diagram>
```

### ASCII Fallback
```text
<ascii>
```

### Notes
- <key point>
- <assumption or limitation>

Cross-Skill Integration

NeedDelegate toReason
real object / field definitionsplatform-custom-object-generate / platform-custom-field-generategrounded ERD generation
connected-app auth setup contextintegration-connectivity-connected-app-configureaccurate OAuth flows
Agentforce logic visualizationagentforce-generatesource-of-truth behavior details
Flow behavior diagramsautomation-flow-generateactual Flow logic grounding

Gotchas

IssueResolution
Mermaid renderer not availableProvide ASCII fallback automatically; note that the Mermaid block still carries the diagram for copy-paste into a renderer
ERD becomes unreadable with too many objectsSplit into sub-diagrams by domain (Sales, Service, etc.) and link them in prose
Sequence diagram step order unclearUse autonumber directive to make step ordering explicit
OAuth flow actors differ by grant typeRead the relevant asset template first before generating to avoid actor mismatch

Show full SKILL.md (329 more words)Show less

Reference File Index

Conventions & rules — read before generating
Styling
Preview
OAuth flow templates — load the matching template when generating OAuth diagrams
Data model ERD templates — load the matching template when generating ERDs
Other diagram templates

Output Expectations

Deliverables produced by this skill for each request:

  • Mermaid code block — fenced ```mermaid block ready to paste into GitHub, Confluence, or any Mermaid-capable renderer
  • ASCII fallback (when requested or when Mermaid renderer is unavailable) — text-only diagram using box/arrow characters
  • Brief explanation — 2-5 bullet points calling out key relationships, flow direction, and any assumptions or limitations in the diagram
  • For ERDs: object cards with field labels and relationship type annotations
  • For sequence diagrams: numbered steps (autonumber) with clear actor labels

Score Guide

ScoreMeaning
72–80production-ready diagram
60–71clear and useful with minor polish left
48–59functional but could be clearer
35–47needs structural improvement
< 35inaccurate or incomplete

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 41 other files (scripts, references, assets) in skills/external-diagram-mermaid-generate of forcedotcom/sf-skills.

  • SKILL.md
  • README.md
  • assets/agentforce/agent-flow.md
  • assets/architecture/system-landscape.md
  • assets/datamodel/b2b-commerce-erd.md
  • assets/datamodel/campaigns-erd.md
  • assets/datamodel/consent-erd.md
  • assets/datamodel/files-erd.md
  • assets/datamodel/forecasting-erd.md
  • assets/datamodel/fsl-erd.md
  • assets/datamodel/party-model-erd.md
  • assets/datamodel/quote-order-erd.md
  • assets/datamodel/revenue-cloud-erd.md
  • assets/datamodel/sales-cloud-erd.md
  • assets/datamodel/salesforce-erd.md
  • assets/datamodel/scheduler-erd.md
  • assets/datamodel/service-cloud-erd.md
  • … and 25 more

Open the folder on GitHubat commit 4bbae5c

Compare with similar skills

External Diagram Mermaid Generate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

External Diagram Mermaid Generate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
External Diagram Mermaid Generate this skillforcedotcom/sf-skills1.1k—~2.7kAutomated safety check: PassApache-2.0
Sf Diagram MermaidJaganpro/sf-skills424—~1.4kAutomated safety check: PassMIT
Sf Diagram NanobananaproJaganpro/sf-skills424—~1.6kAutomated safety check: PassMIT
Archify Diagramstt-a1i/archify82k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design49k1 repos~7.6kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Sf Diagram Mermaid

    Jaganpro/sf-skills

    Salesforce architecture diagrams using Mermaid with ASCII fallback.

    424 GitHub stars~1.4k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Sf Diagram Nanobananapro

    Jaganpro/sf-skills

    AI-powered image generation for Salesforce visuals via Nano Banana Pro.

    424 GitHub stars~1.6k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    82k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    49k GitHub starsUsed in 1 repo~7.6k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check: notes
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from forcedotcom/sf-skills

All 252 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated yesterday
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated yesterday
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about External Diagram Mermaid Generate

What does External Diagram Mermaid Generate do?

Salesforce architecture diagrams using Mermaid with ASCII fallback. External Diagram Mermaid Generate is an agent skill from forcedotcom/sf-skills. Salesforce architecture diagrams using Mermaid with ASCII fallback.

When should I use External Diagram Mermaid Generate?

External Diagram Mermaid Generate fits situations like: generating text-based diagrams for Salesforce architecture; integration sequences; agentforce structure; : user says diagram.

How do I install External Diagram Mermaid Generate in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill external-diagram-mermaid-generate -a claude-code`. Or copy the skill folder (skills/external-diagram-mermaid-generate in forcedotcom/sf-skills) into .claude/skills/external-diagram-mermaid-generate in your project. Claude Code loads it when a task matches its description.

How do I install External Diagram Mermaid Generate in Codex?

Run `npx skills add forcedotcom/sf-skills --skill external-diagram-mermaid-generate -a codex`. Or copy the skill folder (skills/external-diagram-mermaid-generate in forcedotcom/sf-skills) into .agents/skills/external-diagram-mermaid-generate in your project. Codex loads it when a task matches its description.

Can I use External Diagram Mermaid Generate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill external-diagram-mermaid-generate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/external-diagram-mermaid-generate, .gemini/skills/external-diagram-mermaid-generate, .github/skills/external-diagram-mermaid-generate and .opencode/skills/external-diagram-mermaid-generate in your project.

What does External Diagram Mermaid Generate need to run?

SKILL.md names no scripts, command-line tools or credentials: External Diagram Mermaid Generate is instructions for the agent only.

Does External Diagram Mermaid Generate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is External Diagram Mermaid Generate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does External Diagram Mermaid Generate use?

External Diagram Mermaid Generate is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does External Diagram Mermaid Generate use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to External Diagram Mermaid Generate?

Skills that share tags, products or a category with External Diagram Mermaid Generate: Sf Diagram Mermaid (Jaganpro/sf-skills, 424 stars), Sf Diagram Nanobananapro (Jaganpro/sf-skills, 424 stars), Archify Diagrams (tt-a1i/archify, 82k stars) and Diagram Design (cathrynlavery/diagram-design, 49k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains External Diagram Mermaid Generate?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,067 GitHub stars. The repository holds 252 skills in this directory. The repository was last updated on October 9, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.