Not loaded · from vanguard-frontier-agentic
Generates Apex test classes with TestDataFactory, Assert, bulkification, positive/negative/bulk test methods, async patterns, and @TestSetup usage. No org connection needed.
Claude Code won't load this skill
It ships in vanguard-frontier-agentic at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
T0 static code generation for Apex test classes. This skill authors test coverage that is bulkified, assertion-rich, and factory-patterned — the three qualities most often missing from hand-rolled Apex tests. No org connection required.
Use salesforce-apex-test-generator-skill when the work requires authoring new test classes:
Delegate elsewhere when:
| Situation | Skill to use |
|---|---|
| User wants to run the tests against a live org | salesforce-apex-test-runner-skill |
| User needs the production Apex class authored first | salesforce-apex-generator-skill |
| User is analyzing a test failure from logs | salesforce-apex-log-analyzer-skill |
| User needs to deploy validated code | salesforce-deployment-validator-skill |
Before generating, confirm:
62.0 minimumIf the user provides the production class source, read it to infer what test scenarios are needed. If not, ask for the class name and its purpose.
Use Read or Grep to locate the class under test. Identify:
Map each method to test scenarios using the three-path model:
| Path | What to test |
|---|---|
| Positive | Happy path with valid data; asserts on expected outcome |
| Negative | Invalid input, missing required data, exception thrown; asserts on expected error |
| Bulk | 200+ record insert/update/delete; asserts governor-limit safety |
Consult references/test-data-factory.md. If a project factory exists, extend it.
If not, scaffold factory methods as static helpers in the test class or a companion
TestDataFactory class.
Follow all hard-stop constraints (see Rules section). Generate:
@isTest class declaration with private access@TestSetup for shared data (when multiple methods need the same records)@isTest methods for each positive, negative, and bulk scenarioTest.startTest / Test.stopTest wrapping all async enqueue or execute callsAssert class usage throughout (never bare System.assert)SeeAllData=true unless explicitly required by an external tool patternProduce {ClassName}Test.cls-meta.xml with correct apiVersion and status: Active.
Run the 100-point rubric (see below). If score is below 80, revise before presenting.
Always end with an explicit recommendation to execute the tests using
salesforce-apex-test-runner-skill, noting the test class name and expected coverage.
| Constraint | Rationale |
|---|---|
Never use @isTest(SeeAllData=true) unless testing external tools that require live data | Test isolation; prevents reliance on org-specific state |
Every test method must have at least one Assert statement | Tests without assertions give false confidence |
| Bulk test methods must use 200+ records | Triggers process in batches of 200; 201 records crosses the boundary |
Use Assert class methods (Assert.areEqual, Assert.isTrue, etc.) not bare System.assert | Produces meaningful failure messages; follows Apex best practices |
Use Test.startTest / Test.stopTest around all async enqueue or execute calls | Flushes async queue; required for governor-limit isolation in tests |
All DML in test setup must use insert not Database.insert unless testing saveResults | Clarity; reserve Database.insert for tests specifically checking partial success |
| Do not hardcode record Ids in test assertions | Ids vary by org; use the returned record.Id |
| Separate positive, negative, and bulk methods — do not combine in one method | Maintainability and clarity of failure attribution |
| Element | Pattern | Example |
|---|---|---|
| Test class | {ProductionClass}Test | AccountServiceTest |
| Positive test | test{Method}Success or test{Scenario} | testGetAccountByOwnerSuccess |
| Negative test | test{Method}ThrowsWhenInvalid or test{Scenario}Error | testGetAccountByOwnerThrowsWhenNullId |
| Bulk test | test{Method}Bulk or test{Scenario}Bulk | testGetAccountByOwnerBulk |
| @TestSetup | setup (conventional) | static void setup |
Score the test class before presenting. Threshold: 80+ pass, 60–79 caveat, below 60 revise.
| Dimension | Points | What earns full marks |
|---|---|---|
| Bulkification | 25 | At least one bulk test method with 200+ records; asserts on all bulk records not just first |
| Positive/negative/bulk coverage | 25 | All three paths present and distinct; each method has a clear purpose |
| TestDataFactory used | 15 | Factory methods used or scaffolded; no inline SObject construction scattered across methods |
| Assert class used | 15 | Assert.areEqual, Assert.isTrue, Assert.isNotNull used throughout; no bare System.assert(condition) |
| Governor-limit aware | 10 | Test.startTest / Test.stopTest wraps async paths; no unnecessary SOQL in each test method |
| No SeeAllData | 10 | @isTest(SeeAllData=true) is absent unless explicitly justified with a comment |
Scoring penalties:
System.assert without message: -10 per occurrence (max -20)SeeAllData=true without justification: -15Test.startTest on async path: -10@TestSetup when multiple methods share data setup: -5This skill operates exclusively at T0 — static generation only.
sf CLI calls, no MCP tool calls, no live execution.salesforce-apex-test-runner-skill
for actual execution and coverage measurement.Stop and do not generate if:
SeeAllData=true for a standard use case — explain the isolation risk
and generate test-isolated factory data instead. Only emit SeeAllData=true if the user
provides a documented reason (e.g., testing a legacy package that requires live data).verdict: "pass | caveat | reject"
quality_score: <0-100>
quality_notes: "<scoring rationale>"
generated_files:
- path: "{ClassName}Test.cls"
content: |
<apex test code>
- path: "{ClassName}Test.cls-meta.xml"
content: |
<meta xml>
test_scenarios_covered:
positive: ["<method name: scenario description>"]
negative: ["<method name: scenario description>"]
bulk: ["<method name: scenario description>"]
factory_approach: "existing-factory | scaffolded-factory | inline-helpers"
factory_notes: "<what factory methods were used or created>"
estimated_coverage_areas:
- "<class/method: coverage area>"
async_patterns_used: ["Test.startTest/stopTest", "callout mock", "schedulable mock"]
runner_recommendation:
companion_skill: "salesforce-apex-test-runner-skill"
test_class: "{ClassName}Test"
expected_coverage_target: ">=75%"
assumptions:
- "<list of assumptions made>"
missing_context:
- "<what the user should provide to improve coverage>"
| Output | Hand off to |
|---|---|
| Generated test class ready for execution | salesforce-apex-test-runner-skill (T1) |
| Production class still needed | salesforce-apex-generator-skill |
| Test failures need log analysis | salesforce-apex-log-analyzer-skill |
| Ready for sandbox deploy | salesforce-deployment-validator-skill (T2) |
Stop and do not continue if:
TestDataFactory. No reliance on existing org records.| File | When to read |
|---|---|
references/test-data-factory.md | TestDataFactory pattern, builder pattern, field overrides, lazy init, duplicate rule handling |
references/assertion-patterns.md | Assert class methods, error messages, multi-assert vs single, bulk assertion patterns |
references/async-testing.md | Test.startTest/stopTest, mocking Schedulable/Batchable, HTTP callout mocks |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub vincentchuwaichow/vanguard-frontier-agentic --plugin vanguard-frontier-agentic796 skills in this plugin
/accounting-maestroRoute accounting questions to the narrowest specialist in the catalog. Use when you do not already know the specialist needed. Not for direct accounting answers; Maestro classifies, dispatches, and synthesizes only. Dispatches single agent for focused tasks, parallel team (max 3) for multi-domain tasks. Never auto-dispatches any write-capable agent — requires explicit human confirmation before routing to any agent with ledger or ERP write access./add-educational-commentsAdd educational comments to code files to transform them into effective learning resources. Explains the "why" behind syntax, idioms, and design choices, aligned with the learner's knowledge level and educational goals./Other plugins' skills for the same job