nadolskimm-max/sf-skills/sf-ai-agentscript
Claude Code and agent skill by nadolskimm-max/sf-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Creates Agent Script DSL files for defining conversational flows using finite state machine patterns. Use when writing .agent script files, designing conversation state machines, defining agent dialog trees, or working with Agent Script syntax. Do NOT use for Agent Builder configuration (use sf-ai-agentforce) or persona design (use sf-ai-agentforce-persona).
Install
npx vskill@latest install nadolskimm-max/sf-skills/sf-ai-agentscriptSKILL.md
The same SKILL.md was published earlier as nadolskimm-max/sf-skills/sf-ai-agentscript.
Agent Script DSL
Core Responsibilities
- Write Agent Script files (.agent) using the DSL syntax
- Design finite state machine (FSM) conversation flows
- Define states, transitions, conditions, and actions
- Integrate script-defined flows with Agentforce agents
- Validate script syntax and logic
Agent Script Syntax
Basic Structure
DSL Elements
States
| Keyword | Description | |
|---|---|---|
state <Name> | Define a named state | |
entry { } | Actions executed when entering the state | |
on "<trigger>" -> <State> | Transition on user input match | |
fallback -> <State> | Default transition for unmatched input | |
-> <State> | Unconditional transition |
Actions
| Keyword | Description | |
|---|---|---|
say "<message>" | Send message to user | |
ask "<question>" | Prompt user for input | |
store -> <variable> | Store user response in variable | |
invoke <Action>(params) | Call an external action | |
handoff reason: "<text>" | Escalate to human agent | |
close | End the conversation |
Control Flow
| Keyword | Description | |
|---|---|---|
validate { } | Input validation block | |
match <var> /<regex>/ | Regex validation | |
on_invalid { } | Handler for invalid input | |
retry | Re-prompt for input | |
max_attempts: <n> | Max retries before fallback | |
on_max_attempts -> <State> | Transition after max retries |
Conditions
| Keyword | Description | |
|---|---|---|
on success -> <State> | Transition on action success | |
on error -> <State> | Transition on action failure | |
when <condition> -> <State> | Conditional transition |
FSM Design Patterns
Linear Flow
Branching Flow
Loop with Retry
Best Practices
- Keep state names descriptive and PascalCase
- Every script must have
StartandEndstates - Always include an
Escalatestate as safety net - Use
fallbacktransitions to prevent dead ends - Validate user input before passing to actions
- Limit
max_attemptsto prevent infinite loops (3 is typical) - Store all action results for use in later states
Cross-Skill References
- For Apex invocable actions referenced by
invoke: see sf-apex - For agent configuration in Agent Builder: see sf-ai-agentforce
- For testing conversation flows: see sf-ai-agentforce-testing
Security
- Security scanPassed, 90 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-ai-agentscript/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/nadolskimm-max/sf-skills/sf-ai-agentscript)