Skip to content

enzoleonardi/claude-salesforce-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Salesforce Skill for Claude Code & Cowork

Claude Code and Cowork skill for Salesforce org interaction — authenticate, query, download and upload files.

Built-in safety: Write operations require user confirmation. Delete operations show explicit warnings and require typed confirmation. Read operations execute freely. Set SALESFORCE_SKIP_WARNINGS=true to bypass all confirmations.

Installation

Option 1: Plugin (recommended)

In Claude Code, run:

/plugin marketplace add enzoleonardi/claude-salesforce-skill
/plugin install salesforce@enzoleonardi-claude-salesforce-skill

Option 2: Manual download

mkdir -p ~/.claude/skills/salesforce
curl -sL https://raw.githubusercontent.com/enzoleonardi/claude-salesforce-skill/main/skills/salesforce/SKILL.md \
  -o ~/.claude/skills/salesforce/SKILL.md

What it does

This skill teaches Claude Code and Cowork how to:

Category Capabilities
Auth Web login (OAuth), access token fallback, Cowork support
Read 🟢 SOQL queries, bulk queries (10k+), Tooling API, object discovery
Write 🟡 Create, update, upsert records, bulk upsert from CSV, data import
Delete 🔴 Single record delete, bulk delete from CSV (with safety warnings)
Apex Execute anonymous Apex, view/tail debug logs
Metadata List types, retrieve components, deploy (with dry-run)
Files Upload and download via ContentVersion, batch operations, multipart for large files
Monitor API limits, org health, debug log inspection

Operation Safety Levels

🟢 READ     → Execute freely
🟡 WRITE    → Warn user, ask confirmation
🔴 DELETE   → Explicit warning, require typed confirmation

To bypass all warnings: export SALESFORCE_SKIP_WARNINGS=true

Usage

Once installed, Claude Code and Cowork will automatically use this skill when you mention Salesforce-related tasks:

> Query all closed-won opportunities from last year
> Create a new Account called "Acme Corp"
> Download all files attached to these accounts
> What custom objects exist in my org?
> Execute this Apex script against my org
> Show me my org's API limits
> Deploy this Apex class to my sandbox

Prerequisites

  • Node.js (for Salesforce CLI)
  • Python 3 (for file processing tasks)
  • A Salesforce org with API access

Authentication

The skill supports three methods (tried in order):

  1. Web Login (recommended) — sf org login web opens the browser for OAuth. Secure, long-lived refresh token.
  2. Manual OAuth Flow (Cowork/headless) — Full OAuth Authorization Code flow producing a long-lived refresh token.
  3. Access Token (last resort) — Session ID for orgs without IP-based session locking. Short-lived.

Plugin Structure

claude-salesforce-skill/
├── .claude-plugin/
│   ├── plugin.json          # Plugin manifest
│   └── marketplace.json     # Marketplace definition
├── skills/
│   └── salesforce/
│       └── SKILL.md         # The skill content
├── README.md
└── LICENSE

License

MIT

About

Query your Salesforce org, download and upload files, create reports and more via Claude Code & Cowork

Topics

Resources

License

Stars

Watchers

Forks

Contributors