Skip to main content
skill CX Codex

platform-tracing-agentforce-configure — Claude Code skill

Writes the AgentforcePlatformTracing.settings-meta.xml settings file that turns forwarding of Agentforce agent trace spans to Data Cloud on or off.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add forcedotcom/sf-skills --skill platform-tracing-agentforce-configure -a claude-code
Open on GitHub

What platform-tracing-agentforce-configure does

The skill produces one metadata file, settings/AgentforcePlatformTracing.settings-meta.xml, and it holds a single boolean: enableAgentforcePlatformTracing. This is a singleton type with no other fields, so deploying it sets an org-wide preference. Set it to true and agent execution spans flow into Data Cloud's ingestion pipeline. Set it to false and they stop.

The run is short. It flags the org requirements first, then opens assets/AgentforcePlatformTracing-template.xml, replaces {ENABLED} with the state you asked for, and writes the result into your project's source tree. Before handing the file back it checks the namespace http://soap.sforce.com/2006/04/metadata, the filename and that nothing beyond the one field got in.

Three things have to be in place: Data Cloud provisioned in the org, the PlatformObservability org permission active, and API 68.0 or later. The permission and Data Cloud come from provisioning, not from metadata you deploy. Skip them and the deploy still completes while tracing stays silent.

Platform Tracing for TraceSpanEvent is a different feature. For that one, reach for platform-tracing-configure instead.

What it helps with

  • turn on agent execution tracing for an org
  • switch span forwarding off with one metadata file
  • get a valid settings-meta.xml without hand-writing the XML
  • find out why spans never show up in Data Cloud after a deploy
  • keep this setting apart from Platform Tracing for TraceSpanEvent

Example prompts for the agent

  • Enable Agentforce tracing and generate the settings file.
  • Turn off agent trace spans in AgentforcePlatformTracing.settings-meta.xml.
  • The deploy went through but no agent spans reach Data Cloud. What's missing?

How to install platform-tracing-agentforce-configure

1Skills CLI (Vercel)

npx skills add forcedotcom/sf-skills --skill platform-tracing-agentforce-configure -a claude-code

2Manually: put the files in place

~/.claude/skills/platform-tracing-agentforce-configure/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/platform-tracing-agentforce-configure/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about platform-tracing-agentforce-configure

How do I install platform-tracing-agentforce-configure in Claude Code?

Run npx skills add forcedotcom/sf-skills --skill platform-tracing-agentforce-configure -a claude-code. The skill itself then sits at ~/.claude/skills/platform-tracing-agentforce-configure/SKILL.md.

What does platform-tracing-agentforce-configure do?

It writes AgentforcePlatformTracing.settings-meta.xml with enableAgentforcePlatformTracing set to true or false. That flag decides whether Agentforce agent trace spans get forwarded to Data Cloud.

Why does the org reject AgentforcePlatformTracingSettings?

The type arrived with API 68.0. Orgs and tooling on older versions do not recognize it, so raise sourceApiVersion in sfdx-project.json first.

Source text

SKILL.md · Apache-2.0
---
name: platform-tracing-agentforce-configure
description: "Generate AgentforcePlatformTracingSettings metadata to enable or disable Agentforce agent execution trace spans flowing to Data Cloud. Use this skill for any AgentforcePlatformTracingSettings metadata work. TRIGGER when: user mentions Agentforce tracing, agent trace spans, Data Cloud tracing, AgentforcePlatformTracingSettings, platform observability tracing, enable agent tracing, wants agent execution spans in Data Cloud, mentions .settings-meta.xml for AgentforcePlatformTracing, or asks about enabling observability for Agentforce agents. DO NOT TRIGGER when: user wants Platform Tracing for TraceSpanEvent (use platform-tracing-configure), wants to query or analyze existing agent trace data in Data Cloud (use agentforce-observe), wants Event Log Files or ELF configuration, wants Change Data Capture (use integration-eventing-cdc-configure), or wants ManagedEventSubscription (use integration-eventing-subscription-configure)."
metadata:
  version: "1.0"
  domains: ["Platform", "Agentforce", "Data 360"]
  minApiVersion: "68.0"
  relatedSkills:
    - "agentforce-observe"
    - "integration-eventing-cdc-configure"
    - "integration-eventing-subscription-configure"
    - "platform-tracing-configure"
---

# Platform Tracing — Agentforce Configure

Generate AgentforcePlatformTracingSettings metadata to enable or disable forwarding of Agentforce agent execution trace spans to Data Cloud's ingestion pipeline. This is a singleton Settings type with one boolean field introduced in API v68.0 (Spring '25).

## Scope

- **In scope**: Generating `AgentforcePlatformTracing.settings-meta.xml` to enable or disable Agentforce agent tracing.
- **Out of scope**: Platform Tracing for TraceSpanEvent (use `platform-tracing-configure`). Event Log Files. Change Data Capture. Org permission provisioning. Data Cloud provisioning.

---

## Prerequisites

Before generating, inform the user of these requirements. The skill cannot check org state, but deploying without these prerequisites means the setting has no effect:

1. **Data Cloud must be provisioned** in the org — trace spans are forwarded to Data Cloud's ingestion pipeline. Without Data Cloud, there is no destination for the spans.
2. **`PlatformObservability` org permission** must be active — this permission gates the feature. It is provisioned (not settable via metadata).
3. **API version 68.0+** — the `AgentforcePlatformTracingSettings` type was introduced in Spring '25. Orgs on older API versions will not recognize it.

If the user reports the setting isn't working after deploy, the most likely cause is a missing prerequisite above.

---

## Clarifying Questions

Before generating, confirm with the user if not already clear:

- Enable or disable? (Which state do you want for Agentforce agent tracing?)

No other clarification needed — this is a singleton type with one boolean field.

---

## Required Inputs

Gather or infer before proceeding:

- **Desired state**: `true` (enable) or `false` (disable)

Defaults unless specified:
- If user says "enable" or "turn on": set to `true`
- If user says "disable" or "turn off": set to `false`

If the user provides a clear request, generate immediately without unnecessary back-and-forth.

---

## Workflow

1. **Warn about prerequisites** — inform the user that this feature requires Data Cloud and the `PlatformObservability` org permission.

2. **Read the template** — load `assets/AgentforcePlatformTracing-template.xml`.

3. **Generate the settings file** — replace `{ENABLED}` with `true` or `false` based on the user's desired state.

4. **Place the file** — output to `settings/AgentforcePlatformTracing.settings-meta.xml` in the project's source directory.

---

## Rules / Constraints

| Constraint | Rationale |
|---|---|
| Singleton — only one file per org, one boolean field | The metadata type has exactly one instance. Deploying the file sets the org-wide preference. |
| XML namespace must be `http://soap.sforce.com/2006/04/metadata` | Any other namespace causes deploy failure. |
| File must be named `AgentforcePlatformTracing.settings-meta.xml` | SFDX source format convention for this Settings type. |
| Only include `enableAgentforcePlatformTracing` field | No other fields exist on this type. |
| Requires API v68.0+ | Older orgs reject the metadata type entirely. |

---

## Gotchas

| Issue | Resolution |
|---|---|
| Deploy succeeds but tracing doesn't activate | Org lacks `PlatformObservability` permission or Data Cloud is not provisioned. These are provisioned, not settable via metadata. |
| `AgentforcePlatformTracingSettings` type not recognized | Org or tooling is on API version < 68.0. Update `sfdx-project.json` sourceApiVersion. |
| User confuses this with Platform Tracing (TraceSpanEvent) | Clarify: this sends Agentforce agent execution spans to Data Cloud. For TraceSpanEvent publishing, use the `platform-tracing-configure` skill. |

---

## Output Expectations

Deliverables:
- `settings/AgentforcePlatformTracing.settings-meta.xml`

Before delivering, verify:
- [ ] XML namespace is exactly `http://soap.sforce.com/2006/04/metadata`
- [ ] File is named `AgentforcePlatformTracing.settings-meta.xml`
- [ ] Only `enableAgentforcePlatformTracing` is present (no extra fields)

---

## Cross-Skill Integration

| Need | Delegate to |
|---|---|
| Enable TraceSpanEvent publishing (Platform Tracing) | `platform-tracing-configure` skill |
| Query or analyze existing Agentforce agent trace data in Data Cloud | `agentforce-observe` skill |
| Set up Change Data Capture | `integration-eventing-cdc-configure` skill |
| Configure ManagedEventSubscription | `integration-eventing-subscription-configure` skill |

---

## Reference File Index

| File | When to read |
|---|---|
| `assets/AgentforcePlatformTracing-template.xml` | Step 2 — template for generating the settings file |

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set181

integration-connectivity-generate Designs Salesforce runtime integrations with credentials, API callouts, External Services, Platform Events and CDC. Use it when connecting Salesforce to an external system. CX Codex +1 5,400installs integration-connectivity-connected-app-configure A skill for Salesforce OAuth setup: Connected Apps, External Client Apps, JWT bearer and PKCE. Useful when you touch .connectedApp-meta.xml or .eca-meta.xml. CX Codex +1 5,400installs experience-ui-bundle-frontend-generate A skill that governs UI edits in an existing Salesforce UI bundle: pages, components, layout, navigation, branding. CX Codex +1 5,300installs agentforce-d360-analyze Reconstructs Agentforce sessions from Salesforce Data Cloud audit logs. Useful for tracing conversation turns and diagnosing why an interaction escalated or failed. CX Codex +1 5,300installs experience-ui-bundle-file-upload-generate Guides file uploads in Salesforce React UI bundle apps. Helps track transfer progress and attach uploads directly to ContentVersion records. CX Codex +1 5,200installs dx-app-analytics-query This skill retrieves managed package usage data through App Analytics and configures simulation mode. Use it when working with subscriber analytics queries. CX Codex +1 5,200installs platform-tracing-configure Generates Event.settings-meta.xml with a single enablePlatformTracing flag, so you can start or stop TraceSpanEvent publishing in Event Monitoring. CX Codex +1 5,200installs experience-ui-bundle-custom-app-generate Generates Salesforce CustomApplication metadata to surface React UI bundles in Lightning App Launcher. Useful when exposing bundles without a Digital Experience Site. CX Codex +1 5,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor