salesforce-development · mindrally — Claude Code skill: Apex, LWC, metadata
A skill that gives your agent Salesforce coding rules: Apex, triggers, Lightning Web Components, SOQL and metadata. Useful when you build on the platform and want the agent to respect its limits.
npx skills add Mindrally/skills --skill salesforce-development -a claude-codeWhat salesforce-development does
This skill turns the assistant into a Salesforce developer. The Apex section asks for reusable functions in utility classes, no SOQL inside loops, bulkified logic, CRUD and FLS checks, and ApexDocs comments. Triggers follow the One Trigger Per Object pattern with a separate handler class and a static boolean flag to stop recursion.
Lightning Web Components get their own rules: @wire for data, SLDS for layout, ARIA attributes for accessibility, lightning-record-edit-form for record creation and updates. The metadata part covers custom fields, objects and relationships, field-level security, and custom labels for internationalization. Testing requirements are spelled out too: at least 75% coverage, positive, negative and bulk scenarios, @testSetup instead of SeeAllData=true, and HttpCalloutMock for external callouts.
The skill is plain instructions, not a code generator with ready templates. It tells the agent to create LWC only when explicitly asked and to prefer existing objects and fields over new ones. If you never touch Apex or have no org access, there is nothing here for you.
What it helps with
- write Apex classes with separated concerns and no SOQL in loops
- set up a trigger with the One Trigger Per Object pattern and a handler class
- build a Lightning Web Component with
@wireand SLDS styling - check CRUD and FLS before DML operations
- prepare test classes with
@testSetupand callout mocks
Example prompts for the agent
- Write an Apex trigger on Account using the One Trigger Per Object pattern with a handler class
- Create an LWC that lists contacts, loads data with @wire and uses SLDS styles
- Review my Apex class for SOQL inside loops and missing CRUD/FLS checks
How to install salesforce-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill salesforce-development -a claude-code2Manually: put the files in place
~/.claude/skills/salesforce-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/salesforce-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill salesforce-development -a codex2Manually: put the files in place
.agents/skills/salesforce-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill salesforce-development -a cursor2Manually: put the files in place
.cursor/skills/salesforce-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills salesforce-development2Manually: put the files in place
.github/skills/salesforce-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill salesforce-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path salesforce-developmentManually: put the files in place
.devin/skills/salesforce-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill salesforce-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about salesforce-development
How do I install salesforce-development in Claude?
Run npx skills add Mindrally/skills --skill salesforce-development -a claude-code. The skill lands in ~/.claude/skills/salesforce-development/SKILL.md.
What does salesforce-development do?
It gives the agent Salesforce development rules: Apex and trigger conventions, Lightning Web Component requirements, metadata and SOQL practices, plus testing standards.
Which platforms does the skill support?
Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each has its own install path, for example gh skill install Mindrally/skills salesforce-development for GitHub Copilot.
Source text
SKILL.md · Apache-2.0
--- name: salesforce-development description: Expert guidance for Salesforce development including Apex, Lightning Web Components, and metadata best practices metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # 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
© Mindrally · Apache-2.0 · Mindrally/skills
Similar skills
Everything for Backend and APIs →salesforce-development by other authors comes first.