agentforce-observe

agentforce-observe is a skill for Claude Code from forcedotcom/sf-skills. It costs 195 tokens per session (5,612 once invoked), scanned C, original, Apache-2.0.

An observability guide for Salesforce Agentforce agents. It examines conversation traces and metrics from Data Cloud, Salesforce's system for storing and analysing customer data, then uses previews to reproduce problems.

In plain words
What is it for?
Use it to query session traces, investigate failed conversations and regressions, preview problematic interactions, update `.agent` files, and verify improvements.
Why use it?
It helps explain why an agent failed, changed behaviour, or performed poorly in production. Developers can inspect real sessions and verify fixes before publishing them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Part of the agentforce-adlc plugin — 7 skills, 4 agents shipped together

Good fit Use it to query session traces, investigate failed conversations and regressions, preview problematic interactions, update .agent files, and verify improvements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/forcedotcom/sf-skills/agentforce-observe
About the project

forcedotcom/sf-skills is a collection of reusable instructions that help AI coding agents build and work with Salesforce applications and platform features. Developers use it for Agentforce agents, Lightning apps, Flow, Apex, SOQL, Lightning Web Components, and related Salesforce configuration. The catalogue entries are the repository’s skills, plugins, commands, MCP servers, and agents for AI tools that support skills.

forcedotcom/sf-skills · 1,097 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add forcedotcom/sf-skills --skill agentforce-observe
Clone the repo
git clone --depth 1 https://github.com/forcedotcom/sf-skills

Made for: Claude Code.

Or install agentforce-adlc, the plugin that ships this one along with the rest of its 7 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agentforce-observe

README.md
[![agentmods](https://agentmods.dev/badge/skills/forcedotcom/sf-skills/agentforce-observe/github.svg)](https://agentmods.dev/skills/forcedotcom/sf-skills/agentforce-observe)
Your own site
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/agentforce-observe"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/agentforce-observe/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agentforce-observe

Your own site · 80×15
<a href="https://agentmods.dev/skills/forcedotcom/sf-skills/agentforce-observe"><img src="https://agentmods.dev/badge/skills/forcedotcom/sf-skills/agentforce-observe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Sept 2026
  • Snyk warn 18 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 106
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00195 $0.05612
Opus 5.5 $0.00078 $0.02245
Sonnet 5.5 $0.00039 $0.01122
Haiku 4.5 $0.00019 $0.00561

Measured 28d ago against content hash 9c9f626f0d23, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

agentforce-observe scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf force-app/main/default/main
plugins/builder/agentforce-adlc/skills/agentforce-observe/SKILL.md · 424 lines

How it starts

The opening of the file, as written. The whole thing — 424 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agentforce Observability

Improve Agentforce agents using session trace data and live preview testing.

Three-phase workflow:

  • Observe -- Query STDM sessions from Data Cloud (if available), OR run test suites + preview with local traces as fallback
  • Reproduce -- Use sf agent preview to simulate problematic conversations live
  • Improve -- Edit the .agent file directly, validate, publish, verify

Platform Notes

  • Shell examples below use bash syntax. On Windows, use PowerShell equivalents or Git Bash.
  • Replace python3 with python on Windows.
  • Replace /tmp/ with $env:TEMP\ (PowerShell) or %TEMP%\ (cmd).
  • Replace jq with python -c "import json,sys; ..." if jq is not installed.

Routing

Gather these inputs before starting:

  • Org alias (required) -- must be authenticated (else sf org login web)
  • Agent API name (required for preview and deploy; ask if not provided)
  • Agent file path (optional) -- path to the .agent file, typically force-app/main/default/aiAuthoringBundles/<AgentName>/<AgentName>.agent. Auto-detect if not provided.
  • Session IDs (optional) -- analyze specific sessions; if absent, query last 7 days
  • Days to look back (optional, default 7)
  • Alert owner user (optional, alerts only) -- user whose alerts to list/manage; defaults to the current user

Determine intent from user input:

  • No specific action -> run all three analysis phases: Observe -> surface issues -> ask if user wants to Reproduce and/or Improve
  • "analyze" / "sessions" / "what's wrong" -> Phase 1 only, then suggest next steps
  • "reproduce" / "test" / "preview" -> Phase 2 (run Phase 1 first if no issues in hand)
  • "fix" / "improve" / "update" -> Phase 3 (run Phase 1 first if no issues in hand)
  • "create alert" / "set up monitoring" / "alert me when" -> AHM (create)
  • "list alerts" / "show my alerts" / "update alert" / "delete alert" -> AHM (list / update via PUT / delete)
  • "get / list notifications" / "notifications for a specific alert" / "have my alerts fired" / "why isn't my alert firing" -> AHM: fetch notifications with header X-UNS-Type-Filter: all, report status + list; for a specific alert, filter by alertId from targetPageRef.state.c__alertId (15/18-char-safe), not metricId (+ Incidents view + metric verify)

Read the full file on GitHub · 424 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago Changed · +4 lines · +2 tokens per session 9c9f626f0d23
  2. 1mo ago Changed · +28 lines · +65 tokens per session 0f03dddee278
  3. 1mo ago First seen · 392 lines · 128 tokens per session scan C b52fe4b3bda2

Subscribe to this mod's changes

agentforce-observe is a skill published in the GitHub repository forcedotcom/sf-skills (1,097 stars, last pushed today), licensed Apache-2.0. It adds 195 tokens to every session and 5,612 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

diagnose

Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.

emdash-cms/emdash · 43 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

deck-retro

Run a fully local agent-deck retrospective over the user's own transcripts, Recall index and logs. Use when a user wants to find recurring failures or take their own finding from investigation through synthetic reproduction, a user-filed issue, a test-first fix and contributor PR handoff. Also use for weekly usage…

asheshgoplani/agent-deck · 86 tokens