Skip to main content
skill CX Codex

platform-quick-deploy — Claude Code skill: setup and usage

Deploys validated metadata to a Salesforce Production org without re-running tests. Helpful when shipping validated packages directly to live environments.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add forcedotcom/sf-skills --skill platform-quick-deploy -a claude-code
Open on GitHub

What platform-quick-deploy does

The skill runs sf project deploy quick using a job ID from a prior sf project deploy validate. It skips running unit tests again, promoting metadata directly into the org. Before executing, it confirms the target org type through sf-deploy-gate. It executes only against verified production instances or Dev Hubs, stopping sandboxes and trial orgs immediately.

A recent validation is mandatory. Explicit --job-id entries are valid for up to 10 days, while --use-most-recent is capped at 3 days. The agent reads .sfdx/last-validation.json or requests the identifier, then prints a confirmation banner and requires an explicit "yes" from the user.

Once complete, the skill writes the deploy output to .sfdx/deploy-history/<id>.json for auditing. Rules strictly forbid --ignore-errors and --ignore-warnings, preventing broken deployments from slipping into production.

What it helps with

  • promote validated Salesforce metadata to production without re-running tests
  • verify validation job ID age before releasing to production
  • record deployment audit reports in local project history
  • block accidental deployments to non-production targets

Example prompts for the agent

  • Quick deploy the validated metadata to production
  • Promote our latest validation to prod using --use-most-recent
  • Ship validated components to production org with job ID

How to install platform-quick-deploy

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/platform-quick-deploy/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/platform-quick-deploy/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about platform-quick-deploy

How to install platform-quick-deploy in Claude Code?

Run npx skills add forcedotcom/sf-skills --skill platform-quick-deploy -a claude-code in your terminal.

What does platform-quick-deploy do?

It triggers a Salesforce quick deployment of previously validated metadata to a production org without re-running tests.

How long is a validation job ID valid for quick deploy?

An explicit --job-id is valid for up to 10 days under Salesforce rules. If you use --use-most-recent, it must be no older than 3 days.

Source text

SKILL.md · Apache-2.0
---
name: platform-quick-deploy
description: "Deploy validated metadata to a Production Salesforce org without re-running tests. TRIGGER when the user wants to deploy to production, says 'quick deploy', 'promote', 'ship to prod', or has just validated and wants to push the change live. REQUIRES a recent `sf project deploy validate` job ID (≤10 days old, ≤3 days for --use-most-recent). DO NOT TRIGGER for sandbox/scratch deploys (use platform-metadata-deploy) or unvalidated deploys (use platform-deploy-validate first)."
allowed-tools:
  - Bash
  - Read
---

# 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**
   Confirm the target really is production with the gate's classifier, which resolves the org the same way the deploy hook does (returns `production|sandbox|scratch|trial|unknown`):
   ```bash
   "${CLAUDE_PLUGIN_ROOT}/scripts/sf-deploy-gate" bucket <alias>
   ```
   Production means not a scratch org or sandbox (no `--` or `test.salesforce.com` host marker) **and not a trial/Developer Edition org** (`orgfarm-*`, `*.develop.my.salesforce.com`, `*.pc-rnd.*` hosts, or a future trial expiration date, as on SDOs). A Dev Hub with none of those signals is production.

   If target is NOT production (classifier returns anything other than `production`) → STOP and redirect to `platform-metadata-deploy` (which handles non-prod natively). `unknown` means the org type could not be confirmed (usually an incomplete org record). Say so plainly: the deploy gate still allows the deploy, auto-deploy on save stays off for that org, and re-authenticating with `sf org login web` usually restores the classification.

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

```bash
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:

```bash
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

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Similar skills

All skills for DevOps and infrastructure →

From the same set181

experience-lwr-site-generate Builds and edits Salesforce Experience Cloud LWR sites through DigitalExperience metadata: pages, routes, themes, guest access. CX Codex +1 2,700installs dx-apexguru-scan Runs an ApexGuru SFAP Scan API performance audit on Salesforce Apex code to detect governor limit antipatterns and query bottlenecks. CX Codex +1 2,700installs platform-environment-validate The skill scans your local Salesforce environment, reports each tool's status and offers to install or update what is missing. CX Codex +1 2,700installs platform-destructive-deploy A skill that walks an agent through removing Salesforce metadata: reference scan first, validation second, deploy after that. CX Codex +1 2,700installs dx-project-create Scaffolds a new Salesforce DX project from CLI templates, moves the active session into the project folder, and connects a default org. Useful when starting a new Salesforce app. CX Codex +1 2,600installs experience-ui-bundle-mfa-configure Sets up multi-factor authentication for Salesforce Experience Site users by deploying the right permission sets and checking the login flow. CX Codex +1 2,600installs experience-lwc-base-components-integrate Picks the right Lightning Base Component for a UI task and wires it into an LWC bundle without breaking SLDS. CX Codex +1 2,600installs experience-lds-data-requirements-generate Turns ambiguous LWC data needs into clear Salesforce specifications. Recommends GraphQL, UI API, or Apex before anyone writes wire adapters or Apex code. CX Codex +1 2,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor