A development framework that enhances Claude Code for Salesforce projects with auto-detection hooks, guided setup, and session persistence.
| Feature | Description |
|---|---|
| Easy Installation | /install command to inject framework into any project |
| Skill Integration | Scan your skills directory and auto-configure detection triggers |
| Code Checks | Automatic detection of anti-patterns in Apex, LWC, and Flows |
| Session Persistence | Dev docs system maintains context across Claude sessions |
| Workflow Agents | Specialized agents for planning and test generation |
In Claude Code, simply say:
Install the Salesforce framework from https://github.com/ehebert7/salesforce-claude-framework
Claude will clone the repo, copy the files, and guide you through setup.
# Clone the framework once
git clone https://github.com/ehebert7/salesforce-claude-framework.git
cd salesforce-claude-frameworkThen in Claude Code, run:
/install
Choose where to install:
- Current directory - Install here
- Specify path - Install to any project folder
- Global - Install to
~/.claude/for all projects
git clone https://github.com/ehebert7/salesforce-claude-framework.git
# Copy to your project
cp -r salesforce-claude-framework/.claude /path/to/your/project/
cp -r salesforce-claude-framework/dev /path/to/your/project/
cp salesforce-claude-framework/CLAUDE.md /path/to/your/project/After installation, run:
/setup
The setup wizard will:
-
Scan for skills - Find your existing skill files
- Scan a custom directory
- Use
~/.claude/skills/(global skills) - Configure auto-detection triggers
-
Customize CLAUDE.md - Set project-specific patterns
- Project name
- Org type
- Testing requirements
| Command | Purpose |
|---|---|
/install |
Install framework to any project directory |
/setup |
Configure skills and customize settings |
/dev-docs |
Create task documentation for long implementations |
/dev-docs-update |
Save progress before ending a session |
The framework detects Salesforce keywords in your prompts and suggests relevant skills.
- You have skill files (e.g.,
~/.claude/skills/apex-best-practices.md) - Run
/setupto scan and configure triggers - When you mention "apex" or "trigger", Claude suggests your skill
| Location | Scope |
|---|---|
~/.claude/skills/ |
Global - available in all projects |
.claude/skills/ |
Project-specific |
Skills are markdown files containing best practices and patterns:
# Apex Best Practices
## Bulkification
- Always handle 200+ records
- Never put SOQL/DML in loops
## Security
- Enforce CRUD/FLS with USER_MODE
- Use bind variables in dynamic SOQLThe framework automatically checks edited files for common issues:
- SOQL/DML inside loops (governor limits)
- Dynamic SOQL injection risks
- Hardcoded Salesforce IDs and URLs
without sharingusage- Empty catch blocks
- Triggers without handler pattern
- Console statements
- Missing promise error handling
- Direct DOM manipulation
- innerHTML assignments
- Excessive Get Records elements
- Multiple loops (performance)
- Missing fault connectors
Creates implementation plans for large features:
- Gathers requirements
- Analyzes existing codebase
- Creates phased implementation plan
Generates Apex test classes with:
@TestSetupfor shared data- Positive/negative/bulk tests
- 85%+ coverage target
Prevents context loss during long implementations.
- Start a task:
"Build opportunity forecasting feature" - Create docs:
/dev-docs - Work on implementation
- Before ending:
/dev-docs-update - Resume later: Claude reads
dev/active/and continues
dev/active/[task-name]/
├── [task-name]-plan.md # Implementation roadmap
├── [task-name]-context.md # Current state and decisions
└── [task-name]-tasks.md # Task checklist
.claude/
├── agents/
│ ├── strategic-plan-architect.md
│ └── test-class-generator.md
├── commands/
│ ├── install.md # Install to any project
│ ├── setup.md # Configure skills and settings
│ ├── dev-docs.md
│ └── dev-docs-update.md
└── hooks/
├── skill-rules.json # Auto-detection configuration
├── userPromptSubmit.ts # Skill suggestion hook
└── stopEvent.ts # Code check hook
dev/
├── active/ # Your task docs (gitignored)
└── templates/ # Doc templates
Maps keywords to skills. Updated by /setup or edit manually:
{
"skills": {
"apex-best-practices": {
"promptTriggers": {
"keywords": ["apex", "trigger", "soql", "dml"]
}
}
}
}Project-specific instructions for Claude:
- Architecture patterns
- Naming conventions
- Testing requirements
- Fork this repository
- Make your improvements
- Submit a pull request
MIT