skills/sf-ai-agentforce-testing/SKILL.md
Agentforce agent testing with dual-track workflow and 100-point scoring. TRIGGER when: user tests Agentforce agents, runs sf agent test commands, creates test specs, validates topic routing, or analyzes agent test coverage. DO NOT TRIGGER when: Apex unit tests (use sf-testing), building agents (use sf-ai-agentforce), or Agent Script DSL (use sf-ai-agentscript).
npx skillsauth add jaganpro/claude-code-sfskills sf-ai-agentforce-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user needs formal Agentforce testing: multi-turn conversation validation, CLI Testing Center specs, topic/action coverage analysis, preview checks, or a structured test-fix loop after publish.
Use sf-ai-agentforce-testing when the work involves:
sf agent test workflowsDelegate elsewhere when the user is:
sf org login web authentication; ECA is only required for Agent Runtime API testing, not for live preview.curl for OAuth token validation in the ECA flow; use the provided credential tooling.Use the existing scripts under:
~/.claude/skills/sf-ai-agentforce-testing/hooks/scripts/These scripts are pre-approved. Do not recreate them.
<a id="phase-0-prerequisites--agent-discovery"></a>
Ask for or infer:
Preflight checks:
Use when you need:
Requires:
Use when you need:
sf agent test workflowsFor manual validation without full formal testing, use preview workflows first, then escalate to Track A or B as needed.
Cover at least:
sf agent test commandsTypical failure buckets:
When failures imply agent-authoring issues:
Never skip these:
Avoid these anti-patterns:
curl commandsWhen finishing a run, report in this order:
Suggested shape:
Agent: <name>
Track: Multi-turn API | CLI Testing Center | Preview
Executed: <specs / scenarios / turns>
Result: <passed / partial / failed>
Coverage: <topics, actions, guardrails, context>
Issues: <highest-signal failures>
Next step: <fix, republish, rerun, or expand coverage>
| Need | Delegate to | Reason | |---|---|---| | fix Agent Script logic | sf-ai-agentscript | authoring and deterministic fix loops | | create test data | sf-data | action-ready data setup | | fix Flow-backed actions | sf-flow | Flow repair | | fix Apex-backed actions | sf-apex | Apex repair | | set up ECA / OAuth for Agent Runtime API | sf-connected-apps | auth and app configuration | | analyze session telemetry | sf-ai-agentforce-observability | STDM / trace analysis |
| Score | Meaning | |---|---| | 90+ | production-ready test confidence | | 80–89 | strong coverage with minor gaps | | 70–79 | acceptable but coverage expansion recommended | | 60–69 | partial validation only | | < 60 | insufficient confidence; block release |
development
Lightning Web Components with PICKLES methodology and 165-point scoring. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use sf-apex), Aura components, or Visualforce.
tools
Use this skill whenever users want to build, inspect, debug, automate, or publish workflows in Agentforce Grid (AI Workbench) using Salesforce plus the Grid MCP or direct Grid REST calls. Trigger it for Grid workbook creation, worksheet setup, Object/Reference/AI/Agent/AgentTest/Evaluation/PromptTemplate/InvocableAction column design, prompt drafting inside Grid, worksheet execution troubleshooting, Grid YAML `apply_grid` specs, and Windows-specific Grid setup issues. Also use it when users mention AI Workbench, Grid Studio, workbook IDs, worksheet IDs, Grid Connect, or ask for recipes like "top opportunities with AI email drafts", "agent test suite in Grid", or "build this worksheet from YAML". Do not use it for generic Salesforce work unrelated to Agentforce Grid.
development
Salesforce Flex Credit estimation for Agentforce and Data Cloud workloads. TRIGGER when: user needs cost projections, scenario planning, budget sizing, or architecture tradeoff analysis for Agentforce prompts/actions, Data Cloud meters, or monthly Flex Credit usage. DO NOT TRIGGER when: user is building Agentforce metadata or .agent files themselves (use sf-ai-agentforce or sf-ai-agentscript), implementing Data Cloud assets (use sf-datacloud-*), or asking for contract-specific commercial approval that depends on non-public pricing terms.
testing
Permission Set analysis, hierarchy viewer, and access auditing. TRIGGER when: user asks "who has access to X?", analyzes permission sets/groups, or touches .permissionset-meta.xml / .permissionsetgroup-meta.xml files. DO NOT TRIGGER when: creating new metadata (use sf-metadata), deploying permission sets (use sf-deploy), or Apex sharing logic (use sf-apex).