PluginBench
Skill
Review
Audit score 70

building-sf-integrations

forcedotcom/sf-skills

Set up Salesforce integration architecture: Named Credentials, External Services, REST/SOAP callouts, Platform Events, and CDC.

What is building-sf-integrations?

This skill handles Salesforce integration runtime plumbing—Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. Use it when building outbound integrations, event-driven architectures, or setting up secure credential management. Do not use for OAuth app configuration, Apex-only logic, data import/export, or CDC channel-membership metadata.

  • Set up Named Credentials and External Credentials with secure runtime-managed authentication
  • Design and implement REST/SOAP callout patterns with async handling and retry logic
  • Register External Services from OpenAPI specifications for spec-driven API clients
  • Configure Platform Events for decoupled event publishing and trigger-originated work
  • Implement Change Data Capture (CDC) for change-stream consumption
  • Generate endpoint security metadata (Remote Site Settings, CSP Trusted Sites)

How to install building-sf-integrations

npx skills add https://github.com/forcedotcom/sf-skills --skill building-sf-integrations
Prerequisites
  • Salesforce org with appropriate API permissions
  • External system endpoint URL and authentication details (OAuth credentials, JWT cert, or API key)
  • OpenAPI specification (if using External Services)
  • Understanding of sync vs. async integration requirements
Claude Code
Cursor
Windsurf
Cline

How to use building-sf-integrations

  1. 1.Gather integration context: style (callout, event, External Service, CDC), auth method, sync/async need, endpoint details, and rate limits
  2. 2.Choose the integration pattern from the recommended workflow table (Named Credential, External Service, Platform Events, or CDC)
  3. 3.Select the appropriate auth model (OAuth, JWT, Certificate, or Custom)
  4. 4.Use provided asset templates from assets/ directory (named-credentials/, external-credentials/, external-services/, callouts/, platform-events/, cdc/)
  5. 5.Generate credential metadata, callout Apex class, and endpoint security files with org-specific values
  6. 6.Validate operational safety: timeouts, retries, async strategy, logging, and event retention
  7. 7.Deploy metadata using deploying-metadata skill and test the integration end-to-end

Use cases

Good for
  • Building an outbound REST API integration with OAuth authentication via Named Credentials
  • Creating an async callout pattern to avoid synchronous trigger callouts
  • Registering a third-party API as an External Service from an OpenAPI spec
  • Publishing domain events via Platform Events for decoupled system communication
  • Consuming Salesforce change streams with CDC for real-time data synchronization
Who it's for
  • Integration architects designing Salesforce-to-external-system connections
  • Developers implementing secure outbound callouts and event-driven patterns
  • Admins setting up credential management and endpoint security
  • Teams building event-driven architectures with Platform Events or CDC

building-sf-integrations FAQ

When should I use Named Credentials vs. External Credentials?

Use Named Credentials for Apex callouts and Flow HTTP actions. Use External Credentials for more advanced scenarios requiring multiple credential types or when building reusable credential infrastructure. External Credentials are preferred for new development when supported.

Should I make callouts synchronously from triggers?

No. Never make synchronous callouts from triggers. Use async patterns: Queueable, scheduled actions, or event-driven flows to avoid blocking and governor limit issues.

What's the difference between Platform Events and CDC?

Platform Events are for publishing custom domain events from your code. CDC is for consuming Salesforce object changes as a stream. Use Platform Events for decoupled event publishing; use CDC when you need to react to Salesforce data changes.

How do I handle retries and transient failures?

Implement explicit timeout and retry logic in your callout handler. Use Queueable with retry counts, dead-letter queues, or error logging. Plan for transient failures and define retry strategy upfront.

When should I delegate to other skills?

Use configuring-connected-apps for OAuth app setup, generating-apex for advanced service code, generating-flow for declarative HTTP callouts, deploying-metadata for deployment, and developing-agentforce for agent action composition.

Full instructions (SKILL.md)

Source of truth, from forcedotcom/sf-skills.


name: building-sf-integrations description: "Salesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), data import/export (use handling-sf-data), or CDC channel-membership metadata such as PlatformEventChannel, PlatformEventChannelMember, or EnrichedField (use managing-cdc-enablement)." metadata: version: "1.1"

building-sf-integrations: Salesforce Integration Patterns Expert

Use this skill when the user needs integration architecture and runtime plumbing: Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, CDC, and event-driven integration design.

When This Skill Owns the Task

Use building-sf-integrations when the work involves:

  • .namedCredential-meta.xml or External Credential metadata
  • outbound REST/SOAP callouts
  • External Service registration from OpenAPI specs
  • Platform Events, CDC, and event-driven architecture
  • choosing sync vs async integration patterns

Delegate elsewhere when the user is:

  • configuring the OAuth app itself → configuring-connected-apps
  • writing Apex-only business logic → generating-apex
  • deploying metadata → deploying-metadata
  • importing/exporting data → handling-sf-data

Required Context to Gather First

Ask for or infer:

  • integration style: outbound callout, inbound event, External Service, CDC, platform event
  • auth method
  • sync vs async requirement
  • system endpoint / spec details
  • rate limits, retry expectations, and failure tolerance
  • whether this is net-new design or repair of an existing integration

Recommended Workflow

1. Choose the integration pattern

NeedDefault pattern
authenticated outbound API callNamed Credential / External Credential + Apex or Flow
spec-driven API clientExternal Service
trigger-originated calloutasync callout pattern
decoupled event publishingPlatform Events
change-stream consumptionCDC

2. Choose the auth model

Prefer secure runtime-managed auth:

  • Named Credentials / External Credentials
  • OAuth or JWT via the right credential model
  • no hardcoded secrets in code

3. Generate from the right templates

Use the provided assets under:

  • assets/named-credentials/
  • assets/external-credentials/
  • assets/external-services/
  • assets/callouts/
  • assets/platform-events/
  • assets/cdc/
  • assets/soap/

4. Validate operational safety

Check:

  • timeout and retry handling
  • async strategy for trigger-originated work
  • logging / observability
  • event retention and subscriber implications

5. Hand off deployment or implementation details

Use:

  • deploying-metadata for deployment
  • generating-apex for deeper service / retry code
  • generating-flow for declarative HTTP callout orchestration

High-Signal Rules

  • never hardcode credentials
  • do not do synchronous callouts from triggers
  • define timeout behavior explicitly
  • plan retries for transient failures
  • use middleware / event-driven patterns when outbound volume is high
  • prefer External Credentials architecture for new development when supported

Common anti-patterns:

  • sync trigger callouts
  • no retry or dead-letter strategy
  • no request/response logging
  • mixing auth setup responsibilities with runtime integration design

Output Format

When finishing, report in this order:

  1. Integration pattern chosen
  2. Auth model chosen
  3. Files created or updated
  4. Operational safeguards
  5. Deployment / testing next step

Suggested shape:

Integration: <summary>
Pattern: <named credential / external service / event / cdc / callout>
Files: <paths>
Safety: <timeouts, retries, async, logging>
Next step: <deploy, register, test, or implement>

Cross-Skill Integration

NeedDelegate toReason
OAuth app setupconfiguring-connected-appsconsumer key / cert / app config
advanced callout service codegenerating-apexApex implementation
declarative HTTP callout / Flow wrappergenerating-flowFlow orchestration
deploy integration metadatadeploying-metadatavalidation and rollout
use integration from Agentforcedeveloping-agentforceagent action composition

Reference Map

Start here

Event-driven / platform patterns

CLI / automation / scoring

Asset templates

  • assets/named-credentials/ — Named Credential XML templates (OAuth, JWT, Certificate, Custom auth)
  • assets/external-credentials/ — External Credential XML templates (OAuth, JWT)
  • assets/external-services/ — External Service registration template and operations guide
  • assets/callouts/ — REST sync, Queueable, retry handler, and HTTP response handler Apex templates
  • assets/platform-events/ — Platform Event definition, publisher, and subscriber templates
  • assets/cdc/ — CDC handler and subscriber trigger templates
  • assets/soap/ — SOAP callout service template and wsdl2apex guide
  • assets/endpoint-security/ — Remote Site Setting and CSP Trusted Site XML templates

Automation hooks

  • hooks/scripts/suggest_credential_setup.py — auto-suggests credential configuration steps when integration files are detected
  • hooks/scripts/validate_integration.py — validates integration patterns before agent responses

Output Expectations

When this skill completes an integration task, it produces:

  1. Credential metadata — one or more files in assets/named-credentials/ or assets/external-credentials/ filled with org-specific values
  2. Callout Apex class — a .cls file using the Named Credential pattern, with async/sync pattern chosen based on context
  3. Event/CDC artifacts — Platform Event .object-meta.xml, subscriber trigger, or CDC config (when event-driven pattern is chosen)
  4. Endpoint security metadata — Remote Site Setting and/or CSP Trusted Site XML files
  5. Scoring report — 120-point score across 6 categories (Security, Error Handling, Bulkification, Architecture, Best Practices, Documentation)
  6. Next step — a deployment or testing instruction for the generated artifacts

Score Guide

ScoreMeaning
108+strong production-ready integration design
90–107good design with some hardening left
72–89workable but needs architectural review
< 72unsafe / incomplete for deployment