sf-diagram

sf-diagram is a skill for Claude Code from Clientell-Ai/salesforce-skills. It costs 97 tokens per session (3,779 once invoked), scanned A, original, Apache-2.0.

A diagram generator for Salesforce projects, using real organisation metadata, code, and workflow definitions to produce Mermaid diagrams. Mermaid is a text format for describing diagrams such as relationship, class, sequence, and process diagrams.

In plain words
What is it for?
Use it to create Salesforce data-relationship diagrams, code class diagrams, workflow visualisations, sequence diagrams, and deployment dependency graphs.
Why use it?
It turns Salesforce structures and dependencies into diagrams grounded in the project's actual files, making complex systems easier to inspect.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to create Salesforce data-relationship diagrams, code class diagrams, workflow visualisations, sequence diagrams, and deployment dependency graphs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/clientell-ai/salesforce-skills/sf-diagram
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Clientell-Ai/salesforce-skills --skill sf-diagram
Clone the repo
git clone --depth 1 https://github.com/Clientell-Ai/salesforce-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sf-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-diagram/github.svg)](https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-diagram)
Your own site
<a href="https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-diagram"><img src="https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sf-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/clientell-ai/salesforce-skills/sf-diagram"><img src="https://agentmods.dev/badge/skills/clientell-ai/salesforce-skills/sf-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,779 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00097 $0.03779
Opus 5 $0.00048 $0.01889
Sonnet 5 $0.00019 $0.00756
Haiku 4.5 $0.00010 $0.00378

Measured 12d ago against content hash 5ab778f17138, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

sf-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sf-diagram/SKILL.md · 392 lines

How it starts

The opening of the file, as written. The whole thing — 392 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Salesforce Diagram Generator

You are a Salesforce architecture diagramming specialist. Generate accurate Mermaid diagrams by reading real org metadata, Apex source, and Flow definitions. Every diagram must be grounded in actual project files when available.

1. Entity Relationship Diagrams (ERDs)

Generate Mermaid erDiagram from Salesforce custom objects and their relationships.

How to Build an ERD

  1. Find object metadata — Use Glob to locate .object-meta.xml files:

    Glob: force-app/**/objects/**/*.object-meta.xml
    
  2. Find field metadata — Locate .field-meta.xml for each object:

    Glob: force-app/**/objects/*/fields/*.field-meta.xml
    
  3. Identify relationships — Read each field file and look for:

    • <type>Lookup</type> — optional relationship (zero-or-one to many)
    • <type>MasterDetail</type> — required relationship (one to many, cascade delete)
    • <referenceTo>ObjectName</referenceTo> — the related object
  4. Render as erDiagram (see diagram-reference.md for full templates):

erDiagram
    Account ||--o{ Contact : "has"
    Account ||--o{ Opportunity : "has"
    Opportunity ||--|{ OpportunityLineItem : "contains"
    Contact ||--o{ Case : "raised by"
    Account ||--o{ Case : "related to"
    Account {
        Id Id PK
        string Name
        string Industry
    }
    Contact {
        Id Id PK
        Id AccountId FK
        string LastName
        string Email
    }

Relationship Notation

Salesforce Relationship Mermaid Notation Meaning
Master-Detail ||--|{ One (required) to many
Lookup (required) ||--o{ One to many (optional parent)
Lookup (optional) }o--|| Many to zero-or-one
Many-to-Many (junction) Two ||--|{ Junction object with two master-details
Self-relationship Entity to itself e.g., Account hierarchy

Read the full file on GitHub · 392 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 392 lines · 97 tokens per session scan A 5ab778f17138

Subscribe to this mod's changes

sf-diagram is a skill published in the GitHub repository Clientell-Ai/salesforce-skills (15 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 97 tokens to every session and 3,779 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ijfw-ui-spec

Use when the user says: 'ui spec', 'design contract', 'ui audit setup', 'lock the design', 'visual contract', 'ui review setup', or '/ijfw-ui-spec'. Produces UI-SPEC.md as the visual design contract before any frontend or visual-artifact build, and dispatches ijfw-ui-auditor as the final 6-pillar gate.

FerroxLabs/ijfw · 83 tokens

ijfw-design

Use when the user says: 'design', 'redesign', 'UI', 'UX', 'dashboard', 'page', 'component', 'make it look better', 'polish', 'pretty', 'professional', 'user experience', 'layout', 'visual', 'accessibility', 'colors', 'typography', 'brand'.

FerroxLabs/ijfw · 72 tokens

techwolf-logo

Provides official TechWolf logo files in multiple variants (dark, white, monochrome) as SVG and PNG. Use when any output needs a TechWolf logo.

techwolf-ai/ai-first-toolkit · 36 tokens

design-maker

name: design-maker description: Used when the Design Brief is complete and the user needs to generate mockups. Reads Product-Spec.md and Design-Brief.md, then generates a complete set of design deliverables through a design tool MCP, including all pages, state variants, component specifications, design tokens…

zxpmail/ReqForge · 0 tokens

design-brief-builder

name: design-brief-builder description: Used when the user wants to define a design style or visual direction, or says something vague like 'I want a premium/sleek/modern look'. Guides the user through a design interview to clarify visual preferences and outputs Design-Brief.md. After Brief is saved, MUST run Next…

zxpmail/ReqForge · 0 tokens

anti-slop-design

Category-aware design skill that builds distinctive, production-grade UIs. Brand-vs-product register, color strategy commitment, scene-based theme choice, palettes, font pairings, UX patterns, shadcn/token integration, empty-error-loading copy, secondary slop signals, multimodal design parity from mocks, and a…

madebyaris/advance-minimax-m3-cursor-rules · 78 tokens