DS

david-sfdev/claude-sf-skills

Developer tools
10 stars Quality 49 Trend 18MIT

Specialized Claude Code skills for Salesforce development: LWC, Apex, and CLI deployments

Overview

A collection of specialized skills for Claude Code to enhance Salesforce development workflows. Expert guidance for Lightning Web Component (LWC) development on Salesforce Platform. - Always use lightning-* namespace components (never generic HTML) - Avoid ternary operators in LWC templates (not supported) - SLDS utility classes for styling - Component communication patterns - Comprehensive component catalog reference Working with Lightning Web Components, creating/modifying LWC code, or when .js-meta.xml files are detected. Apex development following the NimbleUser Apex Style Guide (Google Java Style Guide adapted for Salesforce). - K&R brace style formatting - Naming conventions (UpperCamelCase, lowerCamelCase, CONSTANT_CASE) - Bulkification patterns (avoid SOQL/DML in loops) - Service layer, repository, and trigger handler patterns - Test-driven development best practices - Governor limit awareness Writing or reviewing Apex classes, triggers, or test classes.

README

Salesforce Claude Code Skills

A collection of specialized skills for Claude Code to enhance Salesforce development workflows.

Available Skills

🔷 sf-lwc-development

Expert guidance for Lightning Web Component (LWC) development on Salesforce Platform.

Key Features:

  • Always use lightning-* namespace components (never generic HTML)
  • Avoid ternary operators in LWC templates (not supported)
  • SLDS utility classes for styling
  • Component communication patterns
  • Comprehensive component catalog reference

Use when: Working with Lightning Web Components, creating/modifying LWC code, or when .js-meta.xml files are detected.


⚡ sf-apex-development

Apex development following the NimbleUser Apex Style Guide (Google Java Style Guide adapted for Salesforce).

Key Features:

  • K&R brace style formatting
  • Naming conventions (UpperCamelCase, lowerCamelCase, CONSTANT_CASE)
  • Bulkification patterns (avoid SOQL/DML in loops)
  • Service layer, repository, and trigger handler patterns
  • Test-driven development best practices
  • Governor limit awareness

Use when: Writing or reviewing Apex classes, triggers, or test classes.


🚀 sf-cli-deployment

Modern Salesforce CLI (sf) development deployment workflows.

Key Features:

  • Correct command usage: deploy report vs deploy start vs deploy resume
  • Apex test prompting with time warnings
  • Development iteration loop (code → deploy → test)
  • Deployment cancellation for long-running operations
  • No git requirements (deploy first, commit when ready)
  • LWC and Apex development patterns

Use when: Deploying code to sandboxes/scratch orgs during development.

Installation

Option 1: Install Individual Skills

Copy the specific skill folder you need to your Claude Code skills directory:

macOS/Linux:

# Clone this repository
git clone https://github.com/yourusername/salesforce-claude-skills.git

# Copy desired skill to Claude Code skills directory
cp -r salesforce-claude-skills/sf-lwc-development ~/.claude-code/skills/
cp -r salesforce-claude-skills/sf-apex-development ~/.claude-code/skills/
cp -r salesforce-claude-skills/sf-cli-deployment ~/.claude-code/skills/

Windows (PowerShell):

# Clone this repository
git clone https://github.com/yourusername/salesforce-claude-skills.git

# Copy desired skill to Claude Code skills directory
Copy-Item -Recurse salesforce-claude-skills/sf-lwc-development -Destination "$env:USERPROFILE\.claude-code\skills\"
Copy-Item -Recurse salesforce-claude-skills/sf-apex-development -Destination "$env:USERPROFILE\.claude-code\skills\"
Copy-Item -Recurse salesforce-claude-skills/sf-cli-deployment -Destination "$env:USERPROFILE\.claude-code\skills\"

Option 2: Install All Skills at Once

# Clone this repository
git clone https://github.com/yourusername/salesforce-claude-skills.git

# Copy all skills
cp -r salesforce-claude-skills/sf-* ~/.claude-code/skills/

Option 3: Project-Level Installation

Add skills to your Salesforce project for team-wide use:

# In your Salesforce project root
mkdir -p .claude/skills

# Copy skills to project
cp -r /path/to/salesforce-claude-skills/sf-* .claude/skills/

# Commit to version control
git add .claude/skills
git commit -m "Add Salesforce Claude Code skills"
git push

# Team members automatically get skills when they pull

Skill Details

sf-lwc-development

Files:

  • SKILL.md - Main skill with component selection guide, patterns, and anti-patterns
  • README.md - Skill documentation
  • references/component-catalog.md - Complete Lightning component reference
  • references/common-patterns.md - Real-world LWC patterns
  • references/anti-patterns.md - Critical do’s and don’ts

Auto-triggers when:

  • Working with Salesforce LWC projects
  • Creating/modifying Lightning components
  • Files with .js-meta.xml extension
  • User mentions Salesforce, Lightning Web Components, or SLDS

sf-apex-development

Files:

  • SKILL.md - Complete Apex style guide (formatting, naming, patterns)
  • README.md - Skill documentation
  • references/common-patterns.md - Service layer, repository, trigger handlers, batch processing
  • references/anti-patterns.md - Governor limits, bulkification, security anti-patterns

Auto-triggers when:

  • Working with Apex classes (.cls files)
  • Working with triggers (.trigger files)
  • User mentions Apex, SOQL, DML, or governor limits

sf-cli-deployment

Files:

  • SKILL.md - Development deployment workflows and commands
  • README.md - Skill documentation

Auto-triggers when:

  • Using Salesforce CLI commands
  • Deploying metadata
  • User mentions deployments or org operations

Usage Examples

Example 1: Building an LWC Component

You: "Create a Lightning Web Component to display a list of accounts"

Claude: *Uses sf-lwc-development skill*
- Creates component using lightning-datatable (not HTML table)
- Uses lightning-card for layout
- Implements proper error handling
- Avoids ternary operators in template

Example 2: Writing Apex Code

You: "Write an Apex service class to handle account updates"

Claude: *Uses sf-apex-development skill*
- Creates service class with proper naming (AccountService)
- Uses K&R brace style
- Implements bulkification (handles collections)
- Includes test class with @testSetup
- Follows NimbleUser style guide

Example 3: Deploying Changes

You: "Deploy my AccountService class"

Claude: *Uses sf-cli-deployment skill*
"Would you like to run tests with this Apex deployment?"
- No tests (fastest - 1-2 min)
- Specific tests (2-10 min)
- All local tests (⚠️ 15-60+ min)

You: "Specific tests"
Claude: "Which test classes should I run?"
You: "AccountServiceTest"
Claude: *Deploys with specified tests*
✅ Deployment successful!
Next steps:
1. Test your changes: sf org open
2. Commit your changes? (yes/no)

Skill Behavior

Automatic Activation

Skills activate automatically based on:

  • File extensions (.cls, .trigger, .js, .html, .js-meta.xml)
  • Keywords in user messages
  • Commands being executed
  • Project context

Manual Invocation

You can explicitly ask Claude to use a skill:

"Use the LWC development skill to review this component"
"Apply the Apex style guide to this class"
"Help me deploy using the CLI deployment skill"

What These Skills Do NOT Cover

Not Production/CI/CD:

  • These skills focus on development workflows
  • Production deployments and CI/CD pipelines are intentionally excluded
  • Use separate processes for production migrations

Not Complete Salesforce Documentation:

  • Skills provide patterns, best practices, and common scenarios
  • Always refer to official Salesforce documentation for complete API references

Contributing

Found an issue or want to add a pattern? Contributions welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Updates

To update skills:

# Pull latest changes
cd /path/to/salesforce-claude-skills
git pull origin main

# Copy updated skills
cp -r sf-* ~/.claude-code/skills/

For project-level skills, team members get updates automatically via git pull.

License

MIT License - See LICENSE file for details

Credits

sf-apex-development is based on:

sf-lwc-development is based on:

  • Official Salesforce Lightning Web Components Developer Guide
  • Salesforce Lightning Design System (SLDS)

sf-cli-deployment is based on:

  • Salesforce CLI Command Reference
  • Real-world development workflows

Support

For issues or questions:

  • Open an issue
  • Review individual skill README files for detailed documentation

Happy Salesforce Development with Claude Code! 🚀

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add david-sfdev/claude-sf-skills
New to MCP? Start with the mcpskill.org guide →