New to Claude Skills? Learn how to install them →

forcedotcom on GitHub

Agentforce Platform Tracing

OfficialFree

Manage Agentforce agent tracing settings for Data Cloud.

Get this skill

Free · Opens the source repo

What Agentforce Platform Tracing does

The Agentforce Platform Tracing skill is designed to assist developers in generating the necessary metadata to enable or disable the forwarding of Agentforce agent execution trace spans to Data Cloud. This skill is particularly useful for those working with Agentforce agents who require observability and tracing capabilities in their applications. By utilizing this skill, users can streamline the process of configuring AgentforcePlatformTracingSettings, ensuring that their tracing spans are correctly routed to Data Cloud's ingestion pipeline.

This skill specifically generates the AgentforcePlatformTracing.settings-meta.xml file, which is a singleton type with a single boolean field introduced in API version 68.0 (Spring '25). Users must be aware of certain prerequisites, such as having Data Cloud provisioned in their org and ensuring that the PlatformObservability org permission is active. Without these prerequisites, the generated settings will not have any effect, making it crucial for users to confirm these conditions before proceeding with the configuration.

The workflow for using this skill is straightforward. Users will be prompted to specify whether they want to enable or disable agent tracing. The skill will then read a template file, generate the appropriate settings file based on the user's input, and place it in the correct directory. This automation reduces the potential for errors and ensures compliance with the required XML structure and naming conventions.

This skill is ideal for developers and system administrators who need to manage tracing settings for Agentforce agents effectively. It simplifies the process and provides clarity on the necessary conditions for successful deployment, making it a valuable addition to any Salesforce development toolkit.

When to use it

Use this skill when you need to configure Agentforce agent tracing settings for Data Cloud ingestion.

When not to use it

This skill is not suitable for querying existing trace data or configuring other tracing types such as TraceSpanEvent.

What you can build with it

Enable Agent Tracing

A developer needs to enable Agentforce agent tracing for their application to ensure proper observability in Data Cloud.

Disable Agent Tracing

An administrator wants to disable agent tracing to optimize performance and reduce unnecessary data flow to Data Cloud.

Configuration Check

A user is unsure if their org meets the prerequisites for enabling tracing and uses this skill to verify and configure the settings.

How to install Agentforce Platform Tracing

View source

1. Install with the skills CLI

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

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by forcedotcom

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

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

Gotchas

IssueResolution
Deploy succeeds but tracing doesn't activateOrg lacks PlatformObservability permission or Data Cloud is not provisioned. These are provisioned, not settable via metadata.
AgentforcePlatformTracingSettings type not recognizedOrg 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

NeedDelegate to
Enable TraceSpanEvent publishing (Platform Tracing)platform-tracing-configure skill
Query or analyze existing Agentforce agent trace data in Data Cloudagentforce-observe skill
Set up Change Data Captureintegration-eventing-cdc-configure skill
Configure ManagedEventSubscriptionintegration-eventing-subscription-configure skill

Reference File Index

FileWhen to read
assets/AgentforcePlatformTracing-template.xmlStep 2 — template for generating the settings file

Frequently asked questions about Agentforce Platform Tracing

Similar skills