build-agentforce-action

build-agentforce-action is a command for Claude Code from BanibrataChatterjee/AwesomeSalesforceSkills. It costs 0 tokens per session (575 once invoked), scanned A, original, Apache-2.0.

A scaffold for a Salesforce Agentforce action, which is an operation an AI agent can invoke for a user or business process. It defines the action in Apex and connects it to an Agentforce topic and agent definition.

In plain words
What is it for?
Use it to create an invocable Apex action, topic YAML, agent definition, test class, and starter evaluation. It supports read, write, composite, and external-callout action designs.
Why use it?
It makes the action’s purpose, data context, invoking person, and trust limits explicit before code is written. This helps keep AI-invoked operations constrained and testable.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to create an invocable Apex action, topic YAML, agent definition, test class, and starter evaluation. It supports read, write, composite, and external-callout action designs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action
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.

Clone the repo
git clone --depth 1 https://github.com/BanibrataChatterjee/AwesomeSalesforceSkills

Made for: Claude Code.

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 build-agentforce-action

README.md
[![agentmods](https://agentmods.dev/badge/commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action/github.svg)](https://agentmods.dev/commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action)
Your own site
<a href="https://agentmods.dev/commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action"><img src="https://agentmods.dev/badge/commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action/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 build-agentforce-action

Your own site · 80×15
<a href="https://agentmods.dev/commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action"><img src="https://agentmods.dev/badge/commands/banibratachatterjee/awesomesalesforceskills/build-agentforce-action.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00575
Opus 5 $0.00000 $0.00287
Sonnet 5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00057

Measured 10d ago against content hash 81068f249f2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

build-agentforce-action scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/build-agentforce-action.md · 80 lines

How it starts

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

/build-agentforce-action — Scaffold a complete Agentforce action

Wraps agents/agentforce-builder/AGENT.md. Produces Apex @InvocableMethod + topic YAML + agent definition + test class + starter eval.


Step 1 — Collect inputs (ask all five upfront)

Ask:

1. Action name (user-facing label)?
   Example: "Summarize Account Cases"

2. Primary sObject the action grounds on?
   Example: Account

3. Actor invoking the action?
   Example: Service Agent / Sales Rep / Customer

4. Intent (what should the action do)?
   One or two sentences. What data does it retrieve / what does it change?

5. Trust constraints?
   Pick any that apply: no-pii-in-prompt, mask-email, no-external-callout,
   require-user-confirmation, audit-every-invocation, rate-limit-per-actor.
   Add free-form constraints as needed.

If any of the five is missing, STOP and ask.


Step 2 — Load the agent

Read agents/agentforce-builder/AGENT.md fully + the Agentforce skills + evals/framework.md + the templates under templates/agentforce/.


Step 3 — Execute

Follow the 6-step plan:

  1. Classify the action (read-only / write / composite / callout)
  2. Generate the Apex action class (subclass AgentActionSkeleton, CRUD/FLS via SecurityUtils, logging via ApplicationLogger)
  3. Generate the topic YAML (classifier prompt, scope boundary, grounding sources, confirmation flag)
  4. Generate the agent definition JSON
  5. Generate the test class (including bulk + runAs + wrong-actor tests)
  6. Generate the starter golden eval

Step 4 — Deliver

  • Action summary
  • Generated files, each as a fenced block labelled with its target path:
    • Apex action class + meta
    • Test class + meta
    • Topic YAML
    • Agent meta XML
    • Golden eval markdown
  • Trust checklist (each constraint → where it's enforced)
  • Citations

Step 5 — Recommend follow-ups

  • /gen-tests if additional coverage beyond the scaffold is needed
  • /scan-security on the action Apex before promoting to production
  • Deploy the eval file under evals/golden/ and run evals/scripts/run_evals.py

Read the full file on GitHub · 80 lines

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. 10d ago First seen · 80 lines · 0 tokens per session scan A 81068f249f2e

Subscribe to this mod's changes

build-agentforce-action is a command published in the GitHub repository BanibrataChatterjee/AwesomeSalesforceSkills (3 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 575 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.