salesforce-vibe-coding
CLAUDE.md0 starsChanged 6 months agoMITView on GitHub
In this repository7 other files it gives its agents.
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
Default package directory: force-app/main/default
- Very specific: line 11
Use sf CLI (not sfdx) for all Salesforce commands
- Very specific: line 12
Default target org alias: dev-org
- Distinctive: line 22
Always include a description on every metadata component
- Distinctive: line 26
Never guess or fabricate Salesforce API names, field names, or metadata — read the files first.
- Very specific: line 29
Always use with sharing in Apex unless explicitly told otherwise.
- Distinctive: line 30
Never hardcode record IDs or org IDs — use Custom Metadata or Custom Labels.
- Very specific: line 31
Never use Database.query() with string concatenation — always use bind variables.
- Very specific: line 34
Never use WITH SECURITY_ENFORCED on queries that include cross-object relationship fields (e.g.
- Very specific: line 36
Never use AccessType.UPSERTABLE with stripInaccessible on junction objects that have master-detail fields — master-detail fields are …
- Very specific: line 37
Always call Security.stripInaccessible() in @AuraEnabled write methods (insert/update/upsert)
- Very specific: line 43
Use @TestSetup for shared test data
≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AnimusCRM — Salesforce Developer Org
Project
- Org: Salesforce Developer Edition
- Project name: animuscrm
- Default package directory: force-app/main/default
- API Version: 66.0
- Login URL: https://login.salesforce.com
CLI
- Use
sfCLI (notsfdx) for all Salesforce commands - Default target org alias:
dev-org - Username: david@animuscrm.com
- Deploy:
sf project deploy start --source-dir force-app --target-org dev-org - Retrieve:
sf project retrieve start --source-dir force-app --target-org dev-org
Metadata Conventions
- Custom object API names: PascalCase +
__csuffix (e.g.SalesOrder__c) - Custom field API names: PascalCase +
__csuffix (e.g.TotalAmount__c) - Platform event API names: PascalCase +
__esuffix (e.g.OrderPlaced__e) - Validation rule names: Descriptive_Snake_Case (e.g.
Amount_Cannot_Be_Negative) - Always include a description on every metadata component
- Label and API name must match (no abbreviations)
General
- Never guess or fabricate Salesforce API names, field names, or metadata — read the files first.
Security Defaults
- Always use
with sharingin Apex unless explicitly told otherwise. - Never hardcode record IDs or org IDs — use Custom Metadata or Custom Labels.
- Never use
Database.query()with string concatenation — always use bind variables.
Apex Coding Standards
- Never use
WITH SECURITY_ENFORCEDon queries that include cross-object relationship fields (e.g.Speaker__r.Name) or as post-upsert return queries — useSecurity.stripInaccessible(AccessType.READABLE, results).getRecords()instead; it strips inaccessible fields gracefully rather than throwing WITH SECURITY_ENFORCEDis safe only for simple single-object queries with no relationship traversal (e.g.SELECT Id, Name FROM Session__c)- Never use
AccessType.UPSERTABLEwithstripInaccessibleon junction objects that have master-detail fields — master-detail fields are creatable but not updatable, so UPSERTABLE strips them and causes DML failures; usess.Id == null ? AccessType.CREATABLE : AccessType.UPDATABLEinstead - Always call
Security.stripInaccessible()in @AuraEnabled write methods (insert/update/upsert) - Triggers: one trigger per object, delegate logic to a handler class
- Bulkify all trigger and batch logic
Testing
- Minimum 90% code coverage for all Apex
- Use
@TestSetupfor shared test data - Never use
SeeAllData=true - Run tests:
sf apex run test --target-org animuscrm --code-coverage
Git Branch Conventions
- Feature branches:
feature/<spec-slug>where<spec-slug>matches the spec filename exactly (e.g. specspecs/order-management.md→ branchfeature/order-management) - Hotfix branches:
hotfix/<short-description> - Used by
/deploy,/run-tests, and/auto-commit-pushto link branch to spec — no prompting
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

