grzmol/vibe-force/sf-agentforce-development
Claude Code and agent skill by grzmol/vibe-force
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Building, previewing, testing and shipping Agentforce agents from a source-tracked SFDX project - authoring bundles and Agent Script, the Bot/BotVersion/GenAiPlannerBundle/GenAiPlugin/GenAiFunction metadata graph, custom agent actions written as invocable Apex, autolaunched Flows or prompt templates, action input/output JSON schemas, prompt templates and grounding, the agent user and the permissions it runs under, AiEvaluationDefinition test definitions and the sf agent test commands, agent preview in simulated and live mode, trace analysis, and moving an agent from scratch org to sandbox to production. Use this skill when a story mentions an agent, a copilot, a subagent, a topic, an agent action, an authoring bundle, a .agent file, Agentforce Builder, Testing Center, Prompt Builder, an @InvocableMethod that an agent calls, or when an agent routes to the wrong action, returns data the running user should not see, or fails to activate after a deploy.
Install
npx vskill@latest install grzmol/vibe-force/sf-agentforce-developmentSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as grzmol/vibe-force/sf-agentforce-development.
Agentforce agent development
An agent is metadata. It moves through the same retrieve/deploy/version-control loop as Apex, and it breaks in the same ways: wrong permissions, wrong deploy order, untested contracts. The parts that are genuinely new are the planner (an LLM chooses which action to run, from your prose) and the agent user (every action runs as a service user, not as the person chatting).
This skill covers the API 67.0 metadata shape pinned in config/vibe-force.defaults.json, and names what changes at 68.0. Grounding data modelled in Data 360 belongs to skill sf-data-cloud; this skill links to it rather than re-explaining data streams, DMOs or retrievers.
When to use
| Situation | Tool | Why | |
|---|---|---|---|
| Free-form user request, unknown number of steps, natural language in and out | Agent | The planner picks actions at runtime; you cannot enumerate the branches | |
| Deterministic multi-step process with known branches, admin-maintainable | Flow | No LLM cost, no non-determinism, testable by construction (skill sf-flow-automation) | |
| Transactional logic, bulk DML, callouts, anything needing exact control | Apex | Wrap it in @InvocableMethod and let the agent call it - do not push logic into instructions | |
| Fixed UI on a record page, known inputs, sub-second response | LWC | An agent is the wrong shape for a form (skill sf-lwc-development) | |
| One prompt, one record, one generated field or email | Prompt template alone | No agent needed; call it from Flow, Apex or the Connect API | |
| Needs an auditable, repeatable, identical result every run | Not an agent | LLM output varies; tests score, they do not assert equality | |
| Story says "summarise", "answer questions about", "help the rep decide" | Agent | Then read references/action-patterns.md before writing any Apex |
| Trigger | Go to | |
|---|---|---|
| "Create an agent", "new subagent", "new topic" | Patterns 1-3, references/agent-cli-reference.md | |
| "Add an action" of any kind | Pattern 4, references/action-patterns.md | |
| Action description / routing quality problem | Action design section, Anti-patterns | |
| "Test the agent", "Testing Center", regression suite | Pattern 6, references/testing-and-evaluation.md | |
| Moving an agent between orgs, activation, packaging | Pattern 7-8, references/deployment-checklist.md | |
| "What metadata type is X", manifest authoring | references/metadata-reference.md | |
| Agent reads records the end user must not see | Anti-patterns, skill sf-security-model |
Core patterns
1. Provision an org that can run agents
agent CLI commands fail with This feature is not currently enabled for this user type or org when Einstein or Agentforce is off. Scratch orgs turn both on declaratively:
Sandboxes need the same two switches set manually in Setup after creation. If the agent grounds on Data 360, use a sandbox, not a scratch org - see skill sf-data-cloud.
2. Create the agent user before the agent
Every action an agent runs executes as a dedicated Salesforce user. Create it first, because the Agent Script file references it by username:
The command assigns the Einstein Agent User profile plus the AgentforceServiceAgentBase, AgentforceServiceAgentUser and EinsteinGPTPromptTemplateUser permission sets, and verifies the licences exist. It does not grant object, field or record access for your data - that is a permission set you write (skill sf-security-model). The generated user has no password and cannot log in.
3. Author from a spec, not from a blank file
The bundle lands in force-app/main/default/aiAuthoringBundles/Opportunity_Coach/ as Opportunity_Coach.agent plus Opportunity_Coach.bundle-meta.xml. A bundle generated with --no-spec is boilerplate; a thin spec produces generic subagents. Spec quality is the single biggest lever on generated output.
4. Declare an action with an explicit contract
Agent Script actions name a target by URI scheme - apex, flow or prompt - and declare typed inputs and outputs:
The Apex behind it obeys the invocable contract - one list in, a list of the same size and order out, USER_MODE on every query:
Full annotation rules, the Flow and prompt-template variants, and the GenAiFunction JSON schema form live in references/action-patterns.md. The general @InvocableMethod contract is owned by skill sf-flow-automation.
5. Preview before publishing
Live mode uses whatever is deployed, so deploy the Apex first. Preview writes trace files; read them by dimension instead of guessing:
--dimension accepts actions, grounding, routing, errors. Routing answers "why did it pick that subagent"; actions answers "what did it actually call, with what inputs".
6. Publish, then test with a spec-driven suite
agent test create writes an AiEvaluationDefinition component back into the project. The agent must exist in the org before the test can be created. Expectations are scored, not asserted: topic_sequence_match and action_sequence_match are the deterministic ones and the only sensible CI gate. See references/testing-and-evaluation.md.
7. Move the agent between orgs
At API 67.0 an agent is a graph, not a file. Retrieve the whole graph the first time:
With source tracking on, --metadata Agent:Opportunity_Coach is a CLI-only shorthand that resolves the whole agent graph. The retrieved metadata carries the source org's agent username; replace it before deploying, or the agent cannot run in the target. Deploy order, the draft/committed distinction and post-deploy checks are in references/deployment-checklist.md.
8. Activate deliberately
Only one version is active at a time, and --version is the number in vN.botVersion-meta.xml. A deployed agent is not a live agent. Activation is a separate, reversible step and belongs in the release runbook, not in the deploy command (skill sf-deployment-strategies).
Action design
The planner reads your prose. Descriptions are the routing algorithm's only input, so they are production code, not documentation.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sf-agentforce-development/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/grzmol/vibe-force/sf-agentforce-development)