agentforce-architectur…
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use to enable Salesforce Change Data Capture (CDC) on a standard or custom object, configure a custom event channel, set a filter expression, or add enrichment fields. TRIGGER broadly on any of: 'enable CDC', 'enable Change Data Capture', 'turn on CDC', 'subscribe X to change
Claude Code
$ npx -y skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure --agent claude-code
Codex
$ npx skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure -a codex -y
Cursor
$ npx skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure -a cursor -y
Gemini CLI
$ npx skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure -a gemini-cli -y
GitHub Copilot
$ npx skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure -a github-copilot -y
OpenCode
$ npx skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure -a opencode -y
Windsurf
$ npx skills add forcedotcom/sf-skills --skill integration-eventing-cdc-configure -a windsurf -y
name: integration-eventing-cdc-configure
description: "Use to enable Salesforce Change Data Capture (CDC) on a standard or custom object, configure a custom event channel, set a filter expression, or add enrichment fields. TRIGGER broadly on any of: 'enable CDC', 'enable Change Data Capture', 'turn on CDC', 'subscribe X to change events', 'only emit events for', 'filter change events', 'enrich change events', 'create a custom event channel'; or any mention of CDC, change events, PlatformEventChannel, PlatformEventChannelMember, EnrichedField, ChangeEvents channel, enrichment fields, change event filter; or when the user wants a downstream system to receive Salesforce data changes; or when the user touches .platformEventChannelMember-meta.xml / .platformEventChannel-meta.xml files. SKIP when publishing platform events, Pub/Sub API or REST/SOAP (use integration-connectivity-generate), or ManagedEventSubscription (out of scope for CDC). Always use this skill for CDC channel-membership metadata."
metadata:
version: "1.0"
domains: ["Integration"]
minApiVersion: "60.0"
relatedSkills:
- "integration-connectivity-generate"
- "platform-custom-field-generate"
- "platform-custom-object-generate"
- "platform-permission-set-generate"
cliTools:
- tool: ["sf"]
semver: ">=2.0.0"Generate the metadata that subscribes Salesforce objects to Change Data Capture: `PlatformEventChannelMember` files for the default `ChangeEvents` channel or a custom channel, and `PlatformEventChannel` files for new custom channels. Covers enrichment fields, filter expressions, and the canonical naming and value formats that the Metadata API actually accepts (which differ from values that appear in many internal test fixtures and code-search hits).
---
Before generating, confirm with the user if not already clear:
---
Gather or infer before proceeding:
Defaults unless specified:
If the user provides a clear, complete request, generate immediately without unnecessary back-and-forth.
---
All steps are sequential. Do not skip or reorder.
**Before generating anything, know the only valid CDC metadata types:** CDC is expressed entirely through `PlatformEventChannelMember` (one per subscribed entity) and `PlatformEventChannel` (only for custom channels). Do NOT use `<ChangeDataCapture>`, `.changeDataCapture-meta.xml`, `changeDataCapture/` directories, `EnableChangeDataCapture`, or `ManagedEventSubscription` — these are not in scope for CDC. If you find yourself writing any of them, stop and use a `PlatformEventChannelMember` file instead.
1. **Identify the channel** — if the user names a custom channel, you'll generate a `PlatformEventChannel` file (see step 4). Otherwise use the literal value `ChangeEvents` for the default channel.
2. **Translate source entity to ChangeEvent entity name** — `<selectedEntity>` is the **ChangeEvent** type, NOT the source object:
| Source object | `<selectedEntity>` value | |---|---| | `Account` | `AccountChangeEvent` | | `Lead` | `LeadChangeEvent` | | `Contact` | `ContactChangeEvent` | | `Order__c` (custom) | `Order__ChangeEvent` | | `MyThing__c` (custom) | `MyThing__ChangeEvent` |
For standard objects: append `ChangeEvent`. For custom objects: replace the trailing `__c` with `__ChangeEvent` (the double-underscore is preserved).
3. **Generate the channel-member file** — one file per `(entity, channel)` pair. **The filename and fullName always use a SINGLE underscore between the entity stem and `ChangeEvent`** — this is independent of how `selectedEntity` is formatted in the XML body. For custom objects, drop the `__c` from the source name when forming the filename:
| Source object | Filename (and fullName) | `<selectedEntity>` (in XML) | |---|---|---| | `Account` | `Account_ChangeEvent.platformEventChannelMember-meta.xml` | `AccountChangeEvent` | | `Lead` | `Lead_ChangeEvent.platformEventChannelMember-meta.xml` | `LeadChangeEvent` | | `Order__c` | `Order_ChangeEvent.platformEventChannelMember-meta.xml` (NOT `Order__ChangeEvent`) | `Order__ChangeEvent` | | `MyThing__c` | `MyThing_ChangeEvent.platformEventChannelMember-meta.xml` (NOT `MyThing__ChangeEvent`) | `MyThing__ChangeEven
This repository provides Salesforce agent skills, plugins, and sample apps for building applications.
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec…
Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific…
Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates,…
Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…
Use to design an AI agent persona — identity, voice, tone, behavioral style, guardrails — and encode it into Agent Script (.agent…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.