Dylan AndersenDylan Andersen's Docs
Cursor + SalesforceExpert Cursor

Screenshots & Diagrams

Drop Setup screenshots into chat so the agent can read them, generate Mermaid ERDs from object metadata, and make customer-facing visuals

A big part of SE work is turning something you see into something a customer understands. Screenshots of Salesforce Setup. Diagrams of the data model. Wireframes for a custom UI. Cursor is great at all three if you know which button to push.

Screenshots and Diagrams hero

Screenshots: the agent can read them

Cursor's chat accepts images. Drag a Setup screenshot in, or paste one from your clipboard, and the agent sees it the same way you do.

Three SE uses for this

Understanding what's in a customer org

You're on a discovery call, the customer shares a screenshot of their Validation Rules page, and you have two minutes to figure out what's wired up before the next question. Drop the screenshot into chat:

This is the Validation Rules list on the Opportunity object in the
customer's sandbox. For each rule, give me a one-line summary of what it
enforces and whether it looks like a blocker for the POC I'm scoping.

Turning a Setup screen into metadata

You see a Permission Set configured in one org. You want the same one in a new scratch. Screenshot the Object Settings page, drop it in:

Build me a Permission Set .permissionset-meta.xml that mirrors the object
and field permissions shown in this screenshot. The permission set name
is CS_Agent_Object_Access.

The agent reads the checkboxes, generates the metadata, and deploys it.

Debugging a visual problem

Screenshot a Lightning page where an LWC isn't rendering right, or a Flow screen where the layout is wrong. The agent can see what's off and propose the specific edit.

Limits of the screenshot path

  • Dense tables with 500 rows will lose precision. Crop to the section that matters.
  • The agent can't click anything in the image. It can only describe and transcribe.
  • Model quality matters here. Pick a vision-capable model (Claude Sonnet, GPT-4o-class) in the model picker before dropping an image.

Diagrams: Mermaid for structure, Nano Banana Pro for visuals

Two different tools, two different jobs.

Mermaid for technical diagrams

The sf-diagram-mermaid skill generates ERDs, sequence diagrams, and flowcharts from your actual metadata. These are fast, text-based, render live in Fumadocs, and live cleanly in git alongside the project.

Example prompt:

Activate sf-diagram-mermaid. Read the object files in
@force-app/main/default/objects/ and produce an ERD showing every custom
object and its relationships to the standard objects it references.

The skill returns a Mermaid block you can paste into a hand-off doc:

erDiagram
    Account ||--o{ CustomerInsight__c : has
    Contact ||--o{ CustomerInsight__c : links_to
    CustomerInsight__c {
        string Name
        decimal Score__c
        lookup Account__c
    }

Fumadocs renders it live. Commit the source. The diagram always stays in sync with the code.

Other Mermaid diagrams that work well for SEs:

  • Sequence diagrams of Agentforce flows: user turn, agent routing, action invocation, response.
  • Flowcharts of Flow automation: trigger, decision nodes, actions.
  • Class diagrams of Apex service layers.

Nano Banana Pro for customer-facing visuals

The sf-diagram-nanobananapro skill is for when you need an image, not a text diagram. UI mockups, architecture posters, "the pitch slide."

Activate sf-diagram-nanobananapro. Generate a PNG showing a three-layer
architecture diagram: Salesforce CRM at the top, Agentforce in the middle
talking to Data 360 at the bottom. Keep the colour palette to Salesforce
blue and white. Output should be 1920x1080.

The skill writes the image to disk, shows it in chat, and you drop it into a customer deck. No design tool needed.

Picking between them

You needUse
ERD the customer will annotate in a code reviewMermaid
Pitch slide for the kickoff deckNano Banana Pro
Sequence diagram of the agent's topic routingMermaid
Architecture poster for the office wallNano Banana Pro
Flowchart that lives in the hand-off docMermaid
Hero image for the customer-facing docs siteNano Banana Pro

Default to Mermaid. It's text, it diffs cleanly in git, and it renders automatically. Use Nano Banana Pro when the audience is going to look at a final PDF, not a repo.

ASCII fallbacks

When you need a diagram inside a plain-text context (agent prompt, README, debug log), Mermaid's not enough. Both diagram skills know how to produce ASCII art as a backup:

Produce an ASCII fallback of the architecture diagram for when this is
rendered inside a terminal-only context.

Result:

+--------------------+
|  Salesforce CRM    |
+----------+---------+
           |
+----------v---------+
|  Agentforce Agent  |
+----------+---------+
           |
+----------v---------+
|  Data 360          |
+--------------------+

Fine for engineering reviews and debug threads. Not for customer-facing decks.

Building a full visual for a hand-off doc

A realistic arc:

  1. Mermaid ERD of the data model, from object metadata.
  2. Mermaid sequence diagram of the agent's topic routing, from the agent metadata.
  3. A screenshot of the Lightning page the user lands on, dropped into the doc.
  4. One Nano Banana Pro poster for the cover page of the hand-off PDF.

Ask Cursor to produce all four in parallel using subagents.

Common traps

The agent hallucinates the ERD

If you asked for an ERD but didn't point at the actual metadata, the agent will guess based on defaults. Always give it @force-app/main/default/objects/ or the specific files.

Mermaid renders but looks messy

erDiagram and flowchart TD layouts get crowded fast. Break a dense diagram into two narrower ones. A diagram that doesn't fit on a single screen isn't doing its job.

The screenshot shows an error with small text

Upscale before pasting. Or crop to the error message area and re-screenshot at higher zoom. The agent reads legible text reliably; it guesses at blurry text.

Nano Banana Pro output looks off-brand

Include your colour palette, font guidance, and a reference image in the prompt. The skill accepts reference paths. Use them.

Verification

A good diagram passes a 10-second test: show it to a colleague who wasn't in the meeting and see if they can explain what it depicts. If they can't, the diagram is too dense or the labels are wrong. Regenerate with a tighter scope.

Next moves

  • Install sf-diagram-mermaid and sf-diagram-nanobananapro if you haven't.
  • POCs & Hand-off Docs for where these visuals live in the deliverable.
  • Project Anatomy if you want an ERD of the repo itself rather than the data model.

On this page