Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计未展示

sf-ai-agentforce-legacySF AI 特工部队遗产

Agent Skill

sf-ai-agentforce-legacy 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

905

周安装

33

GitHub Stars

公开资料未说明

下载量

261
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sf-ai-agentforce-legacy(SF AI 特工部队遗产)
来源仓库:https://github.com/jaganpro/sf-skills
仓库路径:skills/sf-ai-agentforce-legacy
安装命令:
npx skills add jaganpro/sf-skills --skill "sf-ai-agentforce-legacy"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add jaganpro/sf-skills --skill "sf-ai-agentforce-legacy"

简介

sf-ai-agentforce-legacy 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于 SF AI 特工部队遗产相关研究检索任务,可结合来源仓库进一步核验具体用法。
  • 通过 npx skills add jaganpro/sf-skills --skill "sf-ai-agentforce-legacy" 命令安装。
  • 安装前建议确认权限范围和维护状态,注意可能触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
sf-ai-agentforce-legacy
description
>
license
MIT
compatibility
Requires API v65.0+ (Winter '26) for deployment
metadata
version
1.1.0
author
Jag Valaiyapathy
scoring
100 points across 6 categories
hooks
PreToolUse
hooks
command
python3 ${SHARED_HOOKS}/scripts/guardrails.py
timeout
5000
PostToolUse
hooks
command
python3 ${SKILL_HOOKS}/agentscript-lsp-validate.py
timeout
10000
command
python3 ${SHARED_HOOKS}/suggest-related-skills.py sf-ai-agentforce-legacy
timeout
5000
SubagentStop
command
python3 ${SHARED_HOOKS}/scripts/chain-validator.py sf-ai-agentforce-legacy
timeout
5000

<!-- TIER: 1 | ENTRY POINT --> <!-- This is the starting document - read this FIRST --> <!-- Progressive disclosure: SKILL.md → Resources → Quick Refs → Detailed Refs → Specialized Guides -->

⚠️ DEPRECATED: This skill has been superseded by sf-ai-agentscript. For new agent development, use: Skill(skill="sf-ai-agentscript") This skill remains available for maintaining existing agents built with the legacy patterns.

sf-ai-agentforce-legacy: Agentforce Agent Creation with Agent Script (Legacy)

Expert Agentforce developer specializing in Agent Script syntax, topic design, and action integration. Generate production-ready agents that leverage LLM reasoning with deterministic business logic.

Core Responsibilities

  1. Agent Creation: Generate complete Agentforce agents using Agent Script
  2. Topic Management: Create and configure agent topics with proper transitions
  3. Action Integration: Connect actions to Flows (directly) or Apex (via Agent Actions)
  4. Validation & Scoring: Score agents against best practices (0-100 points)
  5. Deployment: Publish agents using sf agent publish authoring-bundle

Document Map (Progressive Disclosure)

Read documents in tier order based on what you need:

Tier 2: Resource Guides (NEW)

NeedDocumentDescription
Complete syntax referenceagent-script-reference.mdFull Agent Script DSL, patterns, reserved words, new features
Topic design & routingtopics-guide.mdTopic structure, transitions, delegation, multi-topic agents
Action implementationactions-guide.mdFlow/Apex actions, data types, advanced fields, slot filling
Testing approachestesting-guide.mdPreview modes, Agent Testing Center, agentic fix loops
Deployment & CLIdeployment-guide.mdTwo deployment methods, CLI commands, troubleshooting

Tier 3: Quick References

NeedDocumentDescription
CLI commandscli-guide.mdsf agent commands, preview, publish
Patterns & practicespatterns-and-practices.mdDecision tree + best practices

Cross-Skill: Testing

NeedSkillDescription
Agent Testingsf-ai-agentforce-testingTest execution, coverage analysis, agentic fix loops

Quick Links:

Official Reference:


Critical Warnings

API Version Requirement

Agent Script requires API v65.0+ (Winter '26 or later)

Before creating agents, verify:

sf org display --target-org [alias] --json | jq '.result.apiVersion'

If API version < 65, Agent Script features won't be available.

Orchestration Order

sf-metadata → sf-apex → sf-flow → sf-deploy → sf-ai-agentforce (you are here: sf-ai-agentforce)

Why this order?

  1. sf-metadata: Custom objects/fields must exist before Apex or Flows reference them
  2. sf-apex: InvocableMethod classes must be deployed before Flow wrappers call them
  3. sf-flow: Flows must be created AND deployed before agents can reference them
  4. sf-deploy: Deploy all metadata before publishing agent
  5. sf-ai-agentforce: Agent is published LAST after all dependencies are in place

MANDATORY Delegation:

  • Flows: ALWAYS use Skill(skill="sf-flow") - never manually write Flow XML
  • Deployments: Use Skill(skill="sf-deploy") for all deployments
  • Apex: ALWAYS use Skill(skill="sf-apex") for InvocableMethod classes

See docs/orchestration.md for complete workflow.

File Structure

MethodPathFilesDeploy Command
AiAuthoringBundleaiAuthoringBundles/[Name]/[Name].agent + .bundle-meta.xmlsf agent publish authoring-bundle --api-name [Name]
GenAiPlannerBundlegenAiPlannerBundles/[Name]/[Name].genAiPlannerBundle + agentScript/[Name]_definition.agentsf project deploy start --source-dir [path]

XML templates: See templates/ for bundle-meta.xml and genAiPlannerBundle examples.

GenAiPlannerBundle agents do NOT appear in Agentforce Studio UI.

Full deployment method comparison: See deployment-guide.md


Workflow (5-Phase Pattern)

Phase 1: Requirements Gathering

Use AskUserQuestion to gather:

  • Agent purpose: What job should this agent do?
  • Topics needed: What categories of actions? (e.g., FAQ, Order Management, Support)
  • Actions required: Flow-based? Apex-based? External API?
  • Variables: What state needs to be tracked?
  • System persona: What tone/behavior should the agent have?

Then:

  1. Check existing agents: Glob: **/aiAuthoringBundles/**/*.agent
  2. Check for sfdx-project.json to confirm Salesforce project structure
  3. Create TodoWrite tasks

Phase 2: Template Selection / Design

Select appropriate pattern based on requirements - see agent-script-reference.md for full list:

PatternUse WhenTemplate
Hello WorldLearning / Minimal agenttemplates/agents/hello-world.agent
Simple Q&ASingle topic, no actionstemplates/agents/simple-qa.agent
Multi-TopicMultiple conversation modestemplates/agents/multi-topic.agent
Action-BasedExternal integrations neededtemplates/components/flow-action.agent

Pattern Decision Guide: See patterns-and-practices.md for detailed decision tree.

Template Path Resolution (try in order):

  1. Marketplace folder: ~/.claude/plugins/marketplaces/sf-skills/sf-ai-agentforce/templates/[path]
  2. Project folder: [project-root]/sf-ai-agentforce/templates/[path]

Phase 3: Generation / Validation

Create TWO files at:

force-app/main/default/aiAuthoringBundles/[AgentName]/[AgentName].agent
force-app/main/default/aiAuthoringBundles/[AgentName]/[AgentName].bundle-meta.xml

Required bundle-meta.xml content:

<?xml version="1.0" encoding="UTF-8"?>
<AiAuthoringBundle xmlns="http://soap.sforce.com/2006/04/metadata">
  <bundleType>AGENT</bundleType>
</AiAuthoringBundle>

Required .agent blocks:

  1. system: - Instructions and messages (MUST BE FIRST)
  2. config: - Agent metadata (agent_name, agent_label, description, default_agent_user)
  3. variables: - Linked and mutable variables
  4. language: - Locale settings
  5. start_agent topic_selector: - Entry point topic with label and description
  6. topic [name]: - Additional topics (each with label and description)

Complete syntax reference: See agent-script-reference.md

Validation Report Format (6-Category Scoring 0-100):

Score: 85/100 ⭐⭐⭐⭐ Very Good
├─ Structure & Syntax:     18/20 (90%)
├─ Topic Design:           16/20 (80%)
├─ Action Integration:     18/20 (90%)
├─ Variable Management:    13/15 (87%)
├─ Instructions Quality:   12/15 (80%)
└─ Security & Guardrails:   8/10 (80%)

Issues:
⚠️ [Syntax] Line 15: Inconsistent indentation (mixing tabs and spaces)
⚠️ [Topic] Missing label for topic 'checkout'
✓ All topic references valid
✓ All variable references valid

Phase 4: Deployment

Complete deployment workflow: See deployment-guide.md

Quick workflow:

# 1. Deploy dependencies first (flows, apex)
sf project deploy start --metadata Flow --target-org [alias]

# 2. ⚠️ VALIDATE AGENT (MANDATORY)
sf agent validate authoring-bundle --api-name [AgentName] --target-org [alias]

# 3. Deploy agent (Option A: Metadata API - recommended)
sf project deploy start --source-dir force-app/main/default/aiAuthoringBundles/[AgentName] --target-org [alias]

# 4. Activate agent
sf agent activate --api-name [AgentName] --target-org [alias]

NEW vs UPDATING agents: See deployment-guide.md for method selection.

Phase 5: Verification

✓ Agent Complete: [AgentName]
  Type: Agentforce Agent | API: 65.0+
  Location: force-app/main/default/aiAuthoringBundles/[AgentName]/
  Files: [AgentName].agent, [AgentName].bundle-meta.xml
  Validation: PASSED (Score: XX/100)
  Topics: [N] | Actions: [M] | Variables: [P]
  Published: Yes | Activated: [Yes/No]

Next Steps:
  1. Open in Studio: sf org open agent --api-name [AgentName]
  2. Test in Agentforce Testing Center
  3. Activate when ready: sf agent activate

Phase 6: Testing (via sf-ai-agentforce-testing)

Complete testing guide: See testing-guide.md

After deploying your agent, use the sf-ai-agentforce-testing skill:

# Invoke the testing skill
Skill(skill="sf-ai-agentforce-testing", args="Test agent [AgentName] and fix any failures")

The testing skill provides:

  • Test spec generation from agent metadata
  • 100-point test scoring across 5 categories
  • Agentic fix loops - auto-fix failing tests (max 3 iterations)
  • Coverage analysis for topics, actions, guardrails, escalation

Quick Reference

Minimal Working Example

system:
	instructions: "You are a helpful assistant. Be professional and friendly."
	messages:
		welcome: "Hello! How can I help you today?"
		error: "I apologize, but I encountered an issue."

config:
	agent_name: "My_Agent"
	default_agent_user: " [email protected] "
	agent_label: "My Agent"
	description: "A helpful assistant agent"

variables:
	EndUserId: linked string
		source: @MessagingSession.MessagingEndUserId
		description: "Messaging End User ID"
	RoutableId: linked string
		source: @MessagingSession.Id
		description: "Messaging Session ID"
	ContactId: linked string
		source: @MessagingEndUser.ContactId
		description: "Contact ID"

language:
	default_locale: "en_US"
	additional_locales: ""
	all_additional_locales: False

start_agent topic_selector:
	label: "Topic Selector"
	description: "Routes users to appropriate topics"
	reasoning:
		instructions: ->
			| Determine what the user needs.
		actions:
			go_help: @utils.transition to @topic.help

topic help:
	label: "Help"
	description: "Provides help to users"
	reasoning:
		instructions: ->
			| Answer the user's question helpfully.

Complete syntax and patterns: See agent-script-reference.md

Action Target Types (22+ Supported)

TypeTarget SyntaxRecommended
Flow (native)flow://FlowAPINameBest choice
Apex (via Flow)flow://ApexWrapperFlowRecommended
Prompt TemplategeneratePromptResponse://TemplateNameFor LLM tasks
Standard ActionstandardInvocableAction://sendEmailBuilt-in actions

Complete action reference: See actions-guide.md

Topic Design

Hub-and-Spoke Pattern (Recommended):

  • start_agent = Hub (routes to topics)
  • Topics = Spokes (feature areas)
  • Each topic can transition back to hub

Complete topic patterns: See topics-guide.md


Scoring System (100 Points)

Categories

CategoryPointsKey Criteria
Structure & Syntax20Valid syntax, consistent indentation, required blocks
Topic Design20Labels/descriptions, logical transitions, naming
Action Integration20Valid targets, input descriptions, no reserved words
Variable Management15Descriptions, required linked vars, appropriate types
Instructions Quality15Clear reasoning, edge cases, valid templates
Security & Guardrails10System guardrails, validation, error handling

Thresholds

ScoreRatingAction
90-100⭐⭐⭐⭐⭐ ExcellentDeploy with confidence
80-89⭐⭐⭐⭐ Very GoodMinor improvements suggested
70-79⭐⭐⭐ GoodReview before deploy
60-69⭐⭐ Needs WorkAddress issues before deploy
<60⭐ CriticalBlock deployment

Cross-Skill Integration

MANDATORY Delegations

RequirementSkill/AgentWhyNever Do
Flow CreationSkill(skill="sf-flow")110-point validation, proper XML ordering, prevents errorsManually write Flow XML
ALL DeploymentsSkill(skill="sf-deploy")Centralized deploymentDirect CLI
Apex CreationSkill(skill="sf-apex")@InvocableMethod generationManually write Apex

Integration Patterns

DirectionPatternSupported
sf-agentforce → sf-flowCreate Flow-based actionsFull
sf-agentforce → sf-apexCreate Apex via Flow wrapperVia Flow
sf-agentforce → sf-deployDeploy agent metadataFull
sf-agentforce → sf-metadataQuery object structureFull
sf-agentforce → sf-integrationExternal API actionsVia Flow

Complete integration guide: See actions-guide.md


Key Insights

InsightIssueFix
File Extension.agentscript not recognizedUse .agent
Config Fielddeveloper_name OR agent_nameBoth work (aliases for same field)
Instructions Syntaxinstructions:-> failsUse instructions: -> (space!)
Topic FieldsMissing label fails deployAdd both label and description
Linked VariablesMissing context variablesAdd EndUserId, RoutableId, ContactId
Language BlockMissing causes deploy failureAdd language: block
Bundle XMLMissing causes deploy failureCreate .bundle-meta.xml file
Indentation ConsistencyMixing tabs/spaces causes parse errorsUse TABS consistently (recommended)
@variables is plural@variable.x failsUse @variables.x
Boolean capitalizationtrue/false invalidUse True/False
⚠️ Validation RequiredSkipping validation causes late-stage failuresALWAYS run sf agent validate authoring-bundle BEFORE deploy
Flow Variable NamesMismatched names cause "Internal Error"Agent Script input/output names MUST match Flow variable API names exactly
Action LocationTop-level actions failDefine actions inside topics
start_agent ActionsFlow actions in start_agent fail in AiAuthoringBundleUse start_agent only for @utils.transition, put flow actions in topic blocks
System InstructionsPipe `\` syntax fails in system: blockUse single quoted string only
Escalate DescriptionInline description failsPut description: on separate indented line
Reserved Wordsdescription as input failsUse alternative names (e.g., case_description)
⚠️ Slot Filling ReliabilityLLM sends empty JSON, wrong field names, or wrong valuesUse deterministic collection: dedicated setter action + single-use (available when @var == "") + null guards. See actions-guide.md
Explicit Action ReferencesLLM doesn't consistently call correct actionsReference actions in instructions: { [email protected] _id}. Improves LLM reliability.

Complete troubleshooting: See deployment-guide.md


Required Files Checklist

Before deployment, ensure you have:

  • [ ] force-app/main/default/aiAuthoringBundles/[AgentName]/[AgentName].agent
  • [ ] force-app/main/default/aiAuthoringBundles/[AgentName]/[AgentName].bundle-meta.xml
  • [ ] sfdx-project.json in project root
  • [ ] Valid default_agent_user in config block
  • [ ] All linked variables (EndUserId, RoutableId, ContactId)
  • [ ] Language block present
  • [ ] ⚠️ Validation passed: sf agent validate authoring-bundle --api-name [AgentName] returns 0 errors
  • [ ] All topics have label: and description:
  • [ ] No reserved words used as input/output names
  • [ ] Flow/Apex dependencies deployed to org first

LSP Integration (Real-Time Validation)

This skill includes Language Server Protocol (LSP) integration for real-time Agent Script validation.

Prerequisites

  1. VS Code with Agent Script Extension (Required)

- Open VS Code → Extensions (Cmd+Shift+X) - Search: "Agent Script" by Salesforce - Install the extension

  1. Node.js 18+ (Required)

- Check: node --version - Install: brew install node (macOS)

Features

When you edit .agent files, the LSP automatically provides:

FeatureDescription
Syntax ValidationReal-time error detection
Auto-Fix LoopClaude automatically fixes errors (max 3 attempts)
Fast Feedback~50ms response time

Troubleshooting

"LSP server not found"

  • Install VS Code Agent Script extension
  • Verify: ls ~/.vscode/extensions/salesforce.agent-script-*

"Node.js not found"

  • Install Node.js 18+: brew install node

Validation not triggering

  • Ensure hooks are enabled in Claude Code settings
  • Check: ls ~/.claude/plugins/marketplaces/sf-skills/sf-ai-agentforce/hooks/

Validation

Manual validation (if hooks don't fire):

python3 ~/.claude/plugins/marketplaces/sf-skills/sf-agentforce/hooks/scripts/validate_agentforce.py <file_path>

Scoring: 100 points / 6 categories. Minimum 60 (60%) for deployment.

Hooks not firing? Check: CLAUDE_PLUGIN_ROOT set, hooks.json valid, Python 3 in PATH, file matches pattern *.agent.


Reference & Dependencies

Resource Guides (NEW):

Quick References:

Dependencies: sf-deploy (optional) for additional deployment options. Install: /plugin install github:Jaganpro/sf-skills/sf-deploy

Notes: API 65.0+ required | Agent Script is GA (2025) | Block if score < 60


License

MIT License. See LICENSE file in sf-ai-agentforce folder. Copyright (c) 2024-2025 Jag Valaiyapathy

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

28.63%
按下载量换算75

Claude Code

20.41%
按下载量换算53

windsurf

15.19%
按下载量换算40

OpenCode

12.22%
按下载量换算32

Cursor

8.23%
按下载量换算21

Antigravity

3.53%
按下载量换算9

安全审计

暂无安全审计结果可展示。

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills