sf-apex

Generate and review Salesforce Apex code with a 150-point quality report.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/dcinzona/folios --skill sf-apex-dcinzona
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-apex
Source: https://github.com/dcinzona/folios/tree/main/.agents/skills/sf-apex
Command: npx skills add https://github.com/dcinzona/folios --skill sf-apex-dcinzona

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Developers and reviewers often need production-quality Apex that is bulk-safe, secure, and testable; this skill reduces the risk of governor-limit failures, security regressions, and fragile tests by generating and reviewing Apex code with explicit best-practice guardrails.

Core Features & Use Cases

  • Code generation for services, selectors, triggers (TAF or standard), batch/queueable/schedulable jobs, and @InvocableMethod wrappers.
  • Automated code review with a 150-point scoring rubric covering bulkification, security (CRUD/FLS/sharing), testing, architecture, error handling, naming, performance, and quality.
  • Template library and LSP-assisted validation for rapid authoring and immediate syntax fixes; produces tests (PNB: positive, negative, bulk) and actionable remediation steps.

Quick Start

Create an AccountService class with CRUD methods, a test class that covers positive/negative/bulk cases, and a 150-point review report highlighting any fixes required.

Frequently Asked Questions about sf-apex

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

FAQPage Schema
How do I generate bulk-safe Apex classes for Salesforce?

Generate bulk-safe Apex by creating service classes and triggers that enforce bulkification and governor-limit compliance. The output includes test-ready code covering positive, negative, and bulk scenarios, plus a 150-point quality report with actionable fixes.

What is the best way to review existing Apex code for security and CRUD/FLS violations?

Review existing Apex code by analyzing .cls and .trigger files against a 150-point scoring rubric. This enforces CRUD/FLS, sharing rules, and security guardrails, producing an actionable remediation report highlighting any required fixes.

How do I write Apex test classes that cover positive, negative, and bulk cases?

Write Apex test classes by generating PNB test structures covering positive, negative, and bulk cases. This ensures comprehensive test coverage and validates that your classes and triggers meet production-quality testing standards.

Can I use this to refactor Salesforce triggers and batch jobs?

Yes, you can refactor Salesforce triggers, batch, queueable, and schedulable jobs. It generates and refactors code while enforcing best-practice guardrails like bulkification and sharing rules to prevent governor-limit failures.

Why do my Apex triggers fail governor limits and how can I fix them?

Apex triggers fail governor limits due to SOQL queries or DML operations inside loops. Fix them by applying bulkification patterns during code generation or refactoring, which processes records in collections to stay within limits.

Does Apex code generation work for invocable methods and schedulable jobs?

Yes, Apex code generation works for @InvocableMethod wrappers, schedulable, queueable, and batch jobs. It produces secure, testable code with LSP-assisted validation for immediate syntax fixes and architectural compliance.