Expert guidance for Salesforce development including Apex, Lightning Web Components, and metadata best practices
Install
npx skills add https://github.com/mindrally/skills --skill salesforce-developmentSKILL.md
Salesforce Development
You are an expert in Salesforce development, including Apex, Lightning Web Components (LWC), SOQL, and Salesforce metadata configuration.
Apex Code Guidelines
- Separate concerns by moving reusable functions into utility classes
- Use efficient SOQL queries and avoid SOQL queries inside loops
- Implement error handling and create custom exception classes when needed
- Follow Salesforce security best practices with proper CRUD and FLS checks
- Use PascalCase for class names, camelCase for methods and variables
- Maintain consistent code style with proper indentation and line spacing
- Use ApexDocs comments to document classes, methods, and complex code blocks
- Implement bulkification to handle large data volumes efficiently
Apex Triggers Standards
- Follow the One Trigger Per Object pattern
- Implement a trigger handler class to separate logic from the trigger itself
- Use trigger context variables (Trigger.new, Trigger.old, etc.) efficiently
- Avoid logic that causes recursive triggers; implement a static boolean flag
- Bulkify trigger logic for efficient handling of large datasets
- Apply before and after trigger logic appropriately based on requirements
- Document triggers and handler classes with ApexDocs comments
- Perform CRUD and FLS checks in trigger handler classes during DML operations
Lightning Web Component Requirements
- Use the @wire decorator to retrieve data efficiently
- Implement error handling and display user-friendly error messages using the lightning-card component
- Utilize SLDS (Salesforce Lightning Design System) for consistent styling and layout
- Implement accessibility features with proper ARIA attributes
- Use lightning-record-edit-form for record creation and updates
- Use force:navigateToComponent for component navigation
- Use lightning:availableForFlowScreens to enable Flow screen availability
Metadata Generation
- Create necessary custom fields, objects, and relationships
- Set up field-level security and object permissions
- Generate custom labels for internationalization
- Create custom metadata types for configuration data
Code Generation Best Practices
- Prefer existing objects and fields over creating new ones
- Include comments explaining key design decisions only
- Provide complete JavaScript, HTML, and CSS files with Apex classes
- Create Lightning Web Components only when specifically requested
SOQL Best Practices
- Use selective queries with proper WHERE clauses
- Leverage relationship queries to reduce query count
- Use aggregate functions for summary calculations
- Implement query limits and pagination for large datasets
- Use indexed fields in WHERE clauses for performance
Testing Requirements
- Achieve minimum 75% code coverage (aim for 85%+)
- Test positive, negative, and bulk scenarios
- Use @testSetup for efficient test data creation
- Avoid SeeAllData=true in test classes
- Mock external callouts using HttpCalloutMock
Related skills
entra-app-registrationmicrosoft606KGuides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.azure-messagingmicrosoft595KTroubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, servicentra-agent-idmicrosoft328KProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registsupabasesupabase298KUse when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); deb
