Agent skill

Platform Metadata Deploy

by forcedotcom in forcedotcom/sf-skills

Salesforce DevOps automation using sf CLI v2. An agent skill from forcedotcom/sf-skills.

Apache-2.0Auto-check passedDevOps & Cloud

Install Platform Metadata Deploy

skills CLI
$ npx skills add forcedotcom/sf-skills --skill platform-metadata-deploy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills platform-metadata-deploy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/platform-metadata-deploy .claude/skills/platform-metadata-deploy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
platform-metadata-deploy
GitHub stars
1.1k
Token cost
~2.4k tokens
SKILL.md length
695 words
Files
10 (incl. references, assets)
Skills in repo
251
Repo updated
First seen
Licence
Apache-2.0

At a glance

Salesforce DevOps automation using sf CLI v2. An agent skill from forcedotcom/sf-skills.

  • Works in 6 steps: Preflight → Validate first → If validation succeeds, offer the next… → …
  • : user deploys metadata
  • SKILL.md covers When This Skill Owns the Task, Critical Operating Rules, Required Context to Gather First and Recommended Workflow, plus 7 more sections
  • Runs Shell scripts from its folder; calls sf; needs INVALID_CROSS_REFERENCE_KEY

What it does

Platform Metadata Deploy is an agent skill from forcedotcom/sf-skills. Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code (use platform-apex-generate), building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate or platform-custom-field-generate), or querying org data (use platform-data-manage).

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files and assets (for example `README.md`, `references/agent-deployment-guide.md` and `references/deploy.sh`).

It sits in DevOps & Cloud, covering Deployment, CRM management and CI/CD. It works with Salesforce. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • : user deploys metadata
  • Creates/manages scratch orgs
  • Sets up CI/CD pipelines
  • Troubleshoots deployment errors with sf project deploy

Example prompts

  • “/platform-metadata-deploy”

Requirements

  • A Bash shell
  • A credential in INVALID_CROSS_REFERENCE_KEY

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Preflight
  2. Validate first
  3. If validation succeeds, offer the next safe workflow
  4. Deploy the smallest correct scope
  5. Verify
  6. Report clearly

What it can do on your machine

Read from SKILL.md and the folder at commit e5164d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • sf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • INVALID_CROSS_REFERENCE_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Platform Metadata Deploy loads about 2.4k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 128 tokens; SKILL.md has 695 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit e5164d9, republished under its Apache-2.0 licence (© forcedotcom). 695 words, ~2,447 tokens.

Download SKILL.mdSave it as .claude/skills/platform-metadata-deploy/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
platform-metadata-deploy
description
Salesforce DevOps automation using sf CLI v2. TRIGGER when: user deploys metadata, creates/manages scratch orgs or sandboxes, sets up CI/CD pipelines, or troubleshoots deployment errors with sf project deploy. DO NOT TRIGGER when: writing Apex code (use platform-apex-generate), building LWC components (use experience-lwc-generate), creating metadata definitions (use platform-custom-object-generate or platform-custom-field-generate), or querying org data (use platform-data-manage).
metadata.version
1.1
metadata.domains
Platform, Developer Experience
metadata.relatedSkills
agentforce-generate, agentforce-test, automation-flow-generate, experience-lwc-generate, integration-connectivity-connected-app-configure…

platform-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:


Critical Operating Rules

  • Use sf CLI v2 only.
  • On non-source-tracking orgs, deploy/retrieve commands require an explicit scope such as --source-dir, --metadata, or --manifest.
  • Prefer --dry-run first before real deploys.
  • For Flows, deploy safely and activate only after validation.
  • Keep test-data creation guidance delegated to platform-data-manage after metadata is validated or deployed.
Default deployment order
PhaseMetadata
1Custom objects / fields
2Permission sets
3Apex
4Flows as Draft
5Flow 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:

bash
sf --version
sf org list
sf org display --target-org <alias> --json
test -f sfdx-project.json

1. Preflight

Confirm auth, repo shape, package directories, and target scope.

2. Validate first
bash
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:

  1. deploy now
  2. assign permission sets
  3. create test data via platform-data-manage
  4. run tests / smoke checks
  5. orchestrate multiple post-deploy steps in order
4. Deploy the smallest correct scope
bash
# 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
bash
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 / symptomLikely causeDefault fix direction
FIELD_CUSTOM_VALIDATION_EXCEPTIONvalidation rule or bad test dataadjust data or rule timing
INVALID_CROSS_REFERENCE_KEYmissing dependencyinclude referenced metadata first
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITYtrigger / Flow / validation side effectinspect automation stack and failing logic
tests fail during deploybroken code or fragile testsrun targeted tests, fix root cause, revalidate
field/object not found in permsetwrong orderdeploy objects/fields before permission sets
Flow invalid / version conflictdependency or activation problemdeploy as Draft, verify, then activate

Full workflows: references/orchestration.md, references/trigger-deployment-safety.md


Show full SKILL.md (251 more words)Show less

CI/CD Guidance

Default pipeline shape:

  1. authenticate
  2. validate repo / org state
  3. static analysis
  4. dry-run deploy
  5. tests + coverage gates
  6. deploy
  7. verify + notify
  • When org policy and release risk allow it, consider --test-level RunRelevantTests for 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:

For full agent DevOps details, including Agent: pseudo metadata, publish/activate, and sync-between-orgs, see:


Cross-Skill Integration

NeedDelegate toReason
custom object creationplatform-custom-object-generatedefine objects before deploy
custom field creationplatform-custom-field-generatedefine fields before deploy
Apex authoring / fixesplatform-apex-generatecode authoring and repair
run tests after deploymentplatform-apex-test-runpost-deploy test execution and coverage
Flow creation / repairautomation-flow-generateFlow authoring and activation guidance
test data or seed recordsplatform-data-managedescribe-first data setup and cleanup
Agent authoring and publish readinessagentforce-generateagent-specific correctness

Reference Map

Start here
Specialized deployment safety
Asset templates

Score Guide

ScoreMeaning
90+strong deployment plan and execution guidance
75–89good deploy guidance with minor review items
60–74partial coverage of deployment risk
< 60insufficient confidence; tighten plan before rollout

Completion Format

text
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>

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references, assets) in skills/platform-metadata-deploy of forcedotcom/sf-skills.

  • SKILL.md
  • README.md
  • assets/destructiveChanges.xml
  • assets/package.xml
  • references/agent-deployment-guide.md
  • references/deploy.sh
  • references/deployment-report-template.md
  • references/deployment-workflows.md
  • references/orchestration.md
  • references/trigger-deployment-safety.md

Open the folder on GitHubat commit e5164d9

Compare with similar skills

Platform Metadata Deploy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Platform Metadata Deploy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Platform Metadata Deploy this skillforcedotcom/sf-skills1.1k—~2.4kAutomated safety check: PassApache-2.0
Sf DeployJaganpro/sf-skills424—~2kAutomated safety check: PassMIT
Sf Vlocity Build DeployJaganpro/sf-skills424—~1.7kAutomated safety check: PassMIT
Salesforce DeveloperJeffallan/claude-skills12k—~1.9kAutomated safety check: PassMIT
Sf DataJaganpro/sf-skills424—~2.1kAutomated safety check: PassMIT
Web Console Local Tracesforcedotcom/salesforcedx-vscode1k—~796Automated safety check: PassBSD-3-Clause

Similar skills

  • Sf Deploy

    Jaganpro/sf-skills

    Salesforce DevOps automation using sf CLI v2. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~2k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Sf Vlocity Build Deploy

    Jaganpro/sf-skills

    Salesforce Industries DataPack deployment automation using Vlocity Build.

    424 GitHub stars~1.7k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Salesforce Developer

    Jeffallan/claude-skills

    Writes Apex, Lightning Web Components and SOQL for the Salesforce platform, with bulkified triggers, governor-limit checks, 90% test coverage and Salesforce DX deployment.

    12k GitHub stars~1.9k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Sf Data

    Jaganpro/sf-skills

    Salesforce data operations with 130-point scoring. An agent skill from Jaganpro/sf-skills.

    424 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Web Console Local Traces

    forcedotcom/salesforcedx-vscode

    Unblock hosted Web Console OTLP to localhost:4318. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~796 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Sf Industry Cme Epc Model

    Jaganpro/sf-skills

    Salesforce Industries CME EPC product-modeling skill for Product2-based catalog creation.

    424 GitHub stars~4.3k tokensUpdated 5 mo ago
    Sales & SupportAuto-check passed

More from forcedotcom/sf-skills

All 251 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~4.5k tokensUpdated today
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated today
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated today
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated today
    Auto-check passed

Works with

Questions about Platform Metadata Deploy

What does Platform Metadata Deploy do?

Salesforce DevOps automation using sf CLI v2. An agent skill from forcedotcom/sf-skills. Platform Metadata Deploy is an agent skill from forcedotcom/sf-skills. Salesforce DevOps automation using sf CLI v2.

When should I use Platform Metadata Deploy?

Platform Metadata Deploy fits situations like: : user deploys metadata; creates/manages scratch orgs; sets up CI/CD pipelines; troubleshoots deployment errors with sf project deploy.

How do I install Platform Metadata Deploy in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill platform-metadata-deploy -a claude-code`. Or copy the skill folder (skills/platform-metadata-deploy in forcedotcom/sf-skills) into .claude/skills/platform-metadata-deploy in your project. Claude Code loads it when a task matches its description.

How do I install Platform Metadata Deploy in Codex?

Run `npx skills add forcedotcom/sf-skills --skill platform-metadata-deploy -a codex`. Or copy the skill folder (skills/platform-metadata-deploy in forcedotcom/sf-skills) into .agents/skills/platform-metadata-deploy in your project. Codex loads it when a task matches its description.

Can I use Platform Metadata Deploy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill platform-metadata-deploy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/platform-metadata-deploy, .gemini/skills/platform-metadata-deploy, .github/skills/platform-metadata-deploy and .opencode/skills/platform-metadata-deploy in your project.

What does Platform Metadata Deploy need to run?

Going by SKILL.md and its folder, Platform Metadata Deploy needs a shell for the scripts in its folder, the command-line tools its instructions call (sf) and credentials named INVALID_CROSS_REFERENCE_KEY. Our summary lists: A Bash shell; A credential in INVALID_CROSS_REFERENCE_KEY.

Does Platform Metadata Deploy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Platform Metadata Deploy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Platform Metadata Deploy use?

Platform Metadata Deploy is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Platform Metadata Deploy use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Platform Metadata Deploy?

Skills that share tags, products or a category with Platform Metadata Deploy: Sf Deploy (Jaganpro/sf-skills, 424 stars), Sf Vlocity Build Deploy (Jaganpro/sf-skills, 424 stars), Salesforce Developer (Jeffallan/claude-skills, 12k stars) and Sf Data (Jaganpro/sf-skills, 424 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Platform Metadata Deploy?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,060 GitHub stars. The repository holds 251 skills in this directory. The repository was last updated on October 7, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.