New to Claude Skills? Learn how to install them →

forcedotcom on GitHub

Platform Quick Deploy

OfficialFree

Streamline your Salesforce production deployments.

Get this skill

Free · Opens the source repo

What Platform Quick Deploy does

The Platform Quick Deploy skill is designed for Salesforce developers who need to efficiently promote validated metadata changes to a Production org without the overhead of re-running tests. This skill is triggered when a user indicates they want to deploy to production using phrases like 'quick deploy', 'promote', or 'ship to prod'. It requires a recent job ID from a successful validation, ensuring that only validated changes are deployed. This approach minimizes downtime and accelerates the deployment process, making it an essential tool for teams looking to maintain agility in their release cycles.

Before executing a deployment, the skill enforces strict preconditions to ensure safety and compliance with Salesforce's deployment guidelines. It checks that the target org is indeed a Production environment, verifies that a valid validation job exists, ensures the validation is within the acceptable time frame, and requires explicit user confirmation before proceeding. This structured approach helps prevent accidental deployments to non-production environments and ensures that only the most recent and validated changes are promoted.

Once the preconditions are met, the skill displays a confirmation banner summarizing the deployment details, including the org alias, instance URL, and validation results. Upon user confirmation, it executes the quick deploy command, promoting the validated components without re-running tests. After the deployment, it captures the deploy report for auditing purposes, providing visibility into the deployment status and any issues that may arise. This post-deploy guidance encourages users to monitor their production environment and perform smoke tests to ensure everything is functioning as expected.

Overall, Platform Quick Deploy is an invaluable skill for Salesforce developers looking to streamline their deployment processes while ensuring compliance and safety in their production environments.

When to use it

Use this skill when you have validated changes ready to be deployed to a Production Salesforce org and want to do so quickly without re-running tests.

When not to use it

This skill is not suitable for deploying to sandbox or scratch orgs, or for unvalidated changes that require a validation step first.

What you can build with it

Deploying a validated change

After validating changes in a sandbox, you can quickly promote them to Production using this skill, ensuring a fast and efficient deployment.

Ensuring compliance before deployment

The skill enforces strict checks to confirm that the deployment target is Production, preventing accidental deployments to the wrong environment.

Auditing deployment history

After a successful deployment, the skill captures and saves the deploy report for future reference, aiding in compliance and auditing efforts.

How to install Platform Quick Deploy

View source

1. Install with the skills CLI

npx skills add forcedotcom/sf-skills/platform-quick-deploy --agent claude-code

2. 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 forcedotcom

Quick Deploying to Prod

Promote a validated deploy to a Production org using the job ID from a prior sf project deploy validate. No tests re-run, no components re-validated — just the promotion.

Preconditions (gate strictly)

Before doing ANYTHING, verify all four:

  1. Target is Production

    sf org display --target-org <alias> --json
    

    Confirm the target really is production. The reliable check is the gate's classifier (returns production|sandbox|scratch|trial|devhub|unknown):

    sf org display --target-org <alias> --json | "${CLAUDE_PLUGIN_ROOT}/scripts/sf-deploy-gate" classify
    

    Production means isSandbox=false AND isScratch=false AND instance URL has no -- (sandbox marker) AND no test.salesforce.com AND it is not a trial/Developer Edition host (orgfarm-*, *.develop.my.salesforce.com, *.pc-rnd.*, or a trialExpirationDate in the response — these report isSandbox/isScratch as null and must not be taken for production).

    If target is NOT production (classifier returns anything other than production) → STOP and redirect to platform-metadata-deploy (which handles non-prod natively).

  2. A validation exists

    • Read .sfdx/last-validation.json if it exists (left there by platform-deploy-validate)
    • OR ask the user for the job ID
    • OR fall back to --use-most-recent (validates within last 3 days)
  3. Validation is fresh enough

    • Explicit --job-id: must be ≤10 days old per Salesforce's quick-deploy window
    • --use-most-recent: must be ≤3 days old
    • If the recorded createdAt exceeds the window → STOP and run platform-deploy-validate first
  4. Explicit user confirmation

    • Print a confirmation block (alias, instance URL, edition, validated component count, test results) and ask: "Confirm deploy to PRODUCTION? (yes/no)"
    • Do NOT proceed without an explicit "yes"

Workflow

Step 1 — Display the production confirmation banner

Format exactly:

┌─ PRODUCTION DEPLOY ─────────────────────────────┐
│ Org alias:      <alias>                         │
│ Instance:       <instanceUrl>                   │
│ Edition:        <edition>                       │
│ Validation ID:  <jobId>                         │
│ Validated:      <createdAt> (X days ago)        │
│ Components:     <componentCount> queued         │
│ Tests:          <run>/<passed>/<failed>         │
└─────────────────────────────────────────────────┘
Confirm deploy to PRODUCTION? (yes/no)

Step 2 — Run the quick deploy

After "yes":

sf project deploy quick --job-id <id> --target-org <alias> --wait 30 --json

Or with --use-most-recent if the user opted in.

The quick deploy will:

  • Promote the validated components to the org
  • NOT re-run tests (per Salesforce platform behavior)
  • Return final deploy status

Step 3 — Capture the deploy report

After completion, persist for audit:

mkdir -p .sfdx/deploy-history
sf project deploy report --job-id <id> --target-org <alias> --json > ".sfdx/deploy-history/<id>.json"

Surface to the user:

  • ✅ Deploy succeeded — components deployed, time taken
  • ⚠️ Deploy failed — error summary; recommend looking at the report

Step 4 — Post-deploy guidance

After a successful prod deploy, suggest:

  • Smoke-test critical paths in the org (provide direct URLs if known)
  • Monitor the prod environment for the next 30 min
  • Check Setup → Deployment Status to confirm
  • If anything regressed: prepare a rollback plan (re-deploy the previous version's package)

Rules

  • NEVER run sf project deploy start against a Production target (always validate then quick-deploy)
  • NEVER use --ignore-errors or --ignore-warnings on production
  • NEVER auto-confirm — require an explicit "yes" from the user
  • NEVER quick-deploy a job ID older than its validity window — re-validate instead
  • ALWAYS persist the deploy report to .sfdx/deploy-history/ for the audit trail
  • If the prod-check hook denies the operation, do NOT bypass it — surface the denial to the user and recommend platform-deploy-validate first

Frequently asked questions about Platform Quick Deploy

Similar skills