skills/sf-diagram-mermaid/SKILL.md
Salesforce architecture diagrams using Mermaid with ASCII fallback. 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 wants PNG/SVG image output (use sf-diagram-nanobananapro), or asks about non-Salesforce systems.
npx skillsauth add jaganpro/claude-code-sfskills sf-diagram-mermaidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Use sf-diagram-mermaid when the user wants:
Delegate elsewhere when the user wants:
| Type | Preferred Mermaid form | Typical use |
|---|---|---|
| OAuth / auth flows | sequenceDiagram | Authorization Code, JWT, PKCE, Device Flow |
| ERD / data model | flowchart LR | object relationships and sharing context |
| integration sequence | sequenceDiagram | request/response or event choreography |
| system landscape | flowchart | high-level architecture |
| role / access hierarchy | flowchart | users, profiles, permissions |
| Agentforce behavior map | flowchart | agent → topic → action relationships |
Ask for or infer:
sequenceDiagram for time-ordered interactionsflowchart LR for ERDs and capability mapsFor ERDs and grounded diagrams:
Apply:
Provide an ASCII version when the user wants terminal compatibility or plaintext documentation.
Call out the key relationships, flow direction, and any assumptions.
autonumber when step order mattersflowchart LR## <Diagram Title>
### Mermaid Diagram
```mermaid
<diagram>
```
### ASCII Fallback
```text
<ascii>
```
### Notes
- <key point>
- <assumption or limitation>
| Need | Delegate to | Reason | |---|---|---| | real object / field definitions | sf-metadata | grounded ERD generation | | rendered diagram / image output | sf-diagram-nanobananapro | visual polish beyond Mermaid | | connected-app auth setup context | sf-connected-apps | accurate OAuth flows | | Agentforce logic visualization | sf-ai-agentscript | source-of-truth behavior details | | Flow behavior diagrams | sf-flow | actual Flow logic grounding |
| Score | Meaning | |---|---| | 72–80 | production-ready diagram | | 60–71 | clear and useful with minor polish left | | 48–59 | functional but could be clearer | | 35–47 | needs structural improvement | | < 35 | inaccurate or incomplete |
development
Lightning Web Components with PICKLES methodology and 165-point scoring. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use sf-apex), Aura components, or Visualforce.
tools
Use this skill whenever users want to build, inspect, debug, automate, or publish workflows in Agentforce Grid (AI Workbench) using Salesforce plus the Grid MCP or direct Grid REST calls. Trigger it for Grid workbook creation, worksheet setup, Object/Reference/AI/Agent/AgentTest/Evaluation/PromptTemplate/InvocableAction column design, prompt drafting inside Grid, worksheet execution troubleshooting, Grid YAML `apply_grid` specs, and Windows-specific Grid setup issues. Also use it when users mention AI Workbench, Grid Studio, workbook IDs, worksheet IDs, Grid Connect, or ask for recipes like "top opportunities with AI email drafts", "agent test suite in Grid", or "build this worksheet from YAML". Do not use it for generic Salesforce work unrelated to Agentforce Grid.
development
Salesforce Flex Credit estimation for Agentforce and Data Cloud workloads. TRIGGER when: user needs cost projections, scenario planning, budget sizing, or architecture tradeoff analysis for Agentforce prompts/actions, Data Cloud meters, or monthly Flex Credit usage. DO NOT TRIGGER when: user is building Agentforce metadata or .agent files themselves (use sf-ai-agentforce or sf-ai-agentscript), implementing Data Cloud assets (use sf-datacloud-*), or asking for contract-specific commercial approval that depends on non-public pricing terms.
testing
Permission Set analysis, hierarchy viewer, and access auditing. TRIGGER when: user asks "who has access to X?", analyzes permission sets/groups, or touches .permissionset-meta.xml / .permissionsetgroup-meta.xml files. DO NOT TRIGGER when: creating new metadata (use sf-metadata), deploying permission sets (use sf-deploy), or Apex sharing logic (use sf-apex).