test-coverage
Skill1 starsChanged 7 months agoMITView on GitHub
Run Apex code coverage or agent evaluation tests against the project's default org. Two modes — `apex` (default; deploys + runs Apex tests with coverage) and `agent` (delegates to /argo:agent-test for Agentforce eval suites).
20 other projects use a version of this.
Adopted by
Most recently taken up by
- luongnv89/skillstheir own version, first seen Nov 6, 2026
- cognitedata/builder-skillstheir own version, first seen Nov 4, 2026
- drvoss/everything-copilot-clitheir own version, first seen Oct 26, 2026
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- my-chiefmind/ai-maestrotheir own version, first seen Oct 13, 2026
- wso2/product-apimtheir own version, first seen Oct 8, 2026
Used with
Projects with it also use instinct-export, instinct-import and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
diego-tobalinaSkillbuild-fix
Fix build and compilation errors systematically. Run when build fails.
Also in 3 projects that use this
qtzx06Skilleval
Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.
Also in 4 projects that use this
HABUBUSSSkilleval-harness
Also in 5 projects that use this
Microsoft AzureSkilliterative-retrieval
Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.
Also in 3 projects that use this
- +1 more from TheKREATORS
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- cloudposse/atmos★ 1.4ksame name
- wso2/product-apim★ 1ksame name
- LedgerHQ/ledger-live★ 627same name
- luongnv89/skills★ 145same name
- drvoss/everything-copilot-cli★ 48same name
- ariadoss/superskills★ 12same name
- Montimage/skills★ 9same name
- cognitedata/builder-skills★ 6same name
- my-chiefmind/ai-maestro★ 6same name
- kartik-nighania/av_claude_code_workshop★ 4same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- adrSkill
- agent-deploySkill
- agent-discoverSkill
- agent-eval-trendSkill
- agent-exchange-listSkill
- agent-specSkill
- agent-testSkill
- agent-vs-flow-vs-apexSkill
- before-vs-after-triggerSkill
- code-reviewSkill
- complexitySkill
- coverage-trendSkill
- dead-codeSkill
- dependency-graphSkill
- deploySkill
- destructive-changesSkill
- diff-deploySkill
- erdSkill
- field-impactSkill
- flaky-test-finderSkill
- flow-auditSkill
- flow-vs-apexSkill
- fls-auditSkill
- gateway-configSkill
- generate-docsSkill
- limit-usageSkill
- lwc-vs-reactSkill
- mcp-tool-vs-restSkill
- notifySkill
- onboardSkill
- org-diffSkill
- org-exploreSkill
- package-versionSkill
- pattern-packSkill
- perf-reviewSkill
- permset-auditSkill
- pr-prepareSkill
- queueable-vs-batchSkill
- quick-deploySkill
- react-initSkill
- release-notesSkill
- scratch-orgSkill
- security-scanSkill
- sequence-diagramSkill
- sf-initSkill
- sharing-reviewSkill
- slack-agentSkill
- soql-analyzerSkill
- test-dataSkill
- test-planSkill
- trust-evalSkill
- trust-layer-auditSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 4 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Always target the org configured in .claude/sf-project.json.
- Very specific: line 18
Always start by reading .claude/sf-project.json:
- Very specific: line 50
If given a production class name, the test class is {ClassName}{naming.apex.testSuffix}
- Distinctive: line 51
If given a test class name, the production class is the name with the suffix stripped
- Very specific: line 52
Verify both files exist in {paths.apexSource}
- Very specific: line 53
If all is specified, skip to step 3 with --test-level RunLocalTests instead of --class-names
- Distinctive: line 59
If the deploy fails, report the error and stop
- Very specific: line 60
If all, deploy the full project: sf project deploy start --target-org <org> --wait 10
- Distinctive: line 101
Always deploy before running tests to ensure the org has the latest code
- Distinctive: line 102
If tests fail, show the failure messages clearly — do not re-run automatically
- Very specific: line 103
If coverage is below quality.codeCoverageTarget, flag it and list the uncovered lines
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are running test coverage for this project. Two modes:
apex(default) — deploy + run Apex tests + report coverage; appends to coverage history for/coverage-trendagent— delegate to/argo:agent-test; appends to agent-eval history for/agent-eval-trend
Mode is selected by the first positional argument: apex (or apex <ClassName>) vs. agent (or agent <agent-name>). When the first argument is a class name (no apex/agent prefix), Apex mode is assumed for backwards compatibility with v1.
Always target the org configured in .claude/sf-project.json.
Read Project Config First
Always start by reading .claude/sf-project.json:
platform.defaultTargetOrg— the org alias to test against unless the user specifies otherwisepaths.apexSource— base directory for class lookupsnaming.apex.testSuffix— used to derive test class names from production class names (default:Test)quality.codeCoverageTarget— coverage threshold to enforce (default: 85%)
Input
The user provided: $ARGUMENTS
This could be:
apex <ClassName>— Apex mode: a test class or production class name (infer test by appendingnaming.apex.testSuffix)apex all— run every Apex test classagent <agent-name>— agent mode: dispatch to/argo:agent-test <agent-name>agent all— dispatch to/argo:agent-test(full eval suite run)<ClassName>(legacy) — equivalent toapex <ClassName>- An override
--target-org <alias>— use a different org instead ofplatform.defaultTargetOrg - An override
--env <name>— load.claude/sf-project.<name>.jsonoverrides - Empty — prompt the user to specify a mode + target
In agent mode, this skill is a thin dispatcher to /argo:agent-test; all agent-specific options (--fail-on, --suite, etc.) pass through.
CI flags (per ${CLAUDE_PLUGIN_ROOT}/docs/ci-output-contract.md):
--ci— machine-readable output, exit codes per contract--format json|sarif— output format (defaultjsonin CI mode)--out <path>— write to file instead of stdout
In CI mode, after running tests, also append the result to ${CLAUDE_PLUGIN_DATA}/argo/coverage/<project>/history.jsonl so /argo:coverage-trend can show the trend later.
Steps
- Resolve the test class and its production class.
- If given a production class name, the test class is
{ClassName}{naming.apex.testSuffix} - If given a test class name, the production class is the name with the suffix stripped
- Verify both files exist in
{paths.apexSource} - If
allis specified, skip to step 3 with--test-level RunLocalTestsinstead of--class-names
- If given a production class name, the test class is
- Deploy the classes. Substitute
<org>withplatform.defaultTargetOrg(or the user's override):sf project deploy start --target-org <org> --source-dir {paths.apexSource}/{ProductionClass}.cls --source-dir {paths.apexSource}/{TestClass}.cls --wait 10- If the deploy fails, report the error and stop
- If
all, deploy the full project:sf project deploy start --target-org <org> --wait 10
- Run the tests with code coverage.
sf apex run test --class-names {TestClass} --code-coverage --result-format human --target-org <org> --wait 10- If
all:sf apex run test --test-level RunLocalTests --code-coverage --result-format human --target-org <org> --wait 15
- If
- Report the results. Summarize:
- Total tests / passed / failed
- Any failed test names with their error messages
- Coverage percentage for the production class
- Uncovered lines (if any)
- Whether it meets the project target from
quality.codeCoverageTarget
CI Mode
In CI mode emit findings shaped like:
[
{
"ruleId": "COV-BELOW-TARGET",
"severity": "error",
"message": "OrderApiClient coverage 63.3% below target 85%",
"file": "force-app/main/default/classes/OrderApiClient.cls",
"line": 1,
"tool": "test-coverage"
}
]Exit codes:
- 0 — all tests passed; coverage at or above
quality.codeCoverageTarget - 1 — any test failed, or any class below target
- 2 — deploy or test-run failure
For SARIF output, source ${CLAUDE_PLUGIN_ROOT}/hooks/lib/sarif.sh and pipe through sarif_emit "argo/test-coverage" "<plugin-version>".
Rules
- Default to
platform.defaultTargetOrgfrom config — never change orgs unless the user explicitly specifies one - Always deploy before running tests to ensure the org has the latest code
- If tests fail, show the failure messages clearly — do not re-run automatically
- If coverage is below
quality.codeCoverageTarget, flag it and list the uncovered lines
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

