home / skills / omer-metin / skills-for-antigravity / salesforce-development

salesforce-development skill

/skills/salesforce-development

This skill helps you enforce Salesforce development best practices across LWC, Apex, APIs, and DX workflows, accelerating reliable, scalable CRM solutions.

npx playbooks add skill omer-metin/skills-for-antigravity --skill salesforce-development

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.3 KB
---
name: salesforce-development
description: Expert patterns for Salesforce platform development including Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs, Connected Apps, and Salesforce DX with scratch orgs and 2nd generation packages (2GP). Use when "salesforce, sfdc, apex, lwc, lightning web components, sfdx, scratch org, visualforce, soql, governor limits, connected app, salesforce, lwc, apex, crm, platform, sfdx, lightning" mentioned. 
---

# Salesforce Development

## Identity



## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill provides expert patterns and practical guidance for Salesforce platform development, covering Lightning Web Components (LWC), Apex, REST/Bulk APIs, Connected Apps, and Salesforce DX with scratch orgs and 2nd-generation packages. It focuses on safe, scalable implementations that respect platform constraints and delivery workflows. Use it to design, diagnose, and validate Salesforce solutions against established patterns and known failure modes.

How this skill works

The skill inspects design choices, code snippets, deployment plans, and org configuration against a curated set of proven patterns, common failure modes, and strict validation rules. It flags anti-patterns, governor limit risks, security exposures, and packaging/deployment mistakes, then suggests concrete fixes and safer alternatives. When you provide code or a plan, it returns targeted recommendations, risk explanations, and step-by-step remediation actions.

When to use it

  • Designing LWC components, Apex classes, or triggers that must scale and respect governor limits
  • Planning CI/CD with Salesforce DX, scratch orgs, and 2GP packaging
  • Integrating external systems using REST, Bulk API, or Connected Apps
  • Diagnosing runtime failures, unexpected limits, or security issues in Salesforce orgs
  • Validating release artifacts and org configurations before deployment

Best practices

  • Follow established platform patterns for separation of concerns: business logic in Apex services, UI in LWC, and thin controllers
  • Write bulk-safe Apex and use async patterns (Queueable, Batchable, Platform Events) to handle large data volumes
  • Enforce security at the platform level: CRUD/FLS checks, named credentials, and least-privilege Connected Apps
  • Use scratch orgs and automated tests in CI to validate 2GP packages before production promotion
  • Monitor governor limits and adopt defensive coding: null checks, limits usage checks, and efficient SOQL/CMDT access

Example use cases

  • Reviewing an LWC that performs complex client-side processing and suggesting server-side offload patterns
  • Converting a monolithic unmanaged package into 2GP with migration steps and metadata considerations
  • Diagnosing frequent Apex CPU timeouts by identifying inefficient SOQL loops and proposing bulkifications
  • Designing a robust Connected App integration with refresh token handling and replay-safe API calls
  • Validating a CI pipeline that creates scratch orgs, runs ATTs, and installs packages for release testing

FAQ

Can this skill check for governor limit issues automatically?

Yes — provide code or execution context and it will highlight limit risks, explain why they occur, and recommend patterns to avoid them.

Will it rewrite my Apex or LWC code for me?

It provides precise, minimal code changes and patterns to apply; you should review and integrate the suggested edits into your codebase.