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-apex

SKILL.md

The same SKILL.md was published earlier as nadolskimm-max/sf-skills/sf-apex.

Salesforce Apex Development

Core Responsibilities

  1. Generate Apex classes, triggers, batch/queueable/schedulable jobs
  2. Apply Trigger Actions Framework (TAF) patterns for trigger logic
  3. Enforce bulkification and governor limit compliance
  4. Generate test classes targeting 90%+ code coverage
  5. 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 (TriggerAction custom 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:

bash
sf project deploy start --source-dir force-app --dry-run --target-org <alias>

For Code Analyzer (if installed):

bash
sf scanner run --target force-app/main/default/classes/MyClass.cls --format table
Phase 4 — Test
bash
sf apex run test --class-names MyClassTest --result-format human --code-coverage --target-org <alias>

Anti-Patterns to Catch

Anti-PatternFix
SOQL inside for-loopExtract query before loop, use Map for lookups
DML inside for-loopCollect records in List, single DML after loop
Hardcoded IDsUse Custom Metadata, Custom Labels, or queries
No null checksAlways check for null before accessing fields
@isTest without @TestSetupUse @TestSetup for shared test data
Trigger with logicMove logic to TAF handler class
System.debug in productionRemove or guard with LoggingLevel

Naming Conventions

TypePatternExample
Trigger{Object}TriggerAccountTrigger
TAF HandlerTA_{Object}{Operation}{Order}TA_AccountBeforeInsert1
Service class{Object}ServiceAccountService
Selector class{Object}SelectorAccountSelector
Test class{ClassName}TestAccountServiceTest
Batch{Purpose}BatchLeadCleanupBatch
Queueable{Purpose}QueueableAccountSyncQueueable
Schedulable{Purpose}SchedulerDailyCleanupScheduler

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/nadolskimm-max/sf-skills/sf-apex/badge)](https://verified-skill.com/skills/nadolskimm-max/sf-skills/sf-apex)

Something wrong with this skill or its page? Tell us.