sf-ai-agentforce
Agentforce Builder metadata path for Builder-managed topics/actions, Prompt Builder templates, GenAiFunction/GenAiPlugin, Models API, and custom Lightning types. TRIGGER when: user maintains or configures Builder metadata agents, creates topics/actions, works with Prompt Builder templates, or touches .genAiFunction, .genAiPlugin, or .genAiPromptTemplate metadata XML files. DO NOT TRIGGER when: Agent Script DSL .agent files (use sf-ai-agentscript), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).
What this skill does
# sf-ai-agentforce: Standard Agentforce Platform Development
Use this skill for the **Setup UI / Agent Builder** path: declarative topics, Builder-managed actions, `GenAiFunction` / `GenAiPlugin` metadata, **Prompt Builder templates stored as `GenAiPromptTemplate` metadata**, Models API usage from Apex, and custom Lightning types.
> For new code-first agent development, prefer [sf-ai-agentscript](../sf-ai-agentscript/SKILL.md).
>
> If the work produces or edits a `.agent` file — including Builder Script / Canvas work that results in an authoring bundle — use [sf-ai-agentscript](../sf-ai-agentscript/SKILL.md).
## When This Skill Owns the Task
Use `sf-ai-agentforce` when the user is:
- maintaining existing Builder-based agents
- working in Setup → Agentforce → Agents
- creating or fixing `GenAiFunction`, `GenAiPlugin`, or `GenAiPromptTemplate` metadata
- wiring Builder topics to Flow / Apex / Prompt Builder actions
- using Models API or LightningTypeBundle in the context of Builder-based agents
Do **not** use it for:
- `.agent` files or deterministic FSM design → [sf-ai-agentscript](../sf-ai-agentscript/SKILL.md)
- agent test suites and coverage loops → [sf-ai-agentforce-testing](../sf-ai-agentforce-testing/SKILL.md)
- persona / voice design → [sf-ai-agentforce-persona](../sf-ai-agentforce-persona/SKILL.md)
---
## Required Context to Gather First
Ask for or infer:
- whether this is a Builder / Setup UI project or a code-first Agent Script project
- whether the user is editing Builder metadata or a `.agent` authoring bundle
- agent type: Service Agent or Employee Agent
- whether the work targets topics, actions, Prompt Builder templates, Models API, or custom Lightning types
- what supporting Flow / Apex / metadata dependencies already exist
- whether the user needs authoring help, publish help, or troubleshooting
---
## Two Agentforce Paths
| Path | Skill | Best fit |
|---|---|---|
| Builder metadata path | `sf-ai-agentforce` | Declarative maintenance, existing Builder agents, metadata-driven action registration |
| Agent Script authoring bundle path | `sf-ai-agentscript` | Code-first `.agent` authoring, deterministic routing, version-controlled agent logic |
If the user is starting from scratch and wants strong control over flow/state, route to Agent Script.
---
## Builder Workflow Summary
1. Confirm this is a **Builder / Setup UI** project
2. Pick Service Agent vs Employee Agent
3. For Service Agents, provision the running user (prefer `sf org create agent-user`)
4. For Employee Agents, plan visibility with a Permission Set containing `<agentAccesses>`
5. Define topics with strong descriptions, scope, and instructions
6. Prepare supporting actions (Flow, Apex, Prompt Builder template)
7. Configure inputs / outputs carefully
8. Validate dependencies and template status
9. Publish, then activate
Expanded workflow: [references/builder-workflow.md](references/builder-workflow.md)
---
## Key Platform Rules
### Topic quality matters
Topic descriptions are routing instructions for the planner. They must be:
- specific
- scenario-based
- non-overlapping with sibling topics
### Actions are wrappers around real targets
| Target type | Typical use | Registered via |
|---|---|---|
| Flow | safest default for Builder actions | `GenAiFunction` |
| Apex | complex business logic via `@InvocableMethod` | `GenAiFunction` |
| Prompt Builder template | generated summaries / drafts / recommendations | `GenAiFunction` |
### Prompt Template vs GenAiPromptTemplate
- **Prompt Template** is the plain-English / UI term used in Prompt Builder.
- **`GenAiPromptTemplate`** is the current Metadata API type for source-driven template work.
- Prefer current source format: `genAiPromptTemplates/*.genAiPromptTemplate-meta.xml`.
- For flexible Prompt Builder templates, plan around the **5-input maximum** and consolidate inputs when needed.
- Prompt content should reference inputs with the current merge-field shape, e.g. `{!$Input:TargetRecord}` or `{!$Input:AdditionalContext}`.
### Supporting metadata deploys first
Before publishing the agent itself, deploy the supporting stack:
1. metadata / fields if needed
2. Apex if needed
3. Flows if needed
4. `GenAiPromptTemplate` / `GenAiFunction` / `GenAiPlugin`
5. then publish the agent
### Service Agent running user
For Service Agents, prefer the native GA command:
`sf org create agent-user --target-org <alias> --json`
Use the returned username in the running-user configuration.
### Employee Agent visibility
For Employee Agents, ensure end users receive a Permission Set containing `<agentAccesses>`. Without this, the agent can be active but still invisible in Lightning Experience.
See [../sf-permissions/references/agent-access-guide.md](../sf-permissions/references/agent-access-guide.md).
### Publish does not activate
After publish, run `sf agent activate` separately.
For automation, prefer `sf agent activate --api-name <AgentName> --version <n> --target-org <alias> --json` so the rollout is deterministic and machine-readable.
---
## Metadata Guidance
### GenAiFunction
Use when registering a single callable action. Validate:
- target exists
- target is active / deployable
- input names match the target contract
- output names match the target contract
- capability text clearly says when the action should be used
### GenAiPlugin
Use when grouping related functions into one logical package.
### GenAiPromptTemplate
Use for generated content, not deterministic business rules.
Prefer the current metadata shape:
- metadata type: `GenAiPromptTemplate`
- folder: `genAiPromptTemplates/`
- file suffix: `.genAiPromptTemplate-meta.xml`
- content lives under `templateVersions`
- use published template versions before wiring actions that depend on them
### Models API
Use when the solution belongs in Apex-driven AI orchestration rather than Builder-only actions.
### Custom Lightning Types
Use when the action needs richer structured input or output presentation.
Expanded references:
- [references/metadata-reference.md](references/metadata-reference.md)
- [references/genaiprompttemplate.md](references/genaiprompttemplate.md)
---
## Cross-Skill Integration
### Recommended Orchestration Order
```text
sf-metadata → sf-apex → sf-flow → sf-ai-agentforce → sf-deploy
```
### Required delegations
| Requirement | Delegate to | Why |
|---|---|---|
| Create / fix Flows | [sf-flow](../sf-flow/SKILL.md) | Action target creation and Flow validation |
| Create / fix Apex actions | [sf-apex](../sf-apex/SKILL.md) | `@InvocableMethod` and Apex correctness |
| Deploy / publish | [sf-deploy](../sf-deploy/SKILL.md) | Deployment orchestration |
| Test the agent | [sf-ai-agentforce-testing](../sf-ai-agentforce-testing/SKILL.md) | Formal test execution and assertions |
| Employee Agent visibility / access | [sf-permissions](../sf-permissions/SKILL.md) | Permission Set `<agentAccesses>` setup |
---
## High-Signal Failure Patterns
| Symptom | Likely cause | Read next |
|---|---|---|
| Action not available in Builder | target metadata missing or not deployed | [references/metadata-reference.md](references/metadata-reference.md) |
| Prompt action fails during publish or activation | template is Draft, missing inputs, or old metadata shape is being used | [references/genaiprompttemplate.md](references/genaiprompttemplate.md) |
| Need more than 5 template inputs | flex template input limit hit | [references/genaiprompttemplate.md](references/genaiprompttemplate.md) |
| Apex AI logic times out | Models API work placed in the wrong context | [references/models-api.md](references/models-api.md) |
| Rich input/output UI not rendering | Lightning type config or prerequisites are incomplete | [references/custom-lightning-types.md](references/custom-lightning-types.md) |
| Agent publishes but is not usable | forgot explicit activation | [references/cli-commands.md](references/cli-commands.md) |
| Service Agent publish/runtime failure | missing or invaRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.