
Salesforce DevOps Automation
OfficialFreeStreamline your Salesforce metadata deployments with ease.
Free · Opens the source repo
What Salesforce DevOps Automation does
The platform-metadata-deploy skill is designed specifically for automating Salesforce DevOps tasks using the sf CLI v2. It facilitates deployment orchestration, allowing users to validate changes, manage scratch orgs, and implement CI/CD workflows effectively. This skill is essential for teams looking to streamline their deployment processes, minimize errors, and ensure a smooth rollout of Salesforce metadata changes.
When using this skill, users can perform a variety of deployment-related tasks, such as initiating dry-run validations, executing targeted or manifest-based deployments, and generating deployment reports. The skill also provides guidance on managing release sequencing across various Salesforce components, including custom objects, permission sets, Apex code, and Flows. By following the recommended workflows, users can ensure that deployments are conducted safely and efficiently, reducing the risk of failures and dependency issues.
This skill is particularly useful for Salesforce developers and DevOps engineers who need to manage complex deployments in a structured manner. It helps in troubleshooting deployment failures by providing insights into common error patterns and their resolutions. Additionally, the skill offers CI/CD guidance, which can be integrated into existing pipelines to enhance deployment reliability and performance.
Overall, platform-metadata-deploy is a critical tool for Salesforce professionals aiming to optimize their deployment processes, improve collaboration within teams, and ensure high-quality releases.
When to use it
Use this skill when you need to orchestrate Salesforce metadata deployments, manage scratch orgs, or troubleshoot deployment errors.
When not to use it
This skill is not suitable for authoring Apex code, building LWC components, or performing data operations in Salesforce.
What you can build with it
Deploying Metadata with Validation
Use this skill to perform a dry-run validation of your Salesforce metadata before executing the actual deployment.
Managing Scratch Orgs
Utilize this skill to create and manage scratch orgs effectively during your development and deployment processes.
Troubleshooting Deployment Failures
Leverage the skill's insights to identify and resolve common deployment errors, ensuring smoother releases.
How to install Salesforce DevOps Automation
View source1. Install with the skills CLI
npx skills add forcedotcom/sf-skills/platform-metadata-deploy --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by forcedotcomplatform-metadata-deploy: Comprehensive Salesforce DevOps Automation
Use this skill when the user needs deployment orchestration: dry-run validation, targeted or manifest-based deploys, CI/CD workflow advice, scratch-org management, failure triage, or safe rollout sequencing for Salesforce metadata.
When This Skill Owns the Task
Use platform-metadata-deploy when the work involves:
sf project deploy start,quick,report, or retrieval workflows- release sequencing across objects, permission sets, Apex, and Flows
- CI/CD gates, test-level selection, or deployment reports
- troubleshooting deployment failures and dependency ordering
Delegate elsewhere when the user is:
- authoring Apex code → platform-apex-generate
- authoring LWC components → experience-lwc-generate
- creating custom objects or fields → platform-custom-object-generate, platform-custom-field-generate
- building Flows → automation-flow-generate
- doing org data operations → platform-data-manage
- authoring or testing Agentforce agents → agentforce-generate
Critical Operating Rules
- Use
sfCLI v2 only. - On non-source-tracking orgs, deploy/retrieve commands require an explicit scope such as
--source-dir,--metadata, or--manifest. - Prefer
--dry-runfirst before real deploys. - For Flows, deploy safely and activate only after validation.
- Keep test-data creation guidance delegated to
platform-data-manageafter metadata is validated or deployed.
Default deployment order
| Phase | Metadata |
|---|---|
| 1 | Custom objects / fields |
| 2 | Permission sets |
| 3 | Apex |
| 4 | Flows as Draft |
| 5 | Flow activation / post-verify |
This ordering prevents many dependency and FLS failures.
Required Context to Gather First
Ask for or infer:
- target org alias and environment type
- deployment scope: source-dir, metadata list, or manifest
- whether this is validate-only, deploy, quick deploy, retrieve, or CI/CD guidance
- required test level and rollback expectations
- whether special metadata types are involved (Flow, permission sets, agents, packages)
Preflight checks:
sf --version
sf org list
sf org display --target-org <alias> --json
test -f sfdx-project.json
Recommended Workflow
1. Preflight
Confirm auth, repo shape, package directories, and target scope.
2. Validate first
sf project deploy start --dry-run --source-dir force-app --target-org <alias> --wait 30 --json
Use manifest- or metadata-scoped validation when the change set is targeted.
3. If validation succeeds, offer the next safe workflow
After a successful validation, guide the user to the correct next action:
- deploy now
- assign permission sets
- create test data via platform-data-manage
- run tests / smoke checks
- orchestrate multiple post-deploy steps in order
4. Deploy the smallest correct scope
# source-dir deploy
sf project deploy start --source-dir force-app --target-org <alias> --wait 30 --json
# manifest deploy
sf project deploy start --manifest manifest/package.xml --target-org <alias> --test-level RunLocalTests --wait 30 --json
# manifest deploy with Spring '26 relevant-test selection
sf project deploy start --manifest manifest/package.xml --target-org <alias> --test-level RunRelevantTests --wait 30 --json
# quick deploy after successful validation
sf project deploy quick --job-id <validation-job-id> --target-org <alias> --json
5. Verify
sf project deploy report --job-id <job-id> --target-org <alias> --json
Then verify tests, Flow state, permission assignments, and smoke-test behavior.
6. Report clearly
Summarize what deployed, what failed, what was skipped, and what the next safe action is.
Output template: references/deployment-report-template.md
High-Signal Failure Patterns
| Error / symptom | Likely cause | Default fix direction |
|---|---|---|
FIELD_CUSTOM_VALIDATION_EXCEPTION | validation rule or bad test data | adjust data or rule timing |
INVALID_CROSS_REFERENCE_KEY | missing dependency | include referenced metadata first |
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY | trigger / Flow / validation side effect | inspect automation stack and failing logic |
| tests fail during deploy | broken code or fragile tests | run targeted tests, fix root cause, revalidate |
| field/object not found in permset | wrong order | deploy objects/fields before permission sets |
| Flow invalid / version conflict | dependency or activation problem | deploy as Draft, verify, then activate |
Full workflows: references/orchestration.md, references/trigger-deployment-safety.md
CI/CD Guidance
Default pipeline shape:
- authenticate
- validate repo / org state
- static analysis
- dry-run deploy
- tests + coverage gates
- deploy
- verify + notify
- When org policy and release risk allow it, consider
--test-level RunRelevantTestsfor Apex-heavy deployments. - Pair this with modern Apex test annotations such as
@IsTest(testFor=...)and@IsTest(isCritical=true)— see platform-apex-generate for authoring guidance.
Static analysis now uses Code Analyzer v5 (sf code-analyzer), not retired sf scanner.
Deep reference: references/deployment-workflows.md
Agentforce Deployment Note
Use this skill to orchestrate deployment/publish sequencing around agents, but use the agent-specific skill for authoring decisions:
- agentforce-generate for
.agentauthoring, Agent Builder, Prompt Builder, and metadata config
For full agent DevOps details, including Agent: pseudo metadata, publish/activate, and sync-between-orgs, see:
Cross-Skill Integration
| Need | Delegate to | Reason |
|---|---|---|
| custom object creation | platform-custom-object-generate | define objects before deploy |
| custom field creation | platform-custom-field-generate | define fields before deploy |
| Apex authoring / fixes | platform-apex-generate | code authoring and repair |
| Flow creation / repair | automation-flow-generate | Flow authoring and activation guidance |
| test data or seed records | platform-data-manage | describe-first data setup and cleanup |
| Agent authoring and publish readiness | agentforce-generate | agent-specific correctness |
Reference Map
Start here
- references/orchestration.md
- references/deployment-workflows.md
- references/deployment-report-template.md
Specialized deployment safety
Asset templates
- assets/package.xml — manifest template covering common metadata types
- assets/destructiveChanges.xml — template for removing metadata from target orgs
Score Guide
| Score | Meaning |
|---|---|
| 90+ | strong deployment plan and execution guidance |
| 75–89 | good deploy guidance with minor review items |
| 60–74 | partial coverage of deployment risk |
| < 60 | insufficient confidence; tighten plan before rollout |
Completion Format
Deployment goal: <validate / deploy / retrieve / pipeline>
Target org: <alias>
Scope: <source-dir / metadata / manifest>
Result: <passed / failed / partial>
Key findings: <errors, ordering, tests, skipped items>
Next step: <safe follow-up action>
Frequently asked questions about Salesforce DevOps Automation
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
