grzmol/vibe-force/sf-post-deploy-verification

Claude Code and agent skill by grzmol/vibe-force

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Post-deploy verification of Salesforce work in a real org - reading deploy results with sf project deploy report and sf project deploy resume, running org Apex tests with sf apex run test and sf apex get test, executing anonymous-Apex smoke probes with sf apex run --file, verifying data with sf data query, verifying configuration (permission set assignments, custom metadata rows, active flow versions, scheduled jobs via CronTrigger, platform event channels, Named Credential reachability), checking org health with sf org list limits and AsyncApexJob failures, and deciding between rollback and forward fix when verification fails. Use this skill in wave 4 after a deploy or quick deploy completes, when a deployment reports Succeeded but behaviour is unproven, when interpreting deploy or Apex test failures, when authoring smoke scripts under scripts/apex/, or when producing the verification report at .vibeforce/reports/smoke-*.json.

Install

npx vskill@latest install grzmol/vibe-force/sf-post-deploy-verification

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as grzmol/vibe-force/sf-post-deploy-verification.

Post-Deploy Verification

A deploy that says Succeeded proves that metadata compiled, not that the feature works. This skill is the wave-4 gate: deploy result -> org Apex tests -> smoke probes -> data and configuration checks -> org health -> report. Enforced by vf-check smoke and vf-check verify.

When to use

TriggerStart at
sf project deploy validate / quick finished or timed outDeployment result verification
Deploy status Succeeded but the story is unprovenWave-4 sequence
Deploy status Failed / SucceededPartialreferences/failure-triage.md
Apex tests failed in the org but pass locallyreferences/failure-triage.md, skill sf-apex-testing
Need a new smoke probereferences/smoke-apex-scripts.md
Need to confirm config landed (perm sets, flows, jobs, custom metadata)references/org-health-queries.md
Asked "is this safe to leave in the org?"Rollback vs forward-fix decision tree

Wave-4 sequence

Wave 3 (sf-deploy-engineer) runs serially: deploy-validate then deploy-quick. Wave 4 runs the two branches in parallel; both must pass before the story is done.

StepAgentCommandPass criteria
4.0sf-deploy-engineersf project deploy report --job-id <id> --target-org <alias> --jsonresult.status = Succeeded, numberComponentErrors = 0
4.1asf-test-engineervf-check apex --target-org <alias> --tests <list>All tests pass; class coverage >= gates.apexClassCoverageMin; org coverage >= gates.apexOrgCoverageMin
4.1bsf-org-verifiervf-check smoke --target-org <alias>Every probe exits 0; no new AsyncApexJob failures; limits within thresholds
4.2sf-org-verifierdata + configuration queries (references/org-health-queries.md)Row counts, active flow versions, perm-set assignments, scheduled jobs, custom metadata all as expected
4.3sf-org-verifierwrites .vibeforce/reports/smoke-<ISO>.jsonReport artefact present with status: "pass"
4.4sf-orchestratorreads both reportsFails the story if either branch failed; applies the rollback/forward-fix tree
bash
node "${CLAUDE_PLUGIN_ROOT}/scripts/checks/vf-check.mjs" verify \
--target-org vf-int --tests OrderServiceTest,BillingGatewayTest

verify = apex + smoke. Use all when the local gate has not run in this session.

1. Deployment result verification

bash
# Status without polling (no --wait = single check)
sf project deploy report --job-id 0Afxx00000000AAA --target-org vf-int --json
# Poll until done, capture coverage and JUnit artefacts
sf project deploy report --use-most-recent --wait 30 \
--coverage-formatters json-summary --junit --results-dir .vibeforce/reports/deploy \
--target-org vf-int
# Resume watching a deploy that timed out or ran with --async (also updates source tracking)
sf project deploy resume --job-id 0Afxx00000000AAA --wait 30 --target-org vf-int
FactValue
Job id lifetime10 days from the start of the deploy operation
--use-most-recent lookback3 days
report vs resumereport does not update source tracking; resume does
--coverage-formatters valuesclover, cobertura, html-spa, html, json, json-summary, lcovonly, none, teamcity, text, text-summary
Commands that return a job iddeploy start, deploy validate, deploy quick, deploy cancel

Deploy status JSON (field names from @salesforce/source-deploy-retrieve MetadataApiDeployStatus):

json
{
"status": 0,
"result": {
"id": "0Afxx00000000AAA",
"status": "Succeeded",
"success": true,
"done": true,
"checkOnly": false,
"numberComponentsTotal": 42,
"numberComponentsDeployed": 42,
"numberComponentErrors": 0,
"numberTestsTotal": 118,
"numberTestsCompleted": 118,
"numberTestErrors": 0,
"runTestsEnabled": true,
"rollbackOnError": true,
"details": {
"componentFailures": [],
"componentSuccesses": [],
"runTestResult": {
"numFailures": "0",
"numTestsRun": "118",
"totalTime": "92345.0",
"failures": [],
"codeCoverage": [],
"codeCoverageWarnings": []
}
}
}
}

result.status values: Pending, InProgress, Succeeded, SucceededPartial, Failed, Canceling, Canceled, Finalizing, FinalizingFailed.

Component failure fields (details.componentFailures[]): fullName, componentType, fileName, problem, problemType (Error | Warning), lineNumber, columnNumber, success, created, changed, deleted. Test failure fields (details.runTestResult.failures[]): name, methodName, message, stackTrace, time, type, packageName.

Failure triage table for common problem values: references/failure-triage.md.

2. Org Apex tests after deploy

Validation already ran tests, but a quick deploy skips them, and post-deploy runs catch data-dependent failures that a validation on a different snapshot missed.

bash
# Targeted, synchronous where possible (single class), JSON for the report
sf apex run test --tests OrderServiceTest.createsOrder --tests BillingGatewayTest \
--code-coverage --result-format json --wait 20 --target-org vf-int
# Suite-based regression set
sf apex run test --suite-names Order_Regression --code-coverage --detailed-coverage \
--result-format human --wait 30 --target-org vf-int
# Whole-org local tests (release gate)
sf apex run test --test-level RunLocalTests --code-coverage --result-format json \
--wait 60 --output-dir .vibeforce/reports/apex --target-org vf-int
# Async run that timed out: fetch by test run id
sf apex get test --test-run-id 707xx0000000001 --code-coverage --result-format json --target-org vf-int
FlagMeaning
--testsClass or Class.method; mutually exclusive with --class-names and --suite-names
--class-names / --suite-namesWhole classes / suites; also mutually exclusive with the others
--test-levelRunSpecifiedTests, RunLocalTests (default), RunAllTestsInOrg
--synchronousSingle class only; otherwise runs async and returns a test run id
--waitStreaming client socket timeout in minutes
--code-coverage + --result-formatRequired together to see coverage; --detailed-coverage needs human format
--conciseFailures only (human format)
PermissionRequires the View All Data system permission

testRunCoverage in JSON/JUnit output is the percentage of covered lines across all Apex classes exercised by that run - it is not the org-wide coverage figure. RunSpecifiedTests requires each class and trigger in the deployment package to reach 75% individually. Gate values live in .vibeforce/config.json (apexOrgCoverageMin 85, apexClassCoverageMin 75).

3. Anonymous-Apex smoke probes

bash
sf apex run --file scripts/apex/smoke-core.apex --target-org vf-int --json

sf apex run --json returns result.compiled, result.success, result.logs, and result.diagnostic[] (with compileProblem, exceptionMessage, exceptionStackTrace, line, column). A probe signals failure by throwing, which flips success to false.

Non-negotiable probe rules:

RuleWhy
Guard on Organization.IsSandbox before any DMLA smoke probe must never mutate production data
Prefer queries, Schema describes, and service instantiation over DMLRead-only probes are safe everywhere
When DML is unavoidable, wrap in Database.setSavepoint() + Database.rollback()Nothing persists, even in a sandbox
Emit VF_PROBE marker lines with LoggingLevel.ERRORSurvives default log filters; the runner greps them
Throw on failure, never System.debug and continueNon-zero exit code is the machine-readable signal
Callout probes point at sandbox endpoints onlySee skill sf-integration-patterns

Skeleton (full scripts in references/smoke-apex-scripts.md):

apex
// scripts/apex/smoke-core.apex - read-only; safe in any org.
Organization org = [SELECT Id, Name, IsSandbox, OrganizationType, InstanceName FROM Organization LIMIT 1];
System.debug(LoggingLevel.ERROR, 'VF_PROBE org=' + org.Name + ' sandbox=' + org.IsSandbox);
List<String> failures = new List<String>();
// 1. Key objects and fields are visible and describable.
Map<String, Schema.SObjectType> globalDescribe = Schema.getGlobalDescribe();
for (String objectName : new List<String>{ 'Order__c', 'Order_Line__c' }) {
if (!globalDescribe.containsKey(objectName.toLowerCase())) {
failures.add('missing object: ' + objectName);
}
}
// 2. Service classes instantiate and answer.
try {
Integer open = OrderService.countOpenOrders();
System.debug(LoggingLevel.ERROR, 'VF_PROBE openOrders=' + open);
} catch (Exception e) {
failures.add('OrderService.countOpenOrders: ' + e.getMessage());
}
if (!failures.isEmpty()) {
throw new IllegalArgumentException('VF_PROBE_FAIL ' + String.join(failures, ' | '));
}
System.debug(LoggingLevel.ERROR, 'VF_PROBE_OK smoke-core');

4. Data verification

bash
# Row counts after a data-touching deploy
sf data query --target-org vf-int --result-format json \
--query "SELECT COUNT(Id) total FROM Order__c WHERE Status__c = 'Open'"
# Referential integrity: orphans that a schema change may have created
sf data query --target-org vf-int \
--query "SELECT COUNT(Id) FROM Order_Line__c WHERE Order__c = null"
# Picklist values and record types actually available
sf data query --target-org vf-int --use-tooling-api \
--query "SELECT Id, DeveloperName, SobjectType, IsActive FROM RecordType WHERE SobjectType = 'Order__c'"

Full query catalogue (picklist values via PicklistValueInfo, custom metadata rows, duplicate external ids, storage): references/org-health-queries.md. Data loading and export mechanics: skill sf-data-management.

5. Configuration verification

bash
# Permission set assignment landed on the integration user
sf data query --target-org vf-int --query \
"SELECT PermissionSet.Name, Assignee.Username FROM PermissionSetAssignment WHERE PermissionSet.Name = 'Order_Management'"
# Flow active version
sf data query --target-org vf-int --query \
"SELECT ApiName, Label, IsActive, ProcessType, TriggerType, ActiveVersionId FROM FlowDefinitionView WHERE ApiName = 'Order_Routing'"
# Scheduled jobs present and due to fire
sf data query --target-org vf-int --query \
"SELECT CronJobDetail.Name, State, NextFireTime, PreviousFireTime, TimesTriggered FROM CronTrigger ORDER BY NextFireTime"
# Custom metadata rows deployed
sf data query --target-org vf-int --query \
"SELECT DeveloperName, Label FROM Integration_Setting__mdt ORDER BY DeveloperName"
# Platform event channel / named credential presence
sf org list metadata --metadata-type PlatformEventChannel --target-org vf-int --json
sf org list metadata --metadata-type NamedCredential --target-org vf-int --json

Named Credential reachability is a callout, so it belongs in a smoke probe, not a query - see references/smoke-apex-scripts.md and skill sf-integration-patterns.

6. Limits and org health

bash
sf org list limits --target-org vf-int --json # alias: sf limits api display
sf org display --target-org vf-int --json # connection, instance URL, org id
sf org display --target-org vf-int --verbose # includes the SFDX auth URL - never log it
# Async failures created by the deploy or the smoke run
sf data query --target-org vf-int --query \
"SELECT ApexClass.Name, JobType, Status, ExtendedStatus, NumberOfErrors, CompletedDate \
FROM AsyncApexJob WHERE Status IN ('Failed','Aborted') AND CreatedDate = TODAY ORDER BY CompletedDate DESC"

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
7-day trend score
7

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/grzmol/vibe-force/sf-post-deploy-verification/badge)](https://verified-skill.com/skills/grzmol/vibe-force/sf-post-deploy-verification)

Something wrong with this skill or its page? Tell us.