sf-ai-agentforce: Standard Agentforce Platform Development Use this skill for the Setup UI / Agent Builder path: declarative topics, Builder-managed actions, / metadata, Prompt Builder templates stored as metadata , Models API usage from Apex, and custom Lightning types. For new code-first agent development, prefer sf-ai-agentscript. If the work produces or edits a file — including Builder Script / Canvas work that results in an authoring bundle — use sf-ai-agentscript. When This Skill Owns the Task Use when the user is: - maintaining existing Builder-based agents - working in Setup → Agentfo…

+ opp.Amount + '\\n' +\n 'Description: ' + opp.Description + '\\n\\n' +\n 'Summarize in 2-3 sentences focusing on key points.';\n\n // Use same API pattern as Queueable\n aiplatform.ModelsAPI.createGenerations_Request request =\n new aiplatform.ModelsAPI.createGenerations_Request();\n request.modelName = 'sfdc_ai__DefaultOpenAIGPT4OmniMini';\n\n aiplatform.ModelsAPI_GenerationRequest genRequest =\n new aiplatform.ModelsAPI_GenerationRequest();\n genRequest.prompt = prompt;\n request.body = genRequest;\n\n aiplatform.ModelsAPI.createGenerations_Response response =\n aiplatform.ModelsAPI.createGenerations(request);\n\n if (response.Code200 != null &&\n response.Code200.generations != null &&\n !response.Code200.generations.isEmpty()) {\n return response.Code200.generations[0].text;\n }\n\n return null;\n }\n}\n```\n\n### Batch Size Considerations\n\n| Batch Size | AI Calls/Batch | Recommended For |\n|------------|----------------|-----------------|\n| 1-5 | 1-5 | Complex prompts, detailed output |\n| 10-20 | 10-20 | Standard summaries |\n| 50+ | Avoid | Risk of timeout, use smaller batches |\n\n```apex\n// Execute with smaller batch size for AI processing\nDatabase.executeBatch(new OpportunitySummaryBatch(), 10);\n```\n\n---\n\n## Chatter Integration\n\nPost AI-generated content to Chatter:\n\n```apex\npublic with sharing class ChatterAIService {\n\n /**\n * @description Generate and post AI insight to Chatter\n * @param recordId The record to analyze\n * @param feedMessage Additional context for the post\n */\n public static void postAIInsight(Id recordId, String feedMessage) {\n // Query record context\n Account acc = [\n SELECT Name, Industry, AnnualRevenue, Description\n FROM Account\n WHERE Id = :recordId\n LIMIT 1\n ];\n\n // Generate insight using Models API\n String prompt = 'Analyze this account and provide 3 key business insights:\\n\\n' +\n 'Company: ' + acc.Name + '\\n' +\n 'Industry: ' + acc.Industry + '\\n' +\n 'Revenue:

sf-ai-agentforce: Standard Agentforce Platform Development Use this skill for the Setup UI / Agent Builder path: declarative topics, Builder-managed actions, / metadata, Prompt Builder templates stored as metadata , Models API usage from Apex, and custom Lightning types. For new code-first agent development, prefer sf-ai-agentscript. If the work produces or edits a file — including Builder Script / Canvas work that results in an authoring bundle — use sf-ai-agentscript. When This Skill Owns the Task Use when the user is: - maintaining existing Builder-based agents - working in Setup → Agentfo…

+ acc.AnnualRevenue + '\\n' +\n 'Description: ' + acc.Description + '\\n\\n' +\n 'Format as numbered bullet points.';\n\n String insight = generateText(prompt);\n\n if (String.isNotBlank(insight)) {\n // Create Chatter post\n ConnectApi.FeedItemInput feedInput = new ConnectApi.FeedItemInput();\n ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();\n ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput();\n\n textSegment.text = '🤖 AI Account Insight:\\n\\n' + insight;\n messageInput.messageSegments = new List\u003cConnectApi.MessageSegmentInput>{ textSegment };\n feedInput.body = messageInput;\n feedInput.feedElementType = ConnectApi.FeedElementType.FeedItem;\n feedInput.subjectId = recordId;\n\n ConnectApi.ChatterFeeds.postFeedElement(\n Network.getNetworkId(),\n feedInput\n );\n }\n }\n\n private static String generateText(String prompt) {\n aiplatform.ModelsAPI.createGenerations_Request request =\n new aiplatform.ModelsAPI.createGenerations_Request();\n request.modelName = 'sfdc_ai__DefaultOpenAIGPT4OmniMini';\n\n aiplatform.ModelsAPI_GenerationRequest genRequest =\n new aiplatform.ModelsAPI_GenerationRequest();\n genRequest.prompt = prompt;\n request.body = genRequest;\n\n aiplatform.ModelsAPI.createGenerations_Response response =\n aiplatform.ModelsAPI.createGenerations(request);\n\n if (response.Code200 != null &&\n response.Code200.generations != null &&\n !response.Code200.generations.isEmpty()) {\n return response.Code200.generations[0].text;\n }\n\n return null;\n }\n}\n```\n\n---\n\n## Governor Limits & Best Practices\n\n### Limits to Consider\n\n| Limit | Value | Mitigation |\n|-------|-------|------------|\n| Callout time | 120s total | Use smaller batches, Queueable chaining |\n| Callouts per transaction | 100 | Batch records, use async |\n| CPU time | 10s sync, 60s async | Use Queueable/Batch |\n| Heap size | 6MB sync, 12MB async | Limit prompt/response size |\n\n### Best Practices\n\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│ MODELS API BEST PRACTICES │\n├─────────────────────────────────────────────────────────────────────────────┤\n│ │\n│ ARCHITECTURE │\n│ ───────────────────────────────────────────────────────────────────────── │\n│ ✅ Use Queueable for single-record async processing │\n│ ✅ Use Batch for bulk processing (scope size 10-20) │\n│ ✅ Use Platform Events for notification when AI completes │\n│ ✅ Cache common AI responses if possible │\n│ ❌ Don't call Models API synchronously in triggers │\n│ ❌ Don't process unbounded record sets │\n│ │\n│ PROMPTS │\n│ ───────────────────────────────────────────────────────────────────────── │\n│ ✅ Be specific about expected output format │\n│ ✅ Set length constraints (\"summarize in 2 sentences\") │\n│ ✅ Include context needed for accurate responses │\n│ ❌ Don't include PII in prompts unless necessary │\n│ ❌ Don't rely on AI for compliance-critical decisions │\n│ │\n│ ERROR HANDLING │\n│ ───────────────────────────────────────────────────────────────────────── │\n│ ✅ Wrap API calls in try-catch │\n│ ✅ Log errors with context for debugging │\n│ ✅ Implement retry logic for transient failures │\n│ ✅ Check response.Code200 before accessing results │\n│ ❌ Don't assume AI responses are always successful │\n│ │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Common Patterns\n\n### Pattern 1: Service Layer Abstraction\n\n```apex\npublic with sharing class AIGenerationService {\n\n private static final String DEFAULT_MODEL = 'sfdc_ai__DefaultOpenAIGPT4OmniMini';\n\n /**\n * @description Generate text with standard configuration\n */\n public static String generate(String prompt) {\n return generate(prompt, DEFAULT_MODEL);\n }\n\n /**\n * @description Generate text with specific model\n */\n public static String generate(String prompt, String modelName) {\n try {\n aiplatform.ModelsAPI.createGenerations_Request request =\n new aiplatform.ModelsAPI.createGenerations_Request();\n request.modelName = modelName;\n\n aiplatform.ModelsAPI_GenerationRequest genRequest =\n new aiplatform.ModelsAPI_GenerationRequest();\n genRequest.prompt = prompt;\n request.body = genRequest;\n\n aiplatform.ModelsAPI.createGenerations_Response response =\n aiplatform.ModelsAPI.createGenerations(request);\n\n if (response.Code200 != null &&\n response.Code200.generations != null &&\n !response.Code200.generations.isEmpty()) {\n return response.Code200.generations[0].text;\n }\n } catch (Exception e) {\n System.debug(LoggingLevel.ERROR, 'AI Generation Error: ' + e.getMessage());\n }\n\n return null;\n }\n}\n```\n\n### Pattern 2: Notify Completion via Platform Events\n\n```apex\n// Platform Event: AI_Generation_Complete__e\n// Fields: Record_Id__c (Text), Status__c (Text), Summary__c (Long Text)\n\npublic with sharing class AIQueueableWithNotification\n implements Queueable, Database.AllowsCallouts {\n\n private Id recordId;\n\n public AIQueueableWithNotification(Id recordId) {\n this.recordId = recordId;\n }\n\n public void execute(QueueableContext context) {\n String summary;\n String status = 'Success';\n\n try {\n // Generate AI content\n summary = AIGenerationService.generate('...');\n } catch (Exception e) {\n status = 'Error: ' + e.getMessage();\n }\n\n // Publish completion event\n AI_Generation_Complete__e event = new AI_Generation_Complete__e();\n event.Record_Id__c = recordId;\n event.Status__c = status;\n event.Summary__c = summary;\n\n EventBus.publish(event);\n }\n}\n```\n\n### Pattern 3: LWC Subscribes to Completion\n\n```javascript\n// In your LWC controller\nimport { subscribe, unsubscribe, onError } from 'lightning/empApi';\n\nconnectedCallback() {\n this.subscribeToAICompletion();\n}\n\nsubscribeToAICompletion() {\n const channelName = '/event/AI_Generation_Complete__e';\n\n subscribe(channelName, -1, (message) => {\n const payload = message.data.payload;\n\n if (payload.Record_Id__c === this.recordId) {\n this.aiSummary = payload.Summary__c;\n this.isLoading = false;\n }\n }).then((response) => {\n this.subscription = response;\n });\n}\n```\n\n---\n\n## Troubleshooting\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| \"Model not found\" | Invalid model name | Use exact name: `sfdc_ai__DefaultOpenAIGPT4OmniMini` |\n| \"Access denied\" | Missing permission | Assign Einstein Generative AI User permission set |\n| \"Callout not allowed\" | Sync context restriction | Use Queueable with `Database.AllowsCallouts` |\n| Timeout errors | Large prompt/response | Reduce prompt size, use batch with smaller scope |\n| Empty response | Null check failed | Always validate `response.Code200` and `generations` |\n\n---\n\n## Related Documentation\n\n- [Prompt Templates](prompt-templates.md) - Using AI via metadata\n- [Salesforce AI Documentation](https://developer.salesforce.com/docs/einstein/genai/overview)\n\n---\n\n## Source\n\n> **Reference**: [Agentforce API Generating Case Summaries with Apex Queueable](https://salesforcediaries.com/2025/07/15/agentforce-api-generating-case-summaries-with-apex-queueable/) - Salesforce Diaries\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":21644,"content_sha256":"8073cbe92f3eade1baa5fc670ae6f87c6ce08a83f6c51d95cd0feed7f2f67cd6"},{"filename":"references/prompt-templates.md","content":"\u003c!-- Parent: sf-ai-agentforce/SKILL.md -->\n# Prompt Templates in Agentforce\n\n> **Terminology guide:** Salesforce users commonly say **Prompt Template** in the UI, while modern source-driven metadata work uses **`GenAiPromptTemplate`**.\n\n## Short answer\n\n| Term | Meaning |\n|------|---------|\n| **Prompt Template** | Plain-English / UI term used in Prompt Builder |\n| **`GenAiPromptTemplate`** | Current Metadata API type for Prompt Builder templates |\n\n## When to use prompt templates\n\nUse a Prompt Builder template when the action should generate content such as:\n- summaries\n- drafts\n- rewrites\n- recommendations\n\nDo **not** use a prompt template when the requirement is deterministic business logic or strict transactional processing.\n\n## Current metadata direction\n\nFor source-controlled work, prefer:\n- `genAiPromptTemplates/`\n- `.genAiPromptTemplate-meta.xml`\n- versioned content inside `templateVersions`\n\nFlex templates should be designed around the **5-input maximum**.\n\n## Current merge-field style\n\nPrompt content should reference current inputs with shapes like:\n- `{!$Input:TargetRecord}`\n- `{!$Input:AdditionalContext}`\n- `{!$Input:TargetRecord.Name}`\n\n## Read next\n\n- [genaiprompttemplate.md](genaiprompttemplate.md) — detailed metadata guide\n- [metadata-reference.md](metadata-reference.md) — Agentforce metadata overview\n- [builder-workflow.md](builder-workflow.md) — when templates fit in the Builder lifecycle\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1435,"content_sha256":"3097576a518b7ce0c76c8c0dd89fb98a5a5b2fb1b609aa0375303e2a1bbfdb90"},{"filename":"references/scoring-rubric.md","content":"# Agentforce Builder Scoring Rubric\n\n## 100-point rubric\n\n| Category | Points | What good looks like |\n|---|---:|---|\n| Agent configuration | 20 | Clear system guidance, correct agent user, usable welcome/error handling |\n| Topic and action design | 25 | Strong routing descriptions, scoped topics, actions mapped to the right topic |\n| Metadata quality | 20 | Valid GenAiFunction / GenAiPlugin structure, correct target types, clean I/O definitions |\n| Integration patterns | 15 | Dependencies sequenced correctly, cross-skill orchestration used appropriately |\n| Prompt / AI usage | 10 | GenAiPromptTemplate or Models API used only where it adds value |\n| Deployment readiness | 10 | Validation complete, dependencies deployed, publish/activate flow understood |\n\n## Thresholds\n\n| Score | Meaning | Recommendation |\n|---|---|---|\n| 90–100 | Excellent | Ready to deploy |\n| 80–89 | Very good | Minor cleanup only |\n| 70–79 | Acceptable | Review before deploy |\n| 60–69 | Needs work | Address issues before deploy |\n| \u003c 60 | Blocking | Do not deploy |\n\n## Common downgrades\n\n- vague topic descriptions\n- unsupported / undeployed action targets\n- missing or mismatched inputs/outputs\n- trying to use Builder when Agent Script is the better fit\n- forgetting that publish and activate are separate steps\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":1309,"content_sha256":"c539ba813a90f58b9d296d57fef819d2f9e5bed22e25502670bbc1efa9144c5c"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"sf-ai-agentforce: Standard Agentforce Platform Development","type":"text"}]},{"type":"paragraph","content":[{"text":"Use this skill for the ","type":"text"},{"text":"Setup UI / Agent Builder","type":"text","marks":[{"type":"strong"}]},{"text":" path: declarative topics, Builder-managed actions, ","type":"text"},{"text":"GenAiFunction","type":"text","marks":[{"type":"code_inline"}]},{"text":" / ","type":"text"},{"text":"GenAiPlugin","type":"text","marks":[{"type":"code_inline"}]},{"text":" metadata, ","type":"text"},{"text":"Prompt Builder templates stored as ","type":"text","marks":[{"type":"strong"}]},{"text":"GenAiPromptTemplate","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" metadata","type":"text","marks":[{"type":"strong"}]},{"text":", Models API usage from Apex, and custom Lightning types.","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"For new code-first agent development, prefer ","type":"text"},{"text":"sf-ai-agentscript","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentscript/SKILL.md","title":null}}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"If the work produces or edits a ","type":"text"},{"text":".agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" file — including Builder Script / Canvas work that results in an authoring bundle — use ","type":"text"},{"text":"sf-ai-agentscript","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentscript/SKILL.md","title":null}}]},{"text":".","type":"text"}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When This Skill Owns the Task","type":"text"}]},{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"sf-ai-agentforce","type":"text","marks":[{"type":"code_inline"}]},{"text":" when the user is:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"maintaining existing Builder-based agents","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"working in Setup → Agentforce → Agents","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"creating or fixing ","type":"text"},{"text":"GenAiFunction","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"GenAiPlugin","type":"text","marks":[{"type":"code_inline"}]},{"text":", or ","type":"text"},{"text":"GenAiPromptTemplate","type":"text","marks":[{"type":"code_inline"}]},{"text":" metadata","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"wiring Builder topics to Flow / Apex / Prompt Builder actions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"using Models API or LightningTypeBundle in the context of Builder-based agents","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Do ","type":"text"},{"text":"not","type":"text","marks":[{"type":"strong"}]},{"text":" use it for:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":".agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" files or deterministic FSM design → ","type":"text"},{"text":"sf-ai-agentscript","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentscript/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"agent test suites and coverage loops → ","type":"text"},{"text":"sf-ai-agentforce-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentforce-testing/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"persona / voice design → ","type":"text"},{"text":"sf-ai-agentforce-persona","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentforce-persona/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Required Context to Gather First","type":"text"}]},{"type":"paragraph","content":[{"text":"Ask for or infer:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"whether this is a Builder / Setup UI project or a code-first Agent Script project","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"whether the user is editing Builder metadata or a ","type":"text"},{"text":".agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" authoring bundle","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"agent type: Service Agent or Employee Agent","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"whether the work targets topics, actions, Prompt Builder templates, Models API, or custom Lightning types","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"what supporting Flow / Apex / metadata dependencies already exist","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"whether the user needs authoring help, publish help, or troubleshooting","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Two Agentforce Paths","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Path","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Skill","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Best fit","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Builder metadata path","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-ai-agentforce","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Declarative maintenance, existing Builder agents, metadata-driven action registration","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Agent Script authoring bundle path","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-ai-agentscript","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Code-first ","type":"text"},{"text":".agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" authoring, deterministic routing, version-controlled agent logic","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"If the user is starting from scratch and wants strong control over flow/state, route to Agent Script.","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Builder Workflow Summary","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Confirm this is a ","type":"text"},{"text":"Builder / Setup UI","type":"text","marks":[{"type":"strong"}]},{"text":" project","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Pick Service Agent vs Employee Agent","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For Service Agents, provision the running user (prefer ","type":"text"},{"text":"sf org create agent-user","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For Employee Agents, plan visibility with a Permission Set containing ","type":"text"},{"text":"\u003cagentAccesses>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Define topics with strong descriptions, scope, and instructions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prepare supporting actions (Flow, Apex, Prompt Builder template)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Configure inputs / outputs carefully","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validate dependencies and template status","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Publish, then activate","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Expanded workflow: ","type":"text"},{"text":"references/builder-workflow.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/builder-workflow.md","title":null}}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Key Platform Rules","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Topic quality matters","type":"text"}]},{"type":"paragraph","content":[{"text":"Topic descriptions are routing instructions for the planner. They must be:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"specific","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"scenario-based","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"non-overlapping with sibling topics","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Actions are wrappers around real targets","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Target type","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Typical use","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Registered via","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Flow","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"safest default for Builder actions","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"GenAiFunction","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Apex","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"complex business logic via ","type":"text"},{"text":"@InvocableMethod","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"GenAiFunction","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prompt Builder template","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"generated summaries / drafts / recommendations","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"GenAiFunction","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Prompt Template vs GenAiPromptTemplate","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prompt Template","type":"text","marks":[{"type":"strong"}]},{"text":" is the plain-English / UI term used in Prompt Builder.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"GenAiPromptTemplate","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" is the current Metadata API type for source-driven template work.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prefer current source format: ","type":"text"},{"text":"genAiPromptTemplates/*.genAiPromptTemplate-meta.xml","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For flexible Prompt Builder templates, plan around the ","type":"text"},{"text":"5-input maximum","type":"text","marks":[{"type":"strong"}]},{"text":" and consolidate inputs when needed.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prompt content should reference inputs with the current merge-field shape, e.g. ","type":"text"},{"text":"{!$Input:TargetRecord}","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"{!$Input:AdditionalContext}","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Supporting metadata deploys first","type":"text"}]},{"type":"paragraph","content":[{"text":"Before publishing the agent itself, deploy the supporting stack:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"metadata / fields if needed","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Apex if needed","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Flows if needed","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"GenAiPromptTemplate","type":"text","marks":[{"type":"code_inline"}]},{"text":" / ","type":"text"},{"text":"GenAiFunction","type":"text","marks":[{"type":"code_inline"}]},{"text":" / ","type":"text"},{"text":"GenAiPlugin","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"then publish the agent","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Service Agent running user","type":"text"}]},{"type":"paragraph","content":[{"text":"For Service Agents, prefer the native GA command: ","type":"text"},{"text":"sf org create agent-user --target-org \u003calias> --json","type":"text","marks":[{"type":"code_inline"}]},{"text":" Use the returned username in the running-user configuration.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Employee Agent visibility","type":"text"}]},{"type":"paragraph","content":[{"text":"For Employee Agents, ensure end users receive a Permission Set containing ","type":"text"},{"text":"\u003cagentAccesses>","type":"text","marks":[{"type":"code_inline"}]},{"text":". Without this, the agent can be active but still invisible in Lightning Experience. See ","type":"text"},{"text":"../sf-permissions/references/agent-access-guide.md","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-permissions/references/agent-access-guide.md","title":null}}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Publish does not activate","type":"text"}]},{"type":"paragraph","content":[{"text":"After publish, run ","type":"text"},{"text":"sf agent activate","type":"text","marks":[{"type":"code_inline"}]},{"text":" separately. For automation, prefer ","type":"text"},{"text":"sf agent activate --api-name \u003cAgentName> --version \u003cn> --target-org \u003calias> --json","type":"text","marks":[{"type":"code_inline"}]},{"text":" so the rollout is deterministic and machine-readable.","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Metadata Guidance","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"GenAiFunction","type":"text"}]},{"type":"paragraph","content":[{"text":"Use when registering a single callable action. Validate:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"target exists","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"target is active / deployable","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"input names match the target contract","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"output names match the target contract","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"capability text clearly says when the action should be used","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"GenAiPlugin","type":"text"}]},{"type":"paragraph","content":[{"text":"Use when grouping related functions into one logical package.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"GenAiPromptTemplate","type":"text"}]},{"type":"paragraph","content":[{"text":"Use for generated content, not deterministic business rules.","type":"text"}]},{"type":"paragraph","content":[{"text":"Prefer the current metadata shape:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"metadata type: ","type":"text"},{"text":"GenAiPromptTemplate","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"folder: ","type":"text"},{"text":"genAiPromptTemplates/","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"file suffix: ","type":"text"},{"text":".genAiPromptTemplate-meta.xml","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"content lives under ","type":"text"},{"text":"templateVersions","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"use published template versions before wiring actions that depend on them","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Models API","type":"text"}]},{"type":"paragraph","content":[{"text":"Use when the solution belongs in Apex-driven AI orchestration rather than Builder-only actions.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Custom Lightning Types","type":"text"}]},{"type":"paragraph","content":[{"text":"Use when the action needs richer structured input or output presentation.","type":"text"}]},{"type":"paragraph","content":[{"text":"Expanded references:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/metadata-reference.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/metadata-reference.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/genaiprompttemplate.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/genaiprompttemplate.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Cross-Skill Integration","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Recommended Orchestration Order","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"text"},"content":[{"text":"sf-metadata → sf-apex → sf-flow → sf-ai-agentforce → sf-deploy","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Required delegations","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Requirement","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Delegate to","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Why","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Create / fix Flows","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-flow","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-flow/SKILL.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Action target creation and Flow validation","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Create / fix Apex actions","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-apex","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-apex/SKILL.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"@InvocableMethod","type":"text","marks":[{"type":"code_inline"}]},{"text":" and Apex correctness","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Deploy / publish","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-deploy","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-deploy/SKILL.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Deployment orchestration","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Test the agent","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-ai-agentforce-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentforce-testing/SKILL.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Formal test execution and assertions","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Employee Agent visibility / access","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"sf-permissions","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-permissions/SKILL.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Permission Set ","type":"text"},{"text":"\u003cagentAccesses>","type":"text","marks":[{"type":"code_inline"}]},{"text":" setup","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"High-Signal Failure Patterns","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Symptom","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Likely cause","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Read next","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Action not available in Builder","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"target metadata missing or not deployed","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/metadata-reference.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/metadata-reference.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prompt action fails during publish or activation","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"template is Draft, missing inputs, or old metadata shape is being used","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/genaiprompttemplate.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/genaiprompttemplate.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Need more than 5 template inputs","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"flex template input limit hit","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/genaiprompttemplate.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/genaiprompttemplate.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Apex AI logic times out","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Models API work placed in the wrong context","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/models-api.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/models-api.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Rich input/output UI not rendering","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Lightning type config or prerequisites are incomplete","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/custom-lightning-types.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/custom-lightning-types.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Agent publishes but is not usable","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"forgot explicit activation","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/cli-commands.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/cli-commands.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Service Agent publish/runtime failure","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"missing or invalid running user","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"../sf-ai-agentscript/references/agent-user-setup.md","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentscript/references/agent-user-setup.md","title":null}}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Employee Agent active but not visible to users","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"missing ","type":"text"},{"text":"\u003cagentAccesses>","type":"text","marks":[{"type":"code_inline"}]},{"text":" permission set","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"../sf-permissions/references/agent-access-guide.md","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-permissions/references/agent-access-guide.md","title":null}}]}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Map","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Start here","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/builder-workflow.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/builder-workflow.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/metadata-reference.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/metadata-reference.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/genaiprompttemplate.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/genaiprompttemplate.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/cli-commands.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/cli-commands.md","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Terminology and template planning","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/prompt-templates.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/prompt-templates.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/models-api.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/models-api.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/custom-lightning-types.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/custom-lightning-types.md","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Rubric","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/scoring-rubric.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/scoring-rubric.md","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Cross-skill reads","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sf-ai-agentscript","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentscript/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sf-ai-agentforce-testing","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-ai-agentforce-testing/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sf-flow","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-flow/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sf-apex","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-apex/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sf-permissions","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-permissions/SKILL.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"sf-deploy","type":"text","marks":[{"type":"link","attrs":{"href":"../sf-deploy/SKILL.md","title":null}}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Score Guide","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Score","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Meaning","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"90+","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Ready to deploy","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"80–89","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Strong, minor cleanup only","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"70–79","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Review before deploy","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"60–69","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Needs work","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"\u003c 60","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Block deployment","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Full rubric: ","type":"text"},{"text":"references/scoring-rubric.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/scoring-rubric.md","title":null}}]}]}]},"metadata":{"date":"2026-11-02","name":"sf-ai-agentforce","author":"@skillopedia","source":{"stars":423,"repo_name":"sf-skills","origin_url":"https://github.com/Jaganpro/sf-skills/blob/HEAD/skills/sf-ai-agentforce/SKILL.md","repo_owner":"Jaganpro","body_sha256":"d2bbb8fb1aeb8eb14dced3ea5002f366e7da6df20d39076ffc9bc6af70af81bb","cluster_key":"7502186ed20c00f52fb98c508fd29d789219f0e3abf75a3bec6f75fbc9a8bc10","clean_bundle":{"format":"clean-skill-bundle-v1","source":"Jaganpro/sf-skills/skills/sf-ai-agentforce/SKILL.md","text_bytes":75915,"source_commit":"53c9956c4279f8e9abda51164a3e9444811f0e8e","skills_sh_rank":10880,"attachment_count":10,"text_attachments":10,"attachment_storage":"skill_attachments","binary_attachments":0},"cluster_size":1,"skill_md_path":"skills/sf-ai-agentforce/SKILL.md","import_metadata":{"date":"2026-11-02","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":0},"license":"MIT","version":"v1","category":"integrations-apis","metadata":{"author":"Jag Valaiyapathy","version":"2.2.0"},"import_tag":"skills-sh-top20k-2026-11","description":"Agentforce Builder metadata path for Builder-managed topics/actions, Prompt Builder templates, GenAiFunction/GenAiPlugin, Models API, and custom Lightning types. TRIGGER when: user maintains or configures Builder metadata agents, creates topics/actions, works with Prompt Builder templates, or touches .genAiFunction, .genAiPlugin, or .genAiPromptTemplate metadata XML files. DO NOT TRIGGER when: Agent Script DSL .agent files (use sf-ai-agentscript), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).\n","compatibility":"Requires API v66.0+ (Spring '26)"}},"renderedAt":1793671601305}

sf-ai-agentforce: Standard Agentforce Platform Development Use this skill for the Setup UI / Agent Builder path: declarative topics, Builder-managed actions, / metadata, Prompt Builder templates stored as metadata , Models API usage from Apex, and custom Lightning types. For new code-first agent development, prefer sf-ai-agentscript. If the work produces or edits a file — including Builder Script / Canvas work that results in an authoring bundle — use sf-ai-agentscript. When This Skill Owns the Task Use when the user is: - maintaining existing Builder-based agents - working in Setup → Agentfo…