Agent skill

Sf AI Agentscript

by Jaganpro in Jaganpro/sf-skills

Agent Script DSL for deterministic Agentforce agents. An agent skill from Jaganpro/sf-skills.

MITAuto-check passedTesting & QA

Install Sf AI Agentscript

skills CLI
$ npx skills add Jaganpro/sf-skills --skill sf-ai-agentscript -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jaganpro/sf-skills sf-ai-agentscript --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jaganpro/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sf-ai-agentscript .claude/skills/sf-ai-agentscript && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sf-ai-agentscript
GitHub stars
424
Token cost
~3.8k tokens
SKILL.md length
1,232 words
Files
87 (incl. scripts, references, assets)
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Agent Script DSL for deterministic Agentforce agents. An agent skill from Jaganpro/sf-skills.

  • Works in 9 steps: Service Agent vs Employee Agent → Recommended top-level block convention → Critical config fields → …
  • Edits .agent files
  • SKILL.md covers When This Skill Owns the Task, Right-Size Determinism, Required Context to Gather First and Activation Checklist, plus 9 more sections
  • Calls sf

What it does

Sf AI Agentscript is an agent skill from Jaganpro/sf-skills. Agent Script DSL for deterministic Agentforce agents. TRIGGER when: user writes or edits .agent files, builds FSM-based agents, uses Agent Script CLI (sf agent generate authoring-bundle, sf agent validate authoring-bundle, sf agent preview, sf agent publish authoring-bundle, sf agent activate), or asks about deterministic agent patterns, slot filling, or instruction resolution. DO NOT TRIGGER when: Builder metadata work (use sf-ai-agentforce), agent testing (use sf-ai-agentforce-testing), or persona design (use…

Its SKILL.md is about 3.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 90 other files, including scripts, reference files and assets (for example `CREDITS.md`, `README.md` and `VALIDATION.md`). Compatibility notes: Requires Agentforce license and API v66.0+; Einstein Agent User is required for Service Agents only

It sits in Testing & QA, covering Agent evaluation and testing. The repository describes itself as: [ARCHIVED — migrated to forcedotcom/afv-library] Salesforce Skills for Agentic Coding Tools — Apex, Flow, LWC, SOQL, Agentforce, Data Cloud, OmniStudio. Read-only archive; active… The licence is MIT.

When your agent uses it

  • Edits .agent files
  • Builds FSM-based agents
  • Uses Agent Script CLI (sf agent generate authoring-bundle
  • Sf agent validate authoring-bundle

Example prompts

  • “/sf-ai-agentscript”

Requirements

  • Compatibility (from SKILL.md): Requires Agentforce license and API v66.0+; Einstein Agent User is required for Service Agents only

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Service Agent vs Employee Agent
  2. Recommended top-level block convention
  3. Critical config fields
  4. Syntax blockers you should treat as immediate failures
  5. design the agent
  6. author the .agent
  7. validate continuously
  8. preview smoke test
  9. publish and activate

What it can do on your machine

Read from SKILL.md and the folder at commit 53c9956. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • sf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developer.salesforce.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Agentforce license and API v66.0+; Einstein Agent User is required for Service Agents only

    From compatibility in the SKILL.md frontmatter.

Context cost

Sf AI Agentscript loads about 3.8k tokens when it runs, and up to ~117k if it reads all its reference files. Until then it costs about 140 tokens; SKILL.md has 1,232 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~140
When it runs · the whole SKILL.md, loaded when a task matches
~3.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~117k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Jaganpro/sf-skills at commit 53c9956, republished under its MIT licence (© Jaganpro). 1,232 words, ~3,779 tokens.

Download SKILL.mdSave it as .claude/skills/sf-ai-agentscript/SKILL.md (or your agent's skills folder). This skill also uses 86 other files; get the full folder from GitHub.
name
sf-ai-agentscript
description
Agent Script DSL for deterministic Agentforce agents. TRIGGER when: user writes or edits .agent files, builds FSM-based agents, uses Agent Script CLI (sf agent generate authoring-bundle, sf agent validate authoring-bundle, sf agent preview, sf agent publish authoring-bundle, sf agent activate), or asks about deterministic agent patterns, slot filling, or instruction resolution. DO NOT TRIGGER when: Builder metadata work (use sf-ai-agentforce), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).
compatibility
Requires Agentforce license and API v66.0+; Einstein Agent User is required for Service Agents only
license
MIT
metadata.version
2.9.0
metadata.author
Jag Valaiyapathy
metadata.scoring
100 points across 6 categories
metadata.validated
0-shot generation tested against multiple representative sample agents. Agent user setup validated against representative Service Agent and Employee Agent…
metadata.last_validated
2026-03-20
metadata.validation_status
PASS
metadata.validation_agents
24
metadata.validate_by
2026-04-10

SF-AI-AgentScript Skill

Agent Script is the code-first path for deterministic Agentforce agents. Use this skill when the user is authoring .agent files, building finite-state topic flows, or needs repeatable control over routing, variables, actions, and publish behavior.

Start with the shortest guide first: references/activation-checklist.md

Migrating from the Builder UI? Use references/migration-guide.md

When This Skill Owns the Task

Use sf-ai-agentscript when the work involves:

  • creating or editing .agent files
  • deterministic topic routing, guards, and transitions
  • Agent Script CLI workflows (sf agent generate authoring-bundle, sf agent validate authoring-bundle, sf agent preview, sf agent publish authoring-bundle, sf agent activate)
  • slot filling, instruction resolution, post-action loops, or FSM design

Delegate elsewhere when the user is:

If the user is in Builder Script / Canvas view but the outcome is a .agent authoring bundle, keep the work in sf-ai-agentscript.


Right-Size Determinism

  • Determinism is a dial, not a destination.
  • Use Agent Script when “mostly right” is not acceptable: gates, mandatory sequencing, explicit state transitions, compliance, or drift control.
  • If a workflow is fully static and linear, use Flow or Apex instead of scripting the conversation.
  • Prefer a deterministic envelope: deterministic entry/gate → flexible middle → deterministic closeout.
  • More determinism is not automatically better. Start minimal, then harden only the parts that show routing drift, sequencing failures, or compliance risk.

Required Context to Gather First

Ask for or infer:

  • agent purpose and whether Agent Script is truly the right fit
  • Service Agent vs Employee Agent
  • target org and publish intent
  • expected actions / targets (Flow, Apex, PromptTemplate, etc.)
  • whether the request is authoring, validation, preview, or publish troubleshooting

Activation Checklist

Before you author or fix any .agent file, verify these first:

  1. Exactly one start_agent block
  2. No mixed tabs and spaces
  3. Booleans are True / False
  4. No else if and no nested if
  5. No top-level actions: block
  6. No @inputs in set expressions
  7. linked variables have no defaults
  8. linked variables do not use object / list types
  9. Use explicit agent_type
  10. Use @actions. prefixes consistently
  11. Use run @actions.X only when X is a topic-level action definition with target:
  12. Do not branch directly on raw @system_variables.user_input contains/startswith/endswith for intent routing
  13. On prompt-template outputs, prefer is_displayable: False + is_used_by_planner: True
  14. Do not assume @outputs.X is scalar — inspect the output schema before branching or assignment

For the expanded version, use references/activation-checklist.md.


Non-Negotiable Rules

1) Service Agent vs Employee Agent
Agent typeRequiredForbidden / caution
AgentforceServiceAgentValid default_agent_user, correct permissions, target-org checks, prefer sf org create agent-userPublishing without a real Einstein Agent User
AgentforceEmployeeAgentExplicit agent_typeSupplying default_agent_user

Full details: references/agent-user-setup.md

Use this order for consistency in this skill's examples and reviews:

yaml
config:
variables:
system:
connection:
knowledge:
language:
start_agent:
topic:

Official Salesforce materials present top-level blocks in differing sequences, and local validation evidence indicates multiple orderings compile. Treat this as a style convention, not a standalone correctness or publish blocker.

3) Critical config fields
FieldRule
developer_nameMust match folder / bundle name
descriptionPublic docs/examples should use this config field
agent_typeSet explicitly every time
default_agent_userService Agents only

Local tooling also accepts agent_description: for compatibility, but this skill's public docs and examples should prefer description:.

4) Syntax blockers you should treat as immediate failures
  • else if
  • nested if
  • comment-only if bodies
  • top-level actions:
  • invocation-level inputs: / outputs: blocks
  • reserved variable / field names like description and label

Canonical rule set: references/syntax-reference.md and references/validator-rule-catalog.md


Phase 1 — design the agent
  • decide whether the problem is actually deterministic enough for Agent Script
  • model topics as states and transitions as edges
  • define only the variables you truly need
Phase 2 — author the .agent
  • create config, system, start_agent, and topics first
  • add target-backed actions with full inputs: and outputs:
  • use available when for deterministic tool visibility
  • normalize raw intent/validation signals into booleans or enums before branching; avoid direct substring checks on raw user utterances for critical control flow
  • keep post-action checks at the top of instructions: ->
Default authoring stance
  • Default to direct .agent authoring and edits in source control.
  • Use sf agent generate authoring-bundle --no-spec only when the user wants local bundle scaffolding.
  • Treat sf agent generate agent-spec as optional ideation / topic bootstrap, not the default workflow.
  • Do not route Agent Script users toward sf agent create or sf agent generate template.
Show full SKILL.md (504 more words)Show less
Phase 3 — validate continuously

Validation already runs automatically on write/edit. Use the CLI before publish:

bash
sf agent validate authoring-bundle --api-name MyAgent -o TARGET_ORG --json

The validator covers structure, runtime gotchas, target readiness, and org-aware Service Agent checks. Rule IDs live in references/validator-rule-catalog.md.

Phase 4 — preview smoke test

Use the preview loop before publish:

  • derive 3–5 smoke utterances
  • start preview with the start / send / end subcommands, not bare sf agent preview
  • if you use --authoring-bundle, always choose a mode explicitly: --simulate-actions or --use-live-actions
  • inspect topic routing / action invocation / safety / grounding
  • fix and rerun up to 3 times

Full loop: references/preview-test-loop.md

Phase 5 — publish and activate
bash
sf agent publish authoring-bundle --api-name MyAgent -o TARGET_ORG --json

# Manual activation
sf agent activate --api-name MyAgent -o TARGET_ORG

# CI / deterministic activation of a known BotVersion
sf agent activate --api-name MyAgent --version <n> -o TARGET_ORG --json

Publishing does not activate the agent. For automation, prefer --version <n> --json so activation is deterministic and machine-readable.


Deterministic Building Blocks

These execute as code, not suggestions:

  • conditionals
  • available when guards
  • variable checks
  • direct set / transition to
  • run @actions.X only when X is a topic-level action definition with target:
  • variable injection into LLM-facing text

Important distinction:

  • Deterministic: set, transition to, and run @actions.X for a target-backed topic action
  • LLM-directed: reasoning.actions: utilities / delegations such as @utils.setVariables, @utils.transition, and {!@actions.X} instruction references

If you need deterministic behavior for something that is currently modeled as a reasoning-level utility, either:

  • rewrite it as direct set / transition to, or
  • promote it to a topic-level target-backed action and run that action

See references/instruction-resolution.md and references/architecture-patterns.md.


Cross-Skill Integration

Cross-Skill Orchestration

TaskDelegate toWhy
Build flow:// targetssf-flowFlow creation / validation
Build Apex action targetssf-apex@InvocableMethod and business logic
Test topic routing / actionssf-ai-agentforce-testingFormal test specs and fix loops
Deploy / publishsf-deployDeployment orchestration

High-Signal Failure Patterns

SymptomLikely causeRead next
Internal Error during publishinvalid Service Agent user or missing action I/Oreferences/agent-user-setup.md, references/actions-reference.md
invalid input/output parameters on prompt template actionTarget template is in Draft status — activate it firstreferences/action-prompt-templates.md
Parser rejects conditionalselse if, nested if, empty if bodyreferences/syntax-reference.md
Action target issuesmissing Flow / Apex target, inactive Flow, bad schemasreferences/actions-reference.md
Prompt template runs but user sees blank responseprompt output marked is_displayable: Truereferences/production-gotchas.md, references/action-prompt-templates.md
Prompt action runs but planner behaves like output is missingoutput hidden from direct display but not planner-visiblereferences/production-gotchas.md, references/actions-reference.md
ACTION_NOT_IN_SCOPE on run @actions.Xrun points at a utility / delegation / unresolved action instead of a topic-level target-backed definitionreferences/syntax-reference.md, references/instruction-resolution.md
Deterministic cancel / revise / URL checks behave inconsistentlyraw @system_variables.user_input matching or string-method guards are being used as control-flow-critical validationreferences/syntax-reference.md, references/production-gotchas.md
@outputs.X comparisons or assignments behave unexpectedlythe action output is structured/wrapped, not a plain scalarreferences/actions-reference.md, references/syntax-reference.md
Preview and runtime disagreelinked vars / context / known platform issuesreferences/known-issues.md
Validate passes but publish failsorg-specific user / permission / retrieve-back issuereferences/production-gotchas.md, references/cli-guide.md

Reference Map

Start here
Publish / runtime safety
Architecture / reasoning
Validation / testing / debugging
Examples / scaffolds
Project documentation

Score Guide

ScoreMeaning
90+Deploy with confidence
75–89Good, review warnings
60–74Needs focused revision
< 60Block publish

Full rubric: references/scoring-rubric.md


Official Resources

© Jaganpro, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 86 other files (scripts, references, assets) in skills/sf-ai-agentscript of Jaganpro/sf-skills.

  • SKILL.md
  • CREDITS.md
  • LICENSE
  • README.md
  • VALIDATION.md
  • assets/README.md
  • assets/agents/README.md
  • assets/agents/hello-world-employee.agent
  • assets/agents/hello-world.agent
  • assets/agents/multi-topic.agent
  • assets/agents/production-faq.agent
  • assets/agents/production-faq.bundle-meta.xml
  • assets/agents/simple-qa.agent
  • assets/apex/models-api-queueable.cls
  • assets/bundle-meta.xml
  • assets/components/apex-action.agent
  • assets/components/error-handling.agent
  • … and 70 more

Open the folder on GitHubat commit 53c9956

Compare with similar skills

Sf AI Agentscript next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sf AI Agentscript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sf AI Agentscript this skillJaganpro/sf-skills424—~3.8kAutomated safety check: PassMIT
OpenHarness End-to-End EvalsHKUDS/OpenHarness16k1 repos~2.1kAutomated safety check: NotesMIT
Skill Testdatabricks-solutions/ai-dev-kit1.9k—~1.9kAutomated safety check: PassCustom licence
Senpi Agent QA Harnesscode-yeongyu/senpi472—~2.7kAutomated safety check: NotesMIT
Caliper Harness Smoke Testedonadei/caliper207—~664Automated safety check: PassMIT
Eval Triage And Improvementmicrosoft/eval-guide138—~5.9kAutomated safety check: PassMIT

Similar skills

  • Validates OpenHarness features by running real multi-turn agent loops with live LLM calls against an unfamiliar codebase, checking actual tool execution.

    16k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check: notes
  • Skill Test

    databricks-solutions/ai-dev-kit

    Testing framework for evaluating Databricks skills. An agent skill from databricks-solutions/ai-dev-kit.

    1.9k GitHub stars~1.9k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Senpi Agent QA Harness

    code-yeongyu/senpi

    Checks changes to the senpi coding agent by driving the real CLI from source in an isolated sandbox, over RPC, terminal UI, mock model and CLI smoke channels.

    472 GitHub stars~2.7k tokensUpdated today
    Testing & QAAuto-check: notes
  • Runs caliper's smoke evals against the real agent CLIs after a harness or MCP change, with a dry-run plan, failure triage and a report to attach to the PR.

    207 GitHub stars~664 tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Eval Triage And Improvement

    microsoft/eval-guide

    Official

    A skill your agent uses when the user's Copilot Studio agent evaluations have come back and they need to interpret scores, diagnose root causes of underperforming test cases, find remediation steps…

    138 GitHub stars~5.9k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Eval Guide

    microsoft/eval-guide

    Official

    Eval enablement accelerator — help customers think through "what does good look like" for their AI agent, then generate a structured eval plan and test cases they can use immediately.

    138 GitHub stars~22k tokensUpdated 3 mo ago
    Testing & QAAuto-check: warnings

More from Jaganpro/sf-skills

All 36 skills in this repo
  • Agentforce session tracing extraction and analysis. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Datacloud

    Jaganpro/sf-skills

    Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.

    424 GitHub stars~2.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Diagram Mermaid

    Jaganpro/sf-skills

    Salesforce architecture diagrams using Mermaid with ASCII fallback.

    424 GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Diagram Nanobananapro

    Jaganpro/sf-skills

    AI-powered image generation for Salesforce visuals via Nano Banana Pro.

    424 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Flow

    Jaganpro/sf-skills

    Creates and validates Salesforce Flows with 110-point scoring.

    424 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Sf Integration

    Jaganpro/sf-skills

    Salesforce integration architecture with 120-point scoring. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~1.5k tokensUpdated 5 mo ago
    Auto-check passed

Questions about Sf AI Agentscript

What does Sf AI Agentscript do?

Agent Script DSL for deterministic Agentforce agents. An agent skill from Jaganpro/sf-skills. Sf AI Agentscript is an agent skill from Jaganpro/sf-skills. Agent Script DSL for deterministic Agentforce agents.

When should I use Sf AI Agentscript?

Sf AI Agentscript fits situations like: edits .agent files; builds FSM-based agents; uses Agent Script CLI (sf agent generate authoring-bundle; sf agent validate authoring-bundle.

How do I install Sf AI Agentscript in Claude Code?

Run `npx skills add Jaganpro/sf-skills --skill sf-ai-agentscript -a claude-code`. Or copy the skill folder (skills/sf-ai-agentscript in Jaganpro/sf-skills) into .claude/skills/sf-ai-agentscript in your project. Claude Code loads it when a task matches its description.

How do I install Sf AI Agentscript in Codex?

Run `npx skills add Jaganpro/sf-skills --skill sf-ai-agentscript -a codex`. Or copy the skill folder (skills/sf-ai-agentscript in Jaganpro/sf-skills) into .agents/skills/sf-ai-agentscript in your project. Codex loads it when a task matches its description.

Can I use Sf AI Agentscript in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jaganpro/sf-skills --skill sf-ai-agentscript -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sf-ai-agentscript, .gemini/skills/sf-ai-agentscript, .github/skills/sf-ai-agentscript and .opencode/skills/sf-ai-agentscript in your project.

What does Sf AI Agentscript need to run?

Going by SKILL.md and its folder, Sf AI Agentscript needs the command-line tools its instructions call (sf). Compatibility (from SKILL.md): Requires Agentforce license and API v66.0+; Einstein Agent User is required for Service Agents only.

Does Sf AI Agentscript access the network?

SKILL.md names 2 domains. As links in the text: developer.salesforce.com and github.com. This is read from the text; nothing was executed.

Is Sf AI Agentscript safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Sf AI Agentscript use?

Sf AI Agentscript is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sf AI Agentscript use?

About 3.8k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 113k tokens, read only when the agent opens those files.

What are the alternatives to Sf AI Agentscript?

Skills that share tags, products or a category with Sf AI Agentscript: OpenHarness End-to-End Evals (HKUDS/OpenHarness, 16k stars), Skill Test (databricks-solutions/ai-dev-kit, 1.9k stars), Senpi Agent QA Harness (code-yeongyu/senpi, 472 stars) and Caliper Harness Smoke Test (edonadei/caliper, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sf AI Agentscript?

Jaganpro (a GitHub user) maintains it in Jaganpro/sf-skills, which has 424 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on April 27, 2026.

Source: Jaganpro/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.