agentleFS
omoji-personalomoji-personal/torque/.agents/skills/salesforce-build/SKILL.md

salesforce-build

Skill0 starsChanged 3 days agoMITView on GitHub

Create or change Salesforce configuration and code other than flows, such as objects and fields, validation rules, permission sets and access, Lightning pages and layouts, list views, reports and dashboards, custom metadata, Apex and Lightning web components, and connectors to other systems. Use it before you write or edit a metadata file under force-app, before you design a build from a story or decide between configuration, flow and code, and before you deploy what you built. Flows have their own skill, salesforce-flow; a design review or sign-off is salesforce-architecture-review. Covers reuse, the simplest option first, documenting every component, naming, access with every new field, the page users see, configuration instead of hard-coded values, managed packages, and proving the result as the intended user.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    verify: not confirmed in a fetched primary source.

    line 33
  2. Distinctive:

    Not re-tested for this release.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill 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
SKILL.md

Salesforce build

Apply this to every build or change, however small. State described: Winter '27 (API 68.0), checked 2026-11-14. Where a line says "Check", run it: torque check metadata on the files for a tagged rule, the named tool or the target org for the rest. Marks are explained below the first table.

Start here

You are about toDo this firstThen read
Design a build from a storyResolve every object, field and value the story names against the org; write the native baselinereferences/choosing-the-tool.md
Add or change an object, field or validation ruleDescribe the object; look for a field or rule that already does itreferences/data-model.md
Write a description, help text or a nameFind the org's convention in what existsreferences/documentation-and-naming.md
Grant, change or reduce accessList who needs it and how they get access todayreferences/access-and-sharing.md
Change a page, layout, list view, report or dashboardFind which page or folder the users actually usereferences/pages-and-reports.md
Write Apex or a Lightning web componentRecord why configuration and flow do not fitreferences/apex-and-lwc.md
Connect another system or build on a connectorRead the connector's mapping and settings in the org, and the vendor's documentationreferences/integration.md
Build or change a flowRead skill salesforce-flow(that skill)
Joiner, mover or leaver access; external or site usersList what the person holds today, by permission set and groupreferences/access-and-sharing.md, sections 3 to 5 (the skills have no full user-lifecycle procedure)
Duplicate recordsRead the active duplicate and matching rulesreferences/data-model.md, section 6; merging existing duplicates is not covered: plan it as a data migration (skill salesforce-delivery)
Something behaves oddlyLook for it in the gotchasreferences/gotchas.md

Marks used in this skill:

  • [check: access.field-without-grant] and the like: the torque check metadata rule that tests the statement in the source files. "By hand" says what to read where no rule exists.
  • verify: not confirmed in a fetched primary source. Verify in the org or the current documentation before you rely on it or repeat it to a client.
  • field-reported: seen in real client work, usually in one org. Run its check first.

The standard for every build

#RuleHow to check it
1Reuse what exists, and check it first: standard features, installed packages, existing fields, flows, rules and reports.The plan names what it reuses and gives the gap for each new component. Every API name in the spec resolves: sf sobject describe --sobject Object__c --target-org ALIAS.
2Simplest option first: standard feature or configuration, then formula, validation rule or roll-up, then before-save flow, then after-save flow, then flow with invocable Apex, then Apex or a Lightning web component. Record the reason each time you step up.Judgement. The reason names what the simpler option could not do. It is in the description, the class header or the decision record; for code it has the five parts in references/choosing-the-tool.md, section 8.
3Keep the data model change small. A new object, a required field or a changed relationship needs a named gap, and the irreversible ones need a yes first.The stop-and-ask list below.
4Document what you build, when you build it: a description on every component and help text on every field a user fills in.[check: doc.description-missing, doc.help-text-missing] on objects, fields, validation rules, permission sets and groups, record types, custom permissions and flows.
5Follow the org's naming convention. Where none exists, propose one and use it everywhere.Judgement on the pattern; by hand, the new names against it.
6Ship access with every new field and component, by permission set, in the same deployment. A permission set deploy replaces the set: deploy its full file, never only the new entries.[check: access.field-without-grant, access.grant-only-in-profile, access.profile-in-change]. Which fields need a grant: references/access-and-sharing.md, section 1.
7Put it where its users will see it: on the Lightning page or layout they actually use, and activate or assign what you deploy.As the intended user, the field or component is on the page.
8Configuration instead of hard-coded values: no record Ids, org URLs, secrets, or user, role or profile names compared as literals, in formulas, flows or code. A value an admin may need to change goes in custom metadata, a custom label, a custom permission or a named credential; a constant that never varies needs no switch.[check: flow.hard-coded-id, rule.hard-coded-id, rule.profile-or-user-literal, secret.looks-like-secret]; Apex: Code Analyzer AvoidHardcodingId. By hand: search the change for my.salesforce.com.
9Leave something the client's admin can open and change. If a threshold, a recipient or a switch may change, the admin changes it in Setup without a deployment.By hand: each threshold, recipient, endpoint or switch the change adds lives in custom metadata, a custom label, a custom setting or a custom permission, and the hand-over note names where in Setup and how to change it.
10Do not change managed-package components. Extend beside them with the client's own components and use the package's own settings.[check: managed.component-in-change].
11Retrieve before you change; deploy only what you changed; run a check-only deploy before every real one.The change was built on a retrieve of the target org; the deploy names an org and an explicit scope; a dry run from the manifest alone passed just before (field-reported: check-only runs caught 28 of 36 deploy failures). The --json result is in a file, not behind a pipe that hides a failure.
12Prove it as the intended user, on test records, and say which user and how.A person with the target permission sets, not the deploying admin, did the task. Test record Ids are saved and cleaned up by Id.

After the deploy: what "done" needs

A successful deployment is not behaviour. Check each that applies and report it with the org and the date:

  • The field is readable by the people who need it: SELECT Field, Parent.Name FROM FieldPermissions WHERE Field = 'Object__c.Field__c' [ADV].
  • The permission set is assigned to them (an unassigned permission set grants nothing).
  • The page is activated or assigned and the field is on it for that app, record type and profile.
  • Any flow in the change is active in the intended version (skill salesforce-flow).
  • A user with only the intended access completes the task. To check a page in a browser, sign in with torque browser login (see torque browser login --help): do not type a password or paste a sign-in address, and confirm whose session it is before you act.

Stop and ask first

These are the client's decisions or cannot be undone [WA]:

  • Choosing code where configuration or a flow could do the job, unless the approved design already chose it.
  • A new object that overlaps a standard or package object.
  • Enabling Person Accounts or any org feature that cannot be turned off.
  • Changing a field's type, deleting a field, converting lookup to master-detail or back, promoting a picklist to a global value set, encrypting a field.
  • A new required field or validation rule on an object that integrations or packages write to.
  • Any org-wide default, role hierarchy or sharing rule; Modify All Data, View All Data, Author Apex, Manage Users or API access; a guest user permission.
  • Changing page assignments or default apps for everyone; a dashboard's running user.
  • Creating credentials, or pointing anything at a production endpoint.

References

  • references/choosing-the-tool.md: decision tables for the automation tool, where configuration lives, relationship type, record type or object, and when code is right.
  • references/documentation-and-naming.md: what to write per component, limits, examples, naming schemes, what never goes in a description.
  • references/data-model.md: objects, fields, picklists, validation and duplicate rules.
  • references/access-and-sharing.md: permission sets, field access for new fields, sharing, integration users, reducing access, verifying effective access.
  • references/pages-and-reports.md: Lightning pages and assignment, Dynamic Forms, layouts, list views, reports, dashboards and folders.
  • references/apex-and-lwc.md: the minimum when code is the right tool.
  • references/integration.md: connectors, credentials, idempotent writes, error handling, what test data can trigger outside the org.
  • references/gotchas.md: platform and tooling traps, each with a check.

A path that starts with another skill's name, such as salesforce-flow/references/gotchas.md, is relative to the skills folder that holds this skill.

Sources

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.