generating-mermaid-diagrams
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 wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.
What this skill does
# generating-mermaid-diagrams: 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 `generating-mermaid-diagrams` 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: - rendered PNG/SVG images or polished mockups → [generating-visual-diagrams](../generating-visual-diagrams/SKILL.md) - non-Salesforce systems only → use a more general diagramming skill - object discovery before an ERD → [generating-custom-object](../generating-custom-object/SKILL.md) or [generating-custom-field](../generating-custom-field/SKILL.md) --- ## Supported Diagram Families | 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 | --- ## 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 --- ## Recommended Workflow ### 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: - use [generating-custom-object](../generating-custom-object/SKILL.md) or [generating-custom-field](../generating-custom-field/SKILL.md) when real schema discovery is needed - optionally use the local metadata helper script for counts / relationship context when appropriate ### 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 | Need | Delegate to | Reason | |---|---|---| | real object / field definitions | [generating-custom-object](../generating-custom-object/SKILL.md) / [generating-custom-field](../generating-custom-field/SKILL.md) | grounded ERD generation | | rendered diagram / image output | [generating-visual-diagrams](../generating-visual-diagrams/SKILL.md) | visual polish beyond Mermaid | | connected-app auth setup context | [configuring-connected-apps](../configuring-connected-apps/SKILL.md) | accurate OAuth flows | | Agentforce logic visualization | [developing-agentforce](../developing-agentforce/SKILL.md) | source-of-truth behavior details | | Flow behavior diagrams | [generating-flow](../generating-flow/SKILL.md) | actual Flow logic grounding | --- ## Gotchas | Issue | Resolution | |---|---| | Mermaid renderer not available | Provide ASCII fallback automatically; note that the Mermaid block still carries the diagram for copy-paste into a renderer | | ERD becomes unreadable with too many objects | Split into sub-diagrams by domain (Sales, Service, etc.) and link them in prose | | Sequence diagram step order unclear | Use `autonumber` directive to make step ordering explicit | | OAuth flow actors differ by grant type | Read the relevant asset template first before generating to avoid actor mismatch | --- ## Reference File Index ### Conventions & rules — read before generating - [references/diagram-conventions.md](references/diagram-conventions.md) — consistency rules for all diagram types - [references/mermaid-reference.md](references/mermaid-reference.md) — Mermaid syntax quick reference - [references/usage-examples.md](references/usage-examples.md) — worked examples per diagram type ### Styling - [references/mermaid-styling.md](references/mermaid-styling.md) — theming and annotation patterns - [references/color-palette.md](references/color-palette.md) — color-blind-friendly palette with hex values - [references/erd-conventions.md](references/erd-conventions.md) — ERD-specific layout and notation rules ### Preview - [references/preview-guide.md](references/preview-guide.md) — how to render Mermaid locally - [scripts/README.md](scripts/README.md) — setup and usage instructions for all scripts in this skill - [scripts/mermaid_preview.py](scripts/mermaid_preview.py) — live-reload preview server; run to preview diagrams in browser - [scripts/query-org-metadata.py](scripts/query-org-metadata.py) — queries org schema to ground ERD generation ### OAuth flow templates — load the matching template when generating OAuth diagrams - [assets/oauth/authorization-code.md](assets/oauth/authorization-code.md) — Authorization Code grant - [assets/oauth/authorization-code-pkce.md](assets/oauth/authorization-code-pkce.md) — PKCE variant for mobile/SPA - [assets/oauth/jwt-bearer.md](assets/oauth/jwt-bearer.md) — JWT Bearer server-to-server - [assets/oauth/client-credentials.md](assets/oauth/client-credentials.md) — Client Credentials service accounts - [assets/oauth/device-authorization.md](assets/oauth/device-authorization.md) — Device Flow for CLI/IoT - [assets/oauth/refresh-token.md](assets/oauth/refresh-token.md) — Refresh Token renewal flow - [assets/oauth/user-agent-social-sign-on.md](assets/oauth/user-agent-social-sign-on.md) — User-Agent / Social Sign-On ### Data model ERD templates — load the matching template when generating ERDs - [assets/datamodel/salesforce-erd.md](assets/datamodel/salesforce-erd.md) — core Salesforce objects - [assets/datamodel/sales-cloud-erd.md](assets/datamodel/sales-cloud-erd.md) — Sales Cloud objects - [assets/datamodel/service-cloud-erd.md](assets/datamodel/service-cloud-erd.md) — Service Cloud objects - [assets/datamodel/b2b-commerce-erd.md](assets/datamodel/b2b-commerce-erd.md) — B2B Commerce objects - [assets/datamodel/campaigns-erd.md](assets/datamodel/campaigns-erd.md) — Campaigns and campaign member model - [assets/datamodel/consent-erd.md](assets/datamodel/consent-erd.md) — Consent and privacy objects - [assets/datamodel/files-erd.md](assets/datamodel/files-erd.md) — Files and ContentDocument model - [assets/datamodel/forecasting-erd.md](assets/datamodel/forecasting-erd.md) — Forecasting objects - [assets/datamodel/fsl-erd.md](assets/datamodel/fsl-erd.md) — Field Service Lightning objects - [assets/datamodel/party-model-erd.md](assets/datamodel/party-model-erd.md) — Party model objects - [assets/datamodel/qu
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
ponyflash
IncludedGenerate images, videos, speech audio, and music using the PonyFlash Python SDK. Also handle local media editing with FFmpeg, including clip, concat, transcode, extract audio, frame capture, subtitle capability checks, and ASS subtitle prep. Use when the user asks to create, generate, produce, edit, trim, merge, concatenate, transcode, subtitle, or render AI-generated media content.