agentsclimarketplace

Deploy

Skill vhmarquez/argo/skills/deploy

Deploy or validate Salesforce metadata against the project's default org (or another org if specified) using the `sf` CLI. Honors per-environment config overrides via `--env`.From its SKILL.md

Install
npx -y skills add vhmarquez/argo --skill deploy

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.5 KB, as published. Nobody here has run it

You are deploying Salesforce metadata for this project. Always read the project config first.

Read Project Config

source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/config.sh"
source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/sf-cli.sh"
sf_cli_check || exit 2
ORG="$(sf_config_get '.platform.defaultTargetOrg' "$ENV")"
LWC_SRC="$(sf_config_get '.paths.lwcSource' "$ENV")"
APEX_SRC="$(sf_config_get '.paths.apexSource' "$ENV")"
REACT_SRC="$(sf_config_get '.paths.reactSource // ""' "$ENV")"
TEST_SUFFIX="$(sf_config_get '.naming.apex.testSuffix // "Test"' "$ENV")"

--env <name> merges .claude/sf-project.<name>.json over the base; in particular it pulls defaultTargetOrg from the env file so deploys land in the right org.

Input

The user provided: $ARGUMENTS

Targets:

  • An LWC component name — deploy the component bundle and any Apex dependencies
  • An Apex class name — deploy the Apex class plus its test class (if one exists)
  • A React component name — deploy the React bundle (when react is in scope)
  • A file path — deploy that specific path
  • The word all — deploy the full project
  • (empty) — prompt the user to specify what to deploy

Modifiers:

  • validate or --validate — run validation only (--dry-run); no actual deploy
  • --target-org <alias> — override platform.defaultTargetOrg
  • --env <name> — read the env override; in particular pulls defaultTargetOrg from the env file
  • --ci — non-interactive; machine-readable output; no prompts
  • --format json|sarif — output format in CI mode (default json)
  • --out <path> — write CI output to file instead of stdout
  • --tests RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg|NoTestRun — test level on the deploy (default: RunSpecifiedTests for class-targeted deploys, NoTestRun for component-only deploys, RunLocalTests for all)

Steps

1. Parse the input

Determine target kind, validation-only or real deploy, target org alias.

2. Resolve source paths

  • LWC name: ${LWC_SRC}/<component>/
    • Find Apex dependencies by grepping the JS for @salesforce/apex/<Class>.<method> imports; include each <Class>.cls + meta + test class
  • Apex name: ${APEX_SRC}/<ClassName>.cls + <ClassName>.cls-meta.xml
    • Include the test class ${APEX_SRC}/<ClassName><TEST_SUFFIX>.cls + meta if it exists
  • React name: ${REACT_SRC}/<ComponentName>/ (refuse with rule DEPLOY-NO-REACT if platform.frontend = "lwc")
    • Find Apex dependencies the same way as LWC (grep the React source for @salesforce/apex/ and @salesforce/react/apex/ imports)
  • File path: deploy that path verbatim
  • all: full force-app directory

Verify all resolved paths exist before deploying. Refuse with rule DEPLOY-PATH-MISSING (severity: error) if any do not.

3. Build and run the deploy

sf project deploy start \
  --target-org "$ORG" \
  --source-dir "$P1" --source-dir "$P2" \
  ${VALIDATE:+--dry-run} \
  --test-level "$TEST_LEVEL" \
  --wait 30 --json

Returns JSON. Capture deploy id, status, error/test failure arrays.

4. Production confirmation

Before deploying (not validating) to an org whose alias matches prod* / production* or whose username domain looks production-shaped, prompt for confirmation in interactive mode. In --ci mode, refuse and exit with rule DEPLOY-PROD-REQUIRES-EXPLICIT (severity: error) unless --target-org was set explicitly to that alias on the command line.

5. Append to deploy history

${CLAUDE_PLUGIN_DATA}/argo/deploy-history/<project>.jsonl

One JSON line per deploy: { deployId, org, env, mode (deploy|validate), targetCount, status, durationSec, timestamp }. /argo:quick-deploy reads this to find a recent successful validation.

6. Output

Default Markdown:

# Deploy: <project> → <org>

Mode:    deploy (or validate)
Targets: 3 paths, 12 components

## Result
✅ Succeeded — Deploy Id 0Af...
   • 12 components deployed
   • 4 test methods run, 4 passed, 0 failed
   • Duration: 47s

## Components
- ApexClass:OrderController
- ApexClass:OrderControllerTest
- LightningComponentBundle:acmeOrderList
- ...

CI mode JSON:

{
  "deployId": "0Af...",
  "org": "DevVM",
  "mode": "deploy",
  "status": "Succeeded",
  "componentCount": 12,
  "testRunCount": 4,
  "testFailureCount": 0,
  "durationSec": 47,
  "findings": []
}

CI mode SARIF: surfaces deploy errors and test failures as findings (ruleId: DEPLOY-COMPONENT-ERROR, DEPLOY-TEST-FAILURE).

7. Exit codes

  • 0 — deploy / validate succeeded; no findings at or above --fail-on
  • 1 — deploy / validate failed, OR findings at or above --fail-on
  • 2 — invocation error (config missing, target not found, refusal in CI mode)

Rules

  • Default to platform.defaultTargetOrg from config unless the user specifies --target-org
  • Never deploy to production without explicit confirmation; in CI mode, require the alias on the command line
  • Always verify source paths exist before running the deploy command
  • Include Apex dependencies automatically when deploying an LWC or React component
  • Include the matching test class when deploying an Apex production class
  • Append every run to deploy history so /argo:quick-deploy can find the validation id later
  • Report results clearly: components deployed, status, any errors

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.