Loading...
Loading...
Compare original and translation side by side
| Type | Mermaid Syntax | Use Case |
|---|---|---|
| OAuth Flows | | Authorization Code, JWT Bearer, PKCE, Device Flow |
| Data Models | | Object relationships with color coding (preferred) |
| Integration Sequences | | API callouts, event-driven flows |
| System Landscapes | | High-level architecture, component diagrams |
| Role Hierarchies | | User hierarchies, profile/permission structures |
| Agentforce Flows | | Agent → Topic → Action flows |
| 类型 | Mermaid语法 | 使用场景 |
|---|---|---|
| OAuth流程 | | 授权码、JWT Bearer、PKCE、设备授权流程 |
| 数据模型 | | 带颜色编码的对象关系图(推荐格式) |
| 集成序列 | | API调用、事件驱动流程 |
| 系统架构 | | 高层级架构、组件图 |
| 角色层级 | | 用户层级、配置文件/权限结构 |
| Agentforce流程 | | Agent → Topic → Action 流程 |
| Diagram Type | Template File |
|---|---|
| Authorization Code Flow | |
| Authorization Code + PKCE | |
| JWT Bearer Flow | |
| Client Credentials Flow | |
| Device Authorization Flow | |
| Refresh Token Flow | |
| Data Model (ERD) | |
| Integration Sequence | |
| System Landscape | |
| Role Hierarchy | |
| Agentforce Flow | |
~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/assets/[template][project-root]/sf-diagram-mermaid/assets/[template]~/.claude/plugins/cache/sf-diagram-mermaid/*/sf-diagram-mermaid/assets/[template]Read: ~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/assets/oauth/jwt-bearer.md| 图表类型 | 模板文件 |
|---|---|
| 授权码流程 | |
| 授权码+PKCE | |
| JWT Bearer流程 | |
| 客户端凭证流程 | |
| 设备授权流程 | |
| 刷新令牌流程 | |
| 数据模型(ERD) | |
| 集成序列 | |
| 系统架构 | |
| 角色层级 | |
| Agentforce流程 | |
~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/assets/[template][project-root]/sf-diagram-mermaid/assets/[template]~/.claude/plugins/cache/sf-diagram-mermaid/*/sf-diagram-mermaid/assets/[template]读取: ~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/assets/oauth/jwt-bearer.mdpython3 scripts/query-org-metadata.py --objects Account,Contact --target-org myorgflowchart LRpython3 scripts/query-org-metadata.py --objects Account,Contact --target-org myorgflowchart LRreferences/color-palette.mdflowchart LR┌ ─ ┐ │ └ ┘ ├ ┤ ┬ ┴ ┼──><──────┼─Score: XX/80 ⭐⭐⭐⭐ Rating
├─ Accuracy: XX/20 (Correct actors, flow steps, relationships)
├─ Clarity: XX/20 (Easy to read, proper labeling)
├─ Completeness: XX/15 (All relevant steps/entities included)
├─ Styling: XX/15 (Color scheme, theming, annotations)
└─ Best Practices: XX/10 (Proper notation, UML conventions)references/color-palette.mdflowchart LR┌ ─ ┐ │ └ ┘ ├ ┤ ┬ ┴ ┼──><──────┼─评分: XX/80 ⭐⭐⭐⭐ 评级
├─ 准确性: XX/20 (参与者、流程步骤、关系正确)
├─ 清晰度: XX/20 (易于阅读、标签规范)
├─ 完整性: XX/15 (包含所有相关步骤/实体)
├─ 样式: XX/15 (配色方案、主题、注释)
└─ 最佳实践: XX/10 (规范符号、UML约定)undefinedundefined[Generated Mermaid code][生成的Mermaid代码][Generated ASCII diagram][生成的ASCII图表]undefinedundefined%%{init: {"flowchart": {"nodeSpacing": 80, "rankSpacing": 70}} }%%
style A fill:#fbcfe8,stroke:#be185d,color:#1f2937%%{init: {"flowchart": {"nodeSpacing": 80, "rankSpacing": 70}} }%%
style A fill:#fbcfe8,stroke:#be185d,color:#1f2937| Rating | Score | Meaning |
|---|---|---|
| ⭐⭐⭐⭐⭐ Excellent | 72-80 | Production-ready, comprehensive, well-styled |
| ⭐⭐⭐⭐ Very Good | 60-71 | Complete with minor improvements possible |
| ⭐⭐⭐ Good | 48-59 | Functional but could be clearer |
| ⭐⭐ Needs Work | 35-47 | Missing key elements or unclear |
| ⭐ Critical Issues | <35 | Inaccurate or incomplete |
| 评级 | 分数 | 说明 |
|---|---|---|
| ⭐⭐⭐⭐⭐ 优秀 | 72-80 | 可用于生产环境、内容全面、样式规范 |
| ⭐⭐⭐⭐ 非常好 | 60-71 | 内容完整,仅需少量改进 |
| ⭐⭐⭐ 良好 | 48-59 | 功能可用,但可提升清晰度 |
| ⭐⭐ 需要改进 | 35-47 | 缺少关键元素或内容模糊 |
| ⭐ 严重问题 | <35 | 内容不准确或不完整 |
| Flow | Use Case | Key Detail | Template |
|---|---|---|---|
| Authorization Code | Web apps with backend | User → Browser → App → SF | |
| Auth Code + PKCE | Mobile, SPAs, public clients | code_verifier + SHA256 challenge | |
| JWT Bearer | Server-to-server, CI/CD | Sign JWT with private key | |
| Client Credentials | Service accounts, background | No user context | |
| Device Authorization | CLI, IoT, Smart TVs | Poll for token after user auth | |
| Refresh Token | Extend access | Reuse existing tokens | |
assets/oauth/| 流程 | 使用场景 | 关键细节 | 模板 |
|---|---|---|---|
| 授权码流程 | 带后端的Web应用 | 用户 → 浏览器 → 应用 → SF | |
| 授权码+PKCE | 移动应用、SPA、公共客户端 | code_verifier + SHA256挑战 | |
| JWT Bearer流程 | 服务器到服务器、CI/CD | 使用私钥签署JWT | |
| 客户端凭证流程 | 服务账户、后台任务 | 无用户上下文 | |
| 设备授权流程 | CLI、IoT、智能电视 | 用户授权后轮询令牌 | |
| 刷新令牌流程 | 延长访问权限 | 重用现有令牌 | |
assets/oauth/flowchart LRflowchart LRflowchart LR==>flowchart LR==>--> Lookup (LK) - optional parent, no cascade delete
==> Master-Detail (MD) - required parent, cascade delete
-.-> Conversion/special relationship (e.g., Lead converts)--> Lookup(查找关系)- 可选父对象,无级联删除
==> 主从关系(MD)- 必填父对象,级联删除
-.-> 转换/特殊关系(例如:Lead转换)ObjectName["ObjectName<br/>(record count)"]Account["Account<br/>(317)"]ObjectName["ObjectName<br/>(记录数)"]Account["Account<br/>(317)"]| Object Type | Color | Fill | Stroke |
|---|---|---|---|
| Standard Objects | Sky Blue | | |
Custom Objects ( | Orange | | |
External Objects ( | Green | | |
| 对象类型 | 颜色 | 填充色 | 描边色 |
|---|---|---|---|
| 标准对象 | 天蓝色 | | |
自定义对象( | 橙色 | | |
外部对象( | 绿色 | | |
python3 ~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/scripts/query-org-metadata.py \
--objects Account,Contact,Opportunity \
--target-org myorgLDV[~4M]python3 ~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/scripts/query-org-metadata.py \
--objects Account,Contact,Opportunity \
--target-org myorgLDV[~4M]OWD:PrivateOWD:ReadWriteOWD:ParentOWD:PrivateOWD:ReadWriteOWD:Parent| Label | Type | Arrow Style | Behavior |
|---|---|---|---|
| Lookup | | Optional parent, no cascade |
| Master-Detail | | Required parent, cascade delete |
-->==>| 标签 | 类型 | 箭头样式 | 行为 |
|---|---|---|---|
| 查找关系 | | 可选父对象,无级联删除 |
| 主从关系 | | 必填父对象,级联删除 |
-->==>| Template | Objects | Path |
|---|---|---|
| Core | Account, Contact, Opportunity, Case | |
| Sales Cloud | Account, Contact, Lead, Opportunity, Product, Campaign | |
| Service Cloud | Case, Entitlement, Knowledge, ServiceContract | |
| Campaigns | Campaign, CampaignMember, CampaignInfluence | |
| Territory Management | Territory2, Territory2Model, UserTerritory2Association | |
| Party Model | AccountContactRelation, ContactContactRelation | |
| Quote & Order | Quote, QuoteLineItem, Order, OrderItem | |
| Forecasting | ForecastingItem, ForecastingQuota, OpportunitySplit | |
| Consent (GDPR) | Individual, ContactPointEmail, DataUsePurpose | |
| Files | ContentDocument, ContentVersion, ContentDocumentLink | |
| Scheduler | ServiceAppointment, ServiceResource, ServiceTerritory | |
| Field Service | WorkOrder, ServiceAppointment, TimeSheet | |
| B2B Commerce | WebStore, WebCart, BuyerGroup, BuyerAccount | |
| Revenue Cloud | ProductCatalog, ProductSellingModel, PriceAdjustment | |
| 模板 | 对象 | 路径 |
|---|---|---|
| 核心模型 | Account, Contact, Opportunity, Case | |
| 销售云 | Account, Contact, Lead, Opportunity, Product, Campaign | |
| 服务云 | Case, Entitlement, Knowledge, ServiceContract | |
| 营销活动 | Campaign, CampaignMember, CampaignInfluence | |
| 区域管理 | Territory2, Territory2Model, UserTerritory2Association | |
| 参与方模型 | AccountContactRelation, ContactContactRelation | |
| 报价与订单 | Quote, QuoteLineItem, Order, OrderItem | |
| 预测 | ForecastingItem, ForecastingQuota, OpportunitySplit | |
| 合规(GDPR) | Individual, ContactPointEmail, DataUsePurpose | |
| 文件 | ContentDocument, ContentVersion, ContentDocumentLink | |
| 调度器 | ServiceAppointment, ServiceResource, ServiceTerritory | |
| 现场服务 | WorkOrder, ServiceAppointment, TimeSheet | |
| B2B商务 | WebStore, WebCart, BuyerGroup, BuyerAccount | |
| 收入云 | ProductCatalog, ProductSellingModel, PriceAdjustment | |
references/erd-conventions.md[STD][CUST][EXT]references/erd-conventions.md[STD][CUST][EXT]autonumber->>-->>activatedeactivateboxNote overautonumber->>-->>activatedeactivateboxNote overflowchart LR-->==>Accountflowchart LR-->==>Accountaltelse-)altelse-)| Skill | When to Use | Example |
|---|---|---|
| sf-metadata | Get real object/field definitions for ERD | Use the sf-metadata skill: "Describe Lead object" |
| sf-connected-apps | Link OAuth flow to Connected App setup | "Generate JWT Bearer diagram for this Connected App" |
| sf-ai-agentscript | Visualize Agentforce agent architecture | "Create flow diagram for FAQ Agent" |
| sf-flow | Document Flow logic as flowchart | "Diagram the approval process flow" |
| 技能 | 使用场景 | 示例 |
|---|---|---|
| sf-metadata | 为ERD获取真实的对象/字段定义 | 使用sf-metadata技能:“描述Lead对象” |
| sf-connected-apps | 将OAuth流程与Connected App设置关联 | “为该Connected App生成JWT Bearer图表” |
| sf-ai-agentscript | 可视化Agentforce代理架构 | “为FAQ Agent创建流程图” |
| sf-flow | 将Flow逻辑文档化为流程图 | “绘制审批流程的图表” |
User: "Create a JWT Bearer OAuth flow diagram"
You should:
1. Load assets/oauth/jwt-bearer.md
2. Generate Mermaid sequenceDiagram
3. Generate ASCII fallback
4. Score and deliver用户: "创建一个JWT Bearer OAuth流程图表"
你需要:
1. 加载assets/oauth/jwt-bearer.md
2. 生成Mermaid sequenceDiagram
3. 生成ASCII备选格式
4. 评分并交付User: "Create an ERD for Account, Contact, Opportunity, and Case"
You should:
1. If org connected: Query record counts via query-org-metadata.py
2. Load assets/datamodel/salesforce-erd.md (or cloud-specific template)
3. Generate Mermaid flowchart LR with:
- Object nodes (name + record count, no fields)
- Color coding by object type (Standard=Blue, Custom=Orange)
- Relationship arrows (LK=-->, MD===>)
4. Generate ASCII fallback
5. Score and deliver用户: "为Account、Contact、Opportunity和Case创建ERD图"
你需要:
1. 如果已连接组织:通过query-org-metadata.py查询记录数
2. 加载assets/datamodel/salesforce-erd.md(或云特定模板)
3. 生成Mermaid flowchart LR图,包含:
- 对象节点(名称+记录数)
- 按对象类型颜色编码(蓝色=标准、橙色=自定义)
- 关系箭头(查找关系=-->, 主从关系===>)
4. 生成ASCII备选格式
5. 评分并交付User: "Diagram our Salesforce to SAP integration flow"
You should:
1. Ask clarifying questions (sync/async, trigger, protocol)
2. Load assets/integration/api-sequence.md
3. Generate Mermaid sequenceDiagram
4. Generate ASCII fallback
5. Score and deliver用户: "绘制我们的Salesforce到SAP的集成流程图表"
你需要:
1. 询问澄清问题(同步/异步、触发器、协议)
2. 加载assets/integration/api-sequence.md
3. 生成Mermaid sequenceDiagram
4. 生成ASCII备选格式
5. 评分并交付