platform-metadata-deploy

Orchestrates Salesforce metadata validation, deployment, and verification using sf CLI v2.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill platform-metadata-deploy-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: platform-metadata-deploy
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/platform-metadata-deploy
Command: npx skills add https://github.com/padjei/SF_Build --skill platform-metadata-deploy-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Deploying Salesforce metadata manually is error-prone: wrong deployment order causes dependency failures, untested changes break production, and failed deployments are hard to diagnose. This Skill enforces a safe, repeatable deployment workflow with dry-run validation, correct metadata sequencing, and structured failure triage. ## Core Features & Use Cases - Two-Phase Deployment: Always validates with --dry-run before real deploys, then supports quick deploy from the validated job ID. - Ordered Deployment Sequencing: Deploys objects, permission sets, Apex, and Flows in dependency-safe order, with Flows deployed as Draft before activation. - Failure Triage & CI/CD Guidance: Maps common errors like INVALID_CROSS_REFERENCE_KEY to root causes and provides pipeline templates with test-level and coverage gates. - Use Case: You need to push a release to production. The Skill runs a dry-run validation with RunLocalTests, confirms 92% coverage, quick-deploys the validated job, and hands off test-data creation to the data management skill. ## Quick Start Ask the assistant to validate and deploy the force-app directory to your target org alias with local tests enabled.

Frequently Asked Questions about platform-metadata-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Salesforce deployment before deploying to production?▼

Run sf project deploy start with the --dry-run flag against your target org, specifying the source directory or manifest and a test level like RunLocalTests. If validation succeeds, use sf project deploy quick with the returned job ID to deploy the exact validated components.

What is the correct order to deploy Salesforce metadata?▼

Deploy custom objects and fields first, then permission sets, then Apex classes, then Flows as Draft, and activate Flows last. This order prevents dependency errors such as permission sets referencing fields that do not yet exist in the target org.

Which test level should I use for Salesforce production deployments?▼

Use RunLocalTests for production deployments to execute all local tests and enforce coverage requirements. For targeted hotfixes, RunSpecifiedTests with named test classes is faster, and RunRelevantTests can be used where org policy allows it.

Why does my Salesforce deployment fail with INVALID_CROSS_REFERENCE_KEY?▼

This error means a component references metadata that does not exist in the target org, such as a lookup field pointing to an undeployed object. Deploy the referenced metadata first or include both components in the same manifest.

Can I deploy Agentforce agents with sf CLI?▼

Yes, use the Agent pseudo metadata type with sf project deploy start to sync Bot, BotVersion, GenAiPlannerBundle, GenAiPlugin, and GenAiFunction components together. Dependencies like Apex and Flows must be deployed first, then publish and activate the agent with sf agent commands.

How do I delete metadata from a Salesforce org during deployment?▼

Create a destructiveChanges.xml file listing the components to remove and pass it with --post-destructive-changes alongside your deployment manifest. Always test destructive changes in a sandbox with --dry-run first and keep backups in version control.