nadolskimm-max/sf-skills/sf-apex
Claude Code and agent skill by nadolskimm-max/sf-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Generates and reviews Salesforce Apex code following best practices. Use when writing, reviewing, or fixing Apex classes, triggers, batch jobs, or queueable/schedulable Apex. Covers Trigger Actions Framework, bulk patterns, governor limits, error handling, and test generation. Do NOT use for LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), or raw SOQL files (use sf-soql).
Install
npx vskill@latest install nadolskimm-max/sf-skills/sf-apexSKILL.md
The same SKILL.md was published earlier as nadolskimm-max/sf-skills/sf-apex.
Salesforce Apex Development
Core Responsibilities
- Generate Apex classes, triggers, batch/queueable/schedulable jobs
- Apply Trigger Actions Framework (TAF) patterns for trigger logic
- Enforce bulkification and governor limit compliance
- Generate test classes targeting 90%+ code coverage
- Review existing Apex for anti-patterns and security issues
Workflow
Phase 1 — Understand
- Identify the object(s), operation(s), and business rules
- Check if a trigger already exists on the object (one trigger per object rule)
- Determine if TAF is installed (
TriggerActioncustom metadata exists)
Phase 2 — Generate
- Follow patterns from references/patterns.md
- Use TAF handler classes for trigger logic, never inline trigger code
- All DML/SOQL must be bulkified (operate on collections, never single records)
- Use
System.assert*methods with meaningful messages in tests
Phase 3 — Validate
Run Salesforce CLI commands to check the code:
For Code Analyzer (if installed):
Phase 4 — Test
Anti-Patterns to Catch
| Anti-Pattern | Fix | |
|---|---|---|
| SOQL inside for-loop | Extract query before loop, use Map for lookups | |
| DML inside for-loop | Collect records in List, single DML after loop | |
| Hardcoded IDs | Use Custom Metadata, Custom Labels, or queries | |
| No null checks | Always check for null before accessing fields | |
@isTest without @TestSetup | Use @TestSetup for shared test data | |
| Trigger with logic | Move logic to TAF handler class | |
System.debug in production | Remove or guard with LoggingLevel |
Naming Conventions
| Type | Pattern | Example | |
|---|---|---|---|
| Trigger | {Object}Trigger | AccountTrigger | |
| TAF Handler | TA_{Object}{Operation}{Order} | TA_AccountBeforeInsert1 | |
| Service class | {Object}Service | AccountService | |
| Selector class | {Object}Selector | AccountSelector | |
| Test class | {ClassName}Test | AccountServiceTest | |
| Batch | {Purpose}Batch | LeadCleanupBatch | |
| Queueable | {Purpose}Queueable | AccountSyncQueueable | |
| Schedulable | {Purpose}Scheduler | DailyCleanupScheduler |
Cross-Skill References
- For SOQL inside Apex: see sf-soql for query optimization
- For LWC controllers (
@AuraEnabled): see sf-lwc - For test patterns: see sf-testing
- For deployment: see sf-deploy
- For detailed patterns and templates: see references/patterns.md
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sf-apex/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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
[](https://verified-skill.com/skills/nadolskimm-max/sf-skills/sf-apex)