sf-apex

Generate and review Apex code with scoring across 8 categories.

423|97|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/Jaganpro/claude-code-sfskills --skill sf-apex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-apex
Source: https://github.com/Jaganpro/claude-code-sfskills/tree/main/skills/sf-apex
Command: npx skills add https://github.com/Jaganpro/claude-code-sfskills --skill sf-apex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sf-deployment.

What problem does it solve?

Writing high-quality, secure, and performant Apex code that adheres to Salesforce best practices and governor limits is challenging. This skill automates Apex code generation and provides expert code reviews, ensuring your code is production-ready and maintainable, saving development and review time.

Core Features & Use Cases

  • Intelligent Code Generation: Create Apex classes, triggers (using Trigger Actions Framework), and test classes from natural language requirements.
  • Automated Code Review: Analyze existing Apex code against 8 categories of best practices, providing a score and actionable fixes.
  • Deployment Integration: Seamlessly validate and deploy generated or reviewed code using the sf-deployment skill.
  • Use Case: "Generate an Apex service class to handle Account record updates, ensuring bulkification and proper error handling." The skill will create the class, a corresponding test, and validate it against best practices.

Quick Start

Generate an Apex trigger for the Account object that sets default values before insert.

Frequently Asked Questions about sf-apex

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

FAQPage Schema
How do I generate Apex code that follows Salesforce best practices?

Generate Apex code from natural language requirements using automated code generation that applies 2025 best practices across classes, triggers, test classes, and batch jobs. The skill creates production-ready code validated against 150 points across 8 categories including bulkification, security, and SOLID design patterns.

Can I automate code review for existing Apex triggers and classes?

Automated code review analyzes your Apex code against best practices across 8 categories, providing a comprehensive score and actionable fixes. Review covers bulkification, governor limits, security checks, and compositional design to ensure code meets Salesforce standards.

What's the best way to validate Apex code before deployment?

Validate Apex code through automated review scoring and deployment-ready validation checks integrated with sf-deployment. The skill ensures generated or reviewed code passes best practices verification before deployment to production.

How do I create Apex triggers using the Trigger Actions Framework?

Generate Apex triggers using the Trigger Actions Framework from natural language specifications. The skill automatically creates trigger code with proper event handling, bulkification, and error handling following current Salesforce best practices.

Do I need to write test classes manually for generated Apex code?

No—the skill generates corresponding test classes alongside production Apex code. Test classes are created to validate the generated logic and can be reviewed and deployed using the same best practices validation workflow.

What Apex code quality issues does automated review catch?

Automated review detects issues across 8 categories: bulkification violations, governor limit risks, security vulnerabilities, SOLID principle violations, testing gaps, performance problems, and maintainability concerns. Results include a detailed score and specific remediation steps.