Getting Started with Claude Code
Claude Code is Anthropic's official CLI tool for building with Claude. Follow these steps to set up Agentforce development in Claude Code.
1. Install Claude Code
2. Install the Salesforce CLI & Connect Your Org
Verify the installation:
Run this command:
sf --version
Expected output: @salesforce/cli/
Authenticate Your Org (No Browser Required)
Copy the command below and run it in your terminal to authenticate the Salesforce CLI with your org:
Verify your org connection:
Run this command:
sf org display user
Expected output: Your org username and alias
3. Install Salesforce Skills & Start Building
Choose a skills library to install. Each provides Salesforce development knowledge that Claude Code uses automatically. Compare all options.
Restart Claude Code after running
Skills are loaded when Claude Code starts. Run the command above before launching Claude Code, or restart Claude Code if it's already running.
Start Building
Copy and paste this prompt into Claude Code. Optionally enter a project and agent name below. If you leave it blank, the prompt uses "ExampleName".
Before anything else, verify prerequisites are installed:
1. Check SF CLI: `sf --version`
If not found, install it: `brew install sf`
If found, update it: `sf update`
2. Check agentforce-adlc skills: `ls ~/.claude/skills/developing-agentforce/SKILL.md 2>/dev/null`
If not found, install them: `curl -sSL https://raw.githubusercontent.com/SalesforceAIResearch/agentforce-adlc/main/tools/install.sh | bash`
3. Check SF CLI auth: `sf org display user --json`
If not authenticated, run the SFDX Auth URL command from the setup page.
Use the installed agentforce-adlc skills for the full agent lifecycle.
Interview me about the agent I want to build — its role, company, and behaviors. Wait for my response before building.
Then use /developing-agentforce to author, discover, scaffold, and deploy the agent. Use /testing-agentforce to run smoke tests and create a test suite. Build real actions — not stubs. Iterate until quality is solid.What Happens Next
After you paste the prompt, Claude will use the installed agentforce-adlc skills:
- Discover: Retrieve your agent, parse subagents and actions, validate targets exist in the org
- Scaffold: Generate real backing actions (Flows/Apex) for every subagent, no stubs or mocks
- Deploy: Validate bundle, deploy metadata, publish and activate the agent
- Test & Optimize: Run evaluation tests, analyze traces, fix issues, and iterate until quality is good
Tips
- Be specific about scope: "Handle order status and returns" beats "Customer support"
- Say what it should NOT do: "Does NOT handle billing questions or account changes"
- Mention verification needs: "Verify identity before showing account details"
- Include state tracking: "Track the order number across conversation turns so the customer doesn't have to repeat it"