sf-audit coverage

Query Salesforce Tooling API to audit Apex test coverage and generate SF-TEST-COVERAGE.md.

3|1|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/iaesteman/ai-salesforce-audit-claude --skill sf-audit-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-audit coverage
Source: https://github.com/iaesteman/ai-salesforce-audit-claude/tree/main/skills/sf-audit-coverage
Command: npx skills add https://github.com/iaesteman/ai-salesforce-audit-claude --skill sf-audit-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes Apex test coverage for a live Salesforce org, identifies classes and triggers below Salesforce's 75% deployment threshold, and assesses recent test health to improve deployment readiness.

Core Features & Use Cases

  • Apex coverage audit: Queries coverage data via the Tooling API to surface gaps in ApexCodeCoverage.
  • Recent test health: Reports on latest test run results to highlight failures and trends.
  • Actionable outputs: Generates a SF-TEST-COVERAGE.md report with risks, scores, and recommended fixes.

Quick Start

Run the sf-audit-coverage command with your org alias to generate SF-TEST-COVERAGE.md.

Frequently Asked Questions about sf-audit coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify Apex classes and triggers below the Salesforce 75% test coverage threshold?

Identifying Apex test coverage gaps involves querying ApexCodeCoverageAggregate via the Salesforce Tooling API to surface classes and triggers falling below the 75% deployment threshold.

How can I check recent Apex test run results and failures in a Salesforce org?

Checking recent Salesforce test health involves querying ApexTestRunResult and ApexTestResult objects via the Tooling API to highlight recent test failures and deployment readiness trends.

Does this Salesforce test coverage audit require any specific dependencies or external packages?

No external dependencies or packages are required. The audit runs natively against your Salesforce org using the Tooling API to query coverage data and generate a markdown readiness report.

Can I generate a test coverage report for deployment readiness across a live Salesforce org?

Yes, you can generate a deployment readiness report by running the audit with your org alias, which produces a SF-TEST-COVERAGE.md file containing coverage risks, scores, and recommended fixes.

What is the best way to audit Apex test coverage gaps before a Salesforce deployment?

The best way to audit Apex coverage gaps before deployment is querying ApexCodeCoverageAggregate via the Tooling API, which evaluates coverage metrics across classes and triggers to ensure readiness.

Why does my Salesforce deployment fail due to insufficient Apex test coverage?

Salesforce deployments fail when Apex classes or triggers fall below the 75% coverage threshold. Auditing ApexCodeCoverageAggregate data helps identify these specific gaps and recommend fixes before deployment.