agentforce-prompt-versioning
Version Prompt Templates and agent topic prompts: source-control shape, change review, model-version pinning, A/B, and rollback. Trigger keywords: prompt template versioning, prompt changelog, prompt rollback, A/B prompt test, agentforce prompt release. Does NOT cover: prompt engineering tips, general LLM fine-tuning, or Classify / Einstein Generate studio UI walkthroughs.
Best use case
agentforce-prompt-versioning is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Version Prompt Templates and agent topic prompts: source-control shape, change review, model-version pinning, A/B, and rollback. Trigger keywords: prompt template versioning, prompt changelog, prompt rollback, A/B prompt test, agentforce prompt release. Does NOT cover: prompt engineering tips, general LLM fine-tuning, or Classify / Einstein Generate studio UI walkthroughs.
Teams using agentforce-prompt-versioning should expect a more consistent output, faster repeated execution, less prompt rewriting, better workflow continuity with your supporting tools.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
- You already have the supporting tools or dependencies needed by this skill.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/agentforce-prompt-versioning/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How agentforce-prompt-versioning Compares
| Feature / Agent | agentforce-prompt-versioning | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Version Prompt Templates and agent topic prompts: source-control shape, change review, model-version pinning, A/B, and rollback. Trigger keywords: prompt template versioning, prompt changelog, prompt rollback, A/B prompt test, agentforce prompt release. Does NOT cover: prompt engineering tips, general LLM fine-tuning, or Classify / Einstein Generate studio UI walkthroughs.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Agentforce Prompt Versioning ## Why Version Prompts A prompt is executable config. Unversioned prompts produce unreproducible behaviour, missed regressions, and "works for me" debugging. ## Source Of Truth - Prompt Templates live as metadata. They can and should be source-controlled via SFDX retrieve. - Store the templates under `force-app/main/default/genAiPromptTemplates/` (or the current metadata folder) in the repo. - The repo is authoritative. UI edits are either imported back immediately or reverted. ## Naming And Version Strategy - Base name reflects purpose: `RefundStatusSummary`. - Version as a suffix on the Developer Name when the contract changes: `RefundStatusSummary_v2`. - Backwards-compatible changes (prose tightening, minor tone) bump only the **Revision** field in metadata, not the name. - Contract-breaking changes (variables added/renamed, expected JSON output shape altered) bump the name suffix. ## Changelog Convention Keep a `PROMPTS_CHANGELOG.md` at repo root: ```text ## 2026-04-20 — RefundStatusSummary v3 - Added `brand_voice` variable for regional brand compliance. - Removed filler "As an AI assistant..." preamble. - Regenerated golden set (see evals PR #482). - Rollout: ramp 10% → 50% → 100% over 5 days. ``` ## Model Version Pinning - Agentforce supports default and pinned model versions. - For critical topics, **pin**. Auto-updates move behavior; pinning trades model improvements for reproducibility. - Schedule quarterly re-evaluation: run goldens + adversarial against the newer model; upgrade once it meets the bar. ## A/B Strategy - Prompt A/B works only when traffic distribution is controllable. Use topic fan-out: topic receives 10% to `_v3`, 90% to `_v2` for 48h. - Metrics: routing accuracy, action precision, refund path completion, escalation rate. - Kill switch: single metadata deploy flips all traffic back. ## Rollback - Retain the last 2-3 prior versions as activated variants, even if traffic is 0%. Restoring is a traffic-split edit, not a redeploy. - Post-incident, append to the changelog what rolled back and why. ## Recommended Workflow 1. Inventory prompt templates and assign owners. 2. Source-control under `force-app/.../genAiPromptTemplates/`. 3. Define naming convention and changelog format. 4. Pin model versions for critical topics. 5. Build A/B harness (topic-level traffic split). 6. Retain prior versions; document rollback procedure. 7. Review prompt/model quarterly against goldens. ## Official Sources Used - Prompt Templates — https://help.salesforce.com/s/articleView?id=sf.prompt_builder_overview.htm - Model Configuration — https://help.salesforce.com/s/articleView?id=sf.generative_ai_models.htm - Agentforce Topics — https://help.salesforce.com/s/articleView?id=sf.einstein_agent_topics.htm
Related Skills
omniscript-versioning
Use when managing OmniScript versions: activating new versions, deactivating prior versions, testing a specific version before activation, rolling back to a previous version, or understanding version identity (Type/Subtype/Language triplet). NOT for OmniStudio deployment or DataPack migration (use omnistudio/omnistudio-deployment-datapacks).
api-versioning-strategy
Design versioning for custom Apex REST endpoints: URI versioning, backward compatibility, deprecation sunset. NOT for consuming external APIs.
flow-versioning-strategy
Manage Flow versions: activation policy, paused interview compatibility, cleanup cadence, and breaking-change detection. Trigger keywords: flow version management, activate flow version, paused interview, flow cleanup, flow breaking change, flow rollback. Does NOT cover: FlowDefinition metadata deploy order (see devops skill), Process Builder retirement, or Flow test coverage (separate skill).
prompt-template-versioning
Lifecycle management for Prompt Builder templates: version, test, promote, roll back via CMDT-backed bindings. NOT for authoring initial templates or generic prompt engineering.
prompt-injection-defense
Red-team an Agentforce agent against prompt-injection and jailbreak attacks; codify test cases and guardrails. NOT for general application-security reviews outside the agent boundary.
prompt-builder-templates
Use when creating, reviewing, or troubleshooting Prompt Builder templates (Field Generation, Record Summary, Sales Email, or Flex types), including grounding with merge fields, Flow, or Apex. Trigger keywords: prompt template, Prompt Builder, field generation, record summary, sales email template, flex template, grounding, merge fields, LLM template, Einstein generative AI. NOT for agent topic instructions, Copilot action configuration, or Data Cloud segment activation.
einstein-bots-to-agentforce-migration
Use when migrating an existing Einstein Bot (legacy or Enhanced) to Agentforce: feature mapping, conversation design translation, cutover planning, hybrid bot/agent architecture, and context handoff. Triggers: 'migrate einstein bot to agentforce', 'convert legacy bot to agentforce', 'einstein bot retiring deadline', 'hybrid bot agentforce pattern', 'bot dialog to topic migration'. NOT for new Agentforce setup with no existing bot — use agentforce/agentforce-agent-creation instead.
data-cloud-grounding-for-agentforce
Use when grounding an Agentforce agent with Data Cloud retrievers, DMO selection, chunking, and freshness windows. Triggers: agent grounding, retriever, DMO, data graph, RAG, vector index, citations. Does NOT cover Data Cloud ingestion pipelines or Data Cloud identity resolution tuning.
agentforce-tool-use-patterns
Pick the right tool shape for each agent action: Apex invocable vs Flow action vs External Service vs Prompt Template vs Data Cloud retrieval. Covers action selection by use case, argument design for LLM clarity, return-shape contracts, error-surfacing, cost implications, and when to chain tools vs keep a single action. NOT for authoring a specific action (use custom-agent-actions-apex). NOT for topic design (use agent-topic-design).
agentforce-testing-strategy
Design Agentforce testing: topic coverage, action unit tests, deterministic golden sets, adversarial prompts, and regression harness. Trigger keywords: agentforce testing, agent eval, agent regression suite, prompt golden set, action unit test agentforce. Does NOT cover: generic LLM evaluation academia, human-labeled RLHF pipelines, or Einstein Classify accuracy.
agentforce-service-ai-setup
Use this skill to verify prerequisites, license entitlements, and org readiness before enabling Einstein for Service AI features: Case Classification, Article Recommendations, Reply Recommendations, and Work Summaries. Trigger keywords: Einstein for Service setup, enable Case Classification, enable Article Recommendations, enable Reply Recommendations, enable Work Summaries, Einstein generative AI prerequisites, Data Cloud for Work Summaries. NOT for core Agentforce agent setup, Agent Builder topic design, Einstein Copilot configuration, ongoing optimization of already-running features, or Einstein Trust Layer configuration.
agentforce-sales-ai-setup
Step-by-step setup and configuration of Einstein for Sales AI features: Opportunity Scoring, Pipeline Inspection AI insights, Einstein email insights and composition, and Forecasting AI. Covers prerequisites, license checks, feature sequencing, and data readiness validation. NOT for core Agentforce agent creation, agent topic design, Einstein Trust Layer configuration, or Einstein Activity Capture troubleshooting.