Claudeforce: Claude working on Salesforce
How Claude was used to build, test and document this repo: which tool did what, where a human stayed in the loop, and what went wrong along the way.
What Claudeforce is for
Claudeforce is Claude as the builder and operator. It works while a person is building or maintaining the project: writing and deploying code, testing agents, reading what is in an org, driving a web UI with approvals, and writing documentation. End users never see it and it is not in the run-time path.
Meant for
- Building and deploying Apex and agent metadata, with tests
- Reading and documenting what already exists in an org
- Diagnosing failures, such as an agent that answers Off Topic
- Browser steps in Slack and Setup, with a person approving
- Writing documentation and diagrams and pushing them
Not meant for
- Handling secrets, logins or verification codes
- Approving permission screens on your behalf
- Acting as the production support agent for customers
- Deploying to production without review
Use cases
| Use case | Who | How it works | Status |
|---|---|---|---|
| Build and deploy Apex with tests | Developer | Salesforce CLI, deploying only the new classes with specified tests | Built |
| Create and wire an agent | Developer | Agent spec, actions with schemas, topic, bot user permission set | Built |
| Test an agent with real utterances | Developer | Agent test spec and test run. Results were mixed and are listed on the Agentforce page | Built |
| Retrieve and document an org | Admin | Retrieved the Site Helper agent, channel and queue and wrote them up | Built |
| Load sample data | Developer | Apex scripts for Cases and Knowledge articles | Built |
| Test the Slack alerts | Developer | Sent messages, created a High priority Case to fire the trigger, deleted it | Built |
| Drive a web UI with approvals | Admin | Claude in Chrome. The Slackbot page had no agent builder, so instructions were written instead | Built Instructions only |
| Publish documentation and diagrams | Anyone | Pages and README written from real files and pushed to GitHub | Built |
| Review code before a release | Developer | Run a Salesforce code review on the Apex | Next |
| Re-run agent tests on every change | Developer | Add the agent tests to a release checklist | Next |
| Log in, enter secrets, click Allow | Claude | Always left to a person | Out of scope |
| Answer customers in production | Claude | That is Agentforce | Out of scope |
The toolchain
Claude Code runs in your editor and works in the project folder. It deploys and tests through the Salesforce CLI, and pushes to GitHub with git and gh. Claude in Chrome drives the browser for steps that only exist in a web UI, such as Slack. Pages are published as private claude.ai artifacts and, for this repo, to GitHub Pages from docs/. Anything that needs a secret, a login or a permission click comes back to you.
What Claude did in this repo
| Work | Tool | Result |
|---|---|---|
| Apex actions for Cases | Claude Code, sf CLI | Deployed, 2 tests pass |
| Case Triage agent | Claude Code, sf agent create | Created and activated. Agent test: the list-cases test passed, the priority-change test stopped at the confirmation prompt, one topic-name check mismatched |
| Agent actions and schemas | Claude Code | Fixed after the agent answered Off Topic. Missing schema files were the cause |
| Bot user access | Claude Code | Permission set assigned after removing View All |
| Knowledge and sample data | Claude Code | Knowledge enabled after you approved it. 14 articles (5, then 9 more), 10 Cases |
| Slack alerts | Claude Code | Deployed, 4 tests pass. After you set the webhook, a test Case fired the trigger and the alert arrived in Slack |
| Daily digest | Claude Code | Scheduled for 8:00 daily. A manual send was seen in Slack |
| Site Helper agent, channel, queue | Claude Code, retrieve | Read from the org and documented. Built by you, not by Claude |
| Slackbot page | Claude in Chrome | Found no agent builder, stopped, wrote instructions instead |
| Claude agent on AWS | Claude Code, Sonnet 5.5 | Code type-checked, 5 unit tests, 10 Apex tests, two LWCs deployed. Nothing was deployed to AWS. A second model (Opus) then reviewed the README and pages for accuracy, and Claude fixed what it found |
| Architecture pages | Claude Code, artifacts | Written from the retrieved metadata and code |
| This repo | Claude Code, git | Org usernames redacted before the public push |
Where a human stayed in charge
| Moment | What happened |
|---|---|
| Enabling Knowledge | It cannot be undone, so Claude asked first and waited for a yes. |
| Slack approach | Claude asked which way to build, since the Slackbot UI had no agent builder. |
| Webhook URL pasted in chat | Claude declined to enter it into Salesforce and opened the Custom Labels page so you could paste it yourself. |
| Slack webhook URL | Treated as a secret. You paste it into Salesforce yourself. The Chrome instructions forbid reading it back. |
| Public repo | Pushed because you asked. Usernames were replaced with placeholders first. GitHub Pages was already on, so the pages are public. |
| A wrong earlier claim | The first architecture page said the chat had no routing. Claude retrieved the real metadata, found that wrong, and published a correction. |
Instructions for Claude in Chrome
The file docs/slackforce-chrome-instructions.md is a prompt you paste into Claude in Chrome. It creates the Slack app and webhook, stops for each approval, and checks whether the Salesforce and Slack integration is available. Replace the placeholders for your own org URL and Slack workspace ID first.
Things that went wrong, and the fix
| Problem | Fix |
|---|---|
Installed CLI too old for sf agent publish | Create with sf agent create, then deploy metadata |
| Actions deployed but unusable | Add input and output schema.json beside each function |
| Bot user rejected View All permissions | Use read access with sharing |
Apex would not compile: bind on the left, String[][] | Two queries, and List<List<String>> with explicit inner lists |
| Wider deploy failed the 75% coverage check | Deploy only the new classes with RunSpecifiedTests |
| Webhook label reset to its placeholder, so no alert was sent | A project deploy overwrote it. In the working project the label file is now in .forceignore. The README says to deploy first, paste the webhook after, and then add that line |
| Apex tests failed once the real webhook was set, and a test insert fired the live Slack trigger | Pin config such as the webhook in every test, and use a Medium priority Case where a High one would fire the trigger |
| A claim of generic error messages was only partly true until a reviewer checked the code | Both Apex services now catch every exception. Have a second reviewer check claims against the code |
| SSH push denied | Pushed over HTTPS with the existing gh login, no config change |