agentleFS
animuscrmsfdcanimuscrmsfdc/salesforce-vibe-coding/CLAUDE.md

salesforce-vibe-coding

CLAUDE.md0 starsChanged 6 months agoMITView on GitHub

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
  1. Very specific:

    Default package directory: force-app/main/default

    line 6
  2. Very specific:

    Use sf CLI (not sfdx) for all Salesforce commands

    line 11
  3. Very specific:

    Default target org alias: dev-org

    line 12
  4. Distinctive:

    Always include a description on every metadata component

    line 22
  5. Distinctive:

    Never guess or fabricate Salesforce API names, field names, or metadata — read the files first.

    line 26
  6. Very specific:

    Always use with sharing in Apex unless explicitly told otherwise.

    line 29
  7. Distinctive:

    Never hardcode record IDs or org IDs — use Custom Metadata or Custom Labels.

    line 30
  8. Very specific:

    Never use Database.query() with string concatenation — always use bind variables.

    line 31
  9. Very specific:

    Never use WITH SECURITY_ENFORCED on queries that include cross-object relationship fields (e.g.

    line 34
  10. Very specific:

    Never use AccessType.UPSERTABLE with stripInaccessible on junction objects that have master-detail fields — master-detail fields are …

    line 36
  11. Very specific:

    Always call Security.stripInaccessible() in @AuraEnabled write methods (insert/update/upsert)

    line 37
  12. Very specific:

    Use @TestSetup for shared test data

    line 43

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 sf CLI (not sfdx) 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 + __c suffix (e.g. SalesOrder__c)
  • Custom field API names: PascalCase + __c suffix (e.g. TotalAmount__c)
  • Platform event API names: PascalCase + __e suffix (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 sharing in 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_ENFORCED on queries that include cross-object relationship fields (e.g. Speaker__r.Name) or as post-upsert return queries — use Security.stripInaccessible(AccessType.READABLE, results).getRecords() instead; it strips inaccessible fields gracefully rather than throwing
  • WITH SECURITY_ENFORCED is safe only for simple single-object queries with no relationship traversal (e.g. SELECT Id, Name FROM Session__c)
  • Never use AccessType.UPSERTABLE with stripInaccessible on junction objects that have master-detail fields — master-detail fields are creatable but not updatable, so UPSERTABLE strips them and causes DML failures; use ss.Id == null ? AccessType.CREATABLE : AccessType.UPDATABLE instead
  • 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 @TestSetup for 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. spec specs/order-management.md → branch feature/order-management)
  • Hotfix branches: hotfix/<short-description>
  • Used by /deploy, /run-tests, and /auto-commit-push to link branch to spec — no prompting

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.