Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sf-ai-agentscript

БесплатноБез исполняемых скриптовНе проверен

Agent Script DSL for deterministic Agentforce agents. TRIGGER when: user writes or edits .agent files, builds FSM-based agents, uses Agent Script CLI (sf…

Jaganproот Jaganpro★ 420 звёзд на GitHub

Об этом скилле

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 type Required Forbidden / caution
AgentforceServiceAgent Valid default_agent_user, correct permissions, target-org checks, prefer sf org create agent-user Publishing without a real Einstein Agent User
AgentforceEmployeeAgent Explicit agent_type Supplying default_agent_user

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

2) Recommended top-level block convention

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

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

Field Rule
developer_name Must match folder / bundle name
description Public docs/examples should use this config field
agent_type Set explicitly every time
default_agent_user Service 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 li
Полный SKILL.md на GitHub

Установить sf-ai-agentscript в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

CREDITS.mdLICENSEREADME.mdVALIDATION.mdassets/README.mdassets/agents/README.mdassets/agents/hello-world-employee.agentassets/agents/hello-world.agentassets/agents/multi-topic.agentassets/agents/production-faq.agentassets/agents/production-faq.bundle-meta.xmlassets/agents/simple-qa.agentassets/apex/models-api-queueable.clsassets/bundle-meta.xmlassets/components/apex-action.agentassets/components/error-handling.agentassets/components/escalation-setup.agentassets/components/flow-action.agentassets/components/n-ary-conditions.agentassets/components/topic-with-actions.agentassets/deterministic-routing.agentassets/escalation-pattern.agentassets/flow-action-lookup.agentassets/hub-and-spoke.agentassets/metadata/basic-genai-prompt-template.genAiPromptTemplate-meta.xmlassets/metadata/genai-function-apex.xmlassets/metadata/genai-function-flow.xmlassets/metadata/genai-plugin.xmlassets/metadata/http-callout-flow.flow-meta.xmlassets/metadata/record-grounded-genai-prompt-template.genAiPromptTemplate-meta.xmlassets/minimal-starter.agentassets/patterns/README.mdassets/patterns/action-callbacks.agentassets/patterns/advanced-input-bindings.agentassets/patterns/bidirectional-routing.agentassets/patterns/critical-input-collection.agentassets/patterns/delegation-routing.agentassets/patterns/lifecycle-events.agentassets/patterns/llm-controlled-actions.agentassets/patterns/multi-step-workflow.agent

FAQ

Что делает скилл sf-ai-agentscript?

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).

Как установить скилл sf-ai-agentscript?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sf-ai-agentscript запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sf-ai-agentscript с