Salesforce AI Agentforce Testing
by @dsouza-anush
Agentforce agent testing with dual-track workflow and 100-point scoring. TRIGGER when: user tests Agentforce agents, runs sf agent test commands, creates tes...
clawhub install sf-ai-agentforce-testingπ About This Skill
name: sf-ai-agentforce-testing description: > 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). license: MIT compatibility: "Requires API v66.0+ (Spring '26) and Agentforce enabled org" metadata: version: "2.1.0" author: "Jag Valaiyapathy" scoring: "100 points across 7 categories"
sf-ai-agentforce-testing: Agentforce Test Execution & Coverage Analysis
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.
When This Skill Owns the Task
Use sf-ai-agentforce-testing when the work involves:
sf agent test workflowsDelegate elsewhere when the user is:
Core Operating Rules
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.Script path rule
Use the existing scripts under:~/.claude/skills/sf-ai-agentforce-testing/hooks/scripts/These scripts are pre-approved. Do not recreate them.
Required Context to Gather First
Ask for or infer:
Preflight checks: 1. discover the agent 2. confirm publish / activation state 3. verify dependencies (Flows, Apex, data) 4. choose testing track
Dual-Track Workflow
Track A β Multi-turn API testing (primary)
Use when you need:Requires:
Track B β CLI Testing Center (secondary)
Use when you need:sf agent test workflowsQuick manual path
For manual validation without full formal testing, use preview workflows first, then escalate to Track A or B as needed.Recommended Workflow
1. Discover and verify
2. Plan tests
Cover at least:3. Execute the right track
#### Track A#### Track B
sf agent test commands4. Classify failures
Typical failure buckets:5. Run fix loop
When failures imply agent-authoring issues:Testing Guardrails
Never skip these:
Avoid these anti-patterns:
curl commandsOutput Format
When finishing a run, report in this order: 1. Test track used 2. What was executed 3. Pass/fail summary 4. Coverage gaps 5. Root-cause themes 6. Recommended fix loop / next test step
Suggested shape:
Agent:
Track: Multi-turn API | CLI Testing Center | Preview
Executed:
Result:
Coverage:
Issues:
Next step:
Cross-Skill Integration
| 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 |
Reference Map
Start here
Execution / auth
Coverage / fix loops
Advanced / specialized
Templates / assets
Score Guide
| 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 |