SF AI ToolkitMake every Salesforce DX project AI-ready in minutes. SF AI Toolkit is a VS Code and Cursor extension that scaffolds everything an AI coding assistant needs to work safely and effectively inside a Salesforce DX project. It generates Cursor rules, Claude Code configuration, cross-tool AI policy docs for Codex/Antigravity-style workflows, Salesforce DX MCP setup, real-time Apex and LWC diagnostics, Agentforce context detection, team config sync, and more — without overwriting existing files. The Problem It SolvesEvery Salesforce developer using Cursor or Claude Code has to manually configure MCP, write Cursor rules, set up CLAUDE.md, add skills, and figure out guardrails from scratch for every project. There is no standard. Every project ends up different. SF AI Toolkit solves this with one command. Open a Salesforce DX project, run the setup, and your project has everything configured correctly — consistent across every developer and every project in your team. InstallationInstall from the VS Code Marketplace:
The extension activates automatically when you open a folder containing Getting StartedStep 1 — Scan your projectOpen the Command Palette (
This scans your project and opens a readiness report showing your AI readiness score (0–100), what is missing, and what is already configured. The score also appears in the status bar at the bottom of the window. Step 2 — Apply the setupRun:
Select a preset (start with Step 3 — Configure MCP for your orgRun:
Enter your Salesforce org alias when prompted. SF AI Toolkit generates:
Both files use the correct Step 4 — Open a Salesforce fileOpen any 90-Second Demo Flow
What Gets CreatedRunning SF AI Toolkit: Apply Recommended Setup with the
AI Tool Compatibility
PresetsChoose the preset that matches your project type when running the setup:
Inline DiagnosticsDiagnostics appear automatically when you open supported files. No configuration required. Apex —
|
| Rule | Severity | Description |
|---|---|---|
no-soql-in-loop |
Error | SOQL query inside a loop — governor limit violation |
no-dml-in-loop |
Error | DML operation inside a loop — 150 DML statement limit |
no-seealldata |
Error | @IsTest(SeeAllData=true) — fragile, org-dependent tests |
missing-sharing-declaration |
Warning | Class declared without explicit with sharing keyword |
no-without-sharing-bypass |
Warning | without sharing used without an explanatory comment |
no-hardcoded-id |
Warning | 15 or 18-character Salesforce ID literal in source code |
no-debug-pii |
Warning | System.debug statement that may log sensitive data |
no-naked-catch |
Warning | Empty catch block that silently swallows exceptions |
missing-test-setup |
Warning | Test class with multiple test methods but no @TestSetup |
LWC JavaScript — .js files inside lwc/
| Rule | Severity | Description |
|---|---|---|
no-console-log |
Warning | console.log() or similar left in production code |
no-inner-html |
Error | Direct innerHTML assignment — XSS risk in Locker Service |
no-hardcoded-url |
Warning | Hardcoded Salesforce URL that breaks across orgs |
missing-wire-error-handler |
Warning | @wire adapter used without error property handling |
LWC HTML — .html files inside lwc/
| Rule | Severity | Description |
|---|---|---|
missing-key-iterator |
Error | for:each iterator missing the required key= attribute |
no-aura-syntax |
Error | aura:* tags or attributes inside an LWC template |
no-onclick-inline |
Error | Inline onclick="handler()" string instead of onclick={handler} binding |
Hover over any underlined code to see the rule title, a detailed explanation, a suggested fix, and a direct link to the relevant Salesforce documentation page.
Commands
Open the Command Palette (Cmd+Shift+P) and search for SF AI Toolkit:
| Command | Description |
|---|---|
| SF AI Toolkit: Scan Salesforce Project | Scan the project and open the readiness report |
| SF AI Toolkit: Apply Recommended Setup | Scaffold all missing files for the selected preset |
| SF AI Toolkit: Bootstrap MCP Config | Generate MCP configuration for Cursor and Claude Code |
| SF AI Toolkit: Check Template Drift | Check whether your AI files are still aligned with best practices |
| SF AI Toolkit: Check Team Sync | Compare local files against your team config URL |
| SF AI Toolkit: Add Cursor Rules | Add .cursor/rules/ files only |
| SF AI Toolkit: Add Cursor Skills | Add .cursor/skills/ templates only |
| SF AI Toolkit: Add Claude Code Setup | Add CLAUDE.md, agents, and slash commands only |
| SF AI Toolkit: Add MCP Guardrails | Add MCP documentation and rule only |
| SF AI Toolkit: Add Git Hooks | Add configurable .githooks + sf-ai-toolkit.config.json |
| SF AI Toolkit: Add claude-mem Salesforce Mode | Generate docs/claude-mem/salesforce-dx.json |
| SF AI Toolkit: Insert Skill Reference | Browse installed skills and copy an @mention to clipboard |
Team Setup
If your entire team uses Cursor on Salesforce DX projects, you can enforce a consistent AI configuration across all developers automatically.
Step 1 — Create a team config file and publish it to a URL your team can access (for example, a raw GitHub URL):
{
"version": "1.0",
"requiredFiles": ["AGENTS.md", "CLAUDE.md", ".cursor/rules/apex.mdc"],
"fileSignals": {
".cursor/rules/apex.mdc": ["Bulkify", "with sharing"]
}
}
Step 2 — Add the URL to your team's shared VS Code settings (.vscode/settings.json committed to your repos, or pushed via your MDM):
{
"sf-ai-toolkit.teamConfigUrl": "https://raw.githubusercontent.com/your-org/your-repo/main/ai-kit-team.json"
}
Step 3 — SF AI Toolkit checks automatically on workspace open. If any developer's project has drifted from the team standard, a notification appears with a link to a full drift report.
Safety
SF AI Toolkit is safe to run on existing projects:
| Behaviour | Detail |
|---|---|
| Never overwrites files | Any file that already exists is skipped entirely |
| Backup before modify | A timestamped backup is created in .sf-ai-toolkit-backup/ before any file is changed |
| Dry-run mode | Preview all planned changes before anything is written |
| No credentials required | No org login, no tokens, no authentication |
| No deployments | Never runs sf project deploy or any org-modifying command |
| No telemetry | No usage data is collected or transmitted |
CLI
All features are available via the companion CLI without installing the extension:
npx @sf-ai-toolkit/cli scan
npx @sf-ai-toolkit/cli init --preset core --yes
npx @sf-ai-toolkit/cli bootstrap-mcp
npx @sf-ai-toolkit/cli deploy-preview
npx @sf-ai-toolkit/cli agentforce-scan
npx @sf-ai-toolkit/cli doctor
Requirements
- VS Code 1.85 or later (or Cursor)
- Node.js 18 or later (for the CLI)
- A Salesforce DX project with
sfdx-project.jsonat the root
Author
Built by Nikhil Karkra
License
MIT