Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

deployment-readiness-check部署准备情况检查

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

367

周安装

15

GitHub Stars

212

下载量

118
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:deployment-readiness-check(部署准备情况检查)
来源仓库:https://github.com/forcedotcom/afv-library
仓库路径:skills/deployment-readiness-check
安装命令:
npx skills add https://github.com/forcedotcom/afv-library --skill deployment-readiness-check
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/forcedotcom/afv-library --skill deployment-readiness-check

简介

在 Salesforce 生产环境部署前执行元数据质量与测试覆盖率验证。

  • 适用于检查权限配置、安全设置与组件依赖关系是否合规。
  • 需 Salesforce CLI 认证与 jq 工具支持,输出结构化检查结果。
  • 防止带缺陷元数据污染生产环境,保障 org 稳定性与用户体验。
  • deployment-readiness-check 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

When to Use This Skill

Use this skill before deploying Salesforce metadata to production (or higher environments) to:

  • Validate metadata quality and completeness
  • Check test coverage meets organizational standards
  • Verify security settings and permissions
  • Identify configuration issues before deployment
  • Generate deployment documentation

Prerequisites

  • Salesforce CLI installed and authenticated to target org
  • jq command-line JSON processor installed
  • Bash shell (Linux, macOS, or WSL on Windows)
  • Source metadata in SFDX project format

Step 1: Run Metadata Validation

Execute the validation script to check for common metadata issues:

bash scripts/check_metadata.sh

The script validates:

  • Metadata format - Ensures all XML is well-formed
  • API versions - Checks for outdated API versions
  • Deprecated features - Identifies deprecated components
  • Naming conventions - Validates standard naming patterns
  • File completeness - Ensures meta.xml files are present

Review the output for any warnings or errors before proceeding.

Step 2: Verify Test Coverage

Check that your Apex test coverage meets organizational standards:

# Run all tests and generate coverage report
sf apex test run --test-level RunLocalTests --result-format human --code-coverage --wait 10

# Check coverage percentage
sf apex get test --test-run-id <test-run-id> --code-coverage --result-format json | jq '.summary.testRunCoverage'

Minimum requirements:

  • Overall org coverage: ≥75% (Salesforce minimum)
  • Individual class coverage: ≥75% (recommended)
  • No classes with 0% coverage

If coverage is below threshold:

  1. Identify uncovered classes using the coverage report
  2. Add test methods to increase coverage
  3. Rerun tests until requirements are met

Step 3: Security and Permissions Review

Review security settings and permissions to ensure proper access controls:

  1. Profile and Permission Set Review

- Check that custom profiles/permission sets follow least-privilege principle - Verify admin permissions are not granted to standard users - Ensure sensitive objects have appropriate FLS

  1. Sharing Rules and OWD

- Review Organization-Wide Defaults are appropriate - Validate sharing rules grant necessary access without over-sharing - Check for public groups with excessive membership

  1. API Access

- Verify Connected Apps have appropriate scopes - Check Named Credentials use secure authentication - Review Remote Site Settings are necessary

Consult the security checklist reference for detailed guidance.

Step 4: Configuration Validation

Verify configuration settings are deployment-ready:

# Check for hardcoded URLs or IDs
grep -r "https://.*\.salesforce\.com" force-app/main/default/
grep -r "[a-zA-Z0-9]{15,18}" force-app/main/default/ | grep -v "meta.xml"

# Validate Custom Settings and Custom Metadata
sf project retrieve start --metadata CustomObject:*__c

Configuration checklist:

  • No hardcoded production URLs in code
  • No hardcoded record IDs
  • Custom Settings configured correctly for target org
  • Custom Metadata Types populated appropriately
  • Email templates reference correct org email
  • Reports and Dashboards folders have correct permissions

Step 5: Review Dependencies

Check for dependency conflicts or missing components:

# Generate dependency report
sf project deploy validate --manifest package.xml --test-level RunLocalTests --verbose

# Check for missing dependencies
grep -i "error.*component" deployment_log.txt

Common dependency issues:

  • Missing Custom Fields referenced in code
  • Validation Rules referencing deleted fields
  • Workflows or Process Builders using deprecated actions
  • Lightning Components with missing design resources

See dependency troubleshooting guide for solutions.

Step 6: Generate Deployment Checklist

Use the deployment checklist template to document your release:

cp assets/deployment_checklist.md deployment_checklist_$(date +%Y%m%d).md

Fill out the checklist with:

  • Deployment date and time window
  • Components being deployed (attach package.xml)
  • Test execution results and coverage
  • Backup verification (data and metadata)
  • Rollback procedure documented
  • Stakeholders notified
  • Post-deployment validation steps
  • Monitoring plan for 24-48 hours

Step 7: Execute Pre-Deployment Validation

Run a validation-only deployment to catch issues before actual deployment:

# Validate deployment without committing
sf project deploy validate \
  --manifest package.xml \
  --test-level RunLocalTests \
  --verbose

# Save the validation ID for quick deploy
sf project deploy start --use-most-recent-validation --async

Benefits of validation:

  • Tests run in production environment
  • Identifies environment-specific issues
  • Generates Quick Deploy ID for faster deployment
  • No changes committed until you confirm

Review validation results and address any failures before scheduling deployment.

Step 8: Prepare Rollback Plan

Document rollback procedures before deploying:

  1. Backup current state sf project retrieve start --manifest package.xml --target-org production git tag pre-deployment-$(date +%Y%m%d) && git push --tags
  2. Test rollback procedure in sandbox:

- Deploy previous version of metadata - Verify functionality is restored - Document any data cleanup required

  1. Establish rollback criteria:

- Critical bugs found within 2 hours - Core functionality broken - Performance degradation >50% - Data integrity issues

See rollback procedures reference for detailed steps.

Post-Deployment Validation

After successful deployment, verify the release:

  1. Smoke tests - Execute critical user workflows
  2. Monitor logs - Check debug logs for errors (24-48 hours)
  3. Query test data - Verify triggers and automation work correctly
  4. User acceptance - Confirm with stakeholders functionality works
  5. Performance check - Review governor limit usage in logs

Common Issues and Solutions

Issue: Test Coverage Drops Below 75%

Cause: New Apex classes added without sufficient tests.

Solution:

  1. Run sf apex test run --code-coverage to identify gaps
  2. Add test methods covering uncovered lines
  3. Revalidate coverage

Issue: Validation Fails with "Component Not Found"

Cause: Missing dependency in package.xml.

Solution:

  1. Review error message for missing component
  2. Add component to package.xml
  3. Retrieve component from source org if needed
  4. Revalidate

Issue: Permission Errors After Deployment

Cause: FLS or object permissions not deployed correctly.

Solution:

  1. Verify profiles/permission sets are in package.xml
  2. Check that CustomObject metadata includes field permissions
  3. Deploy profiles separately if needed
  4. Use Permission Set Groups for complex permission hierarchies

Best Practices

  1. Always validate before deploying - Never deploy directly to production without validation
  2. Run full test suite - Use RunLocalTests, not NoTestRun
  3. Deploy during maintenance windows - Minimize impact on users
  4. Communicate with stakeholders - Notify before, during, and after deployment
  5. Monitor post-deployment - Watch logs and user feedback for 24-48 hours
  6. Document everything - Maintain deployment logs and decisions
  7. Use version control tags - Tag releases for easy rollback

References

Automation Opportunities

Consider automating this skill:

  • CI/CD Integration - Run validation script in pipeline
  • Scheduled Coverage Checks - Monitor test coverage daily
  • Auto-generated Documentation - Create deployment notes from package.xml
  • Slack/Email Notifications - Alert team of deployment status

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.83%
按下载量换算41

Claude

32%
按下载量换算38

Cursor

19.44%
按下载量换算23

Gemini CLI

10.1%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/forcedotcom/afv-library --skill deployment-readiness-check 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills