grzmol/vibe-force/sf-minimal-change
Claude Code and agent skill by grzmol/vibe-force
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Decides the smallest change that fully satisfies a Salesforce requirement before any code is written - challenging the requirement, searching the repo and org for something that already does the job, choosing platform configuration (validation rule, formula, roll-up summary, record-triggered Flow, sharing rule, duplicate rule, approval process) over Apex, choosing base Lightning components (lightning-record-form, lightning-record-edit-form, lightning-datatable, lightning-tree-grid, lightning-file-upload) and Lightning Data Service wire adapters (getRecord, getRelatedListRecords, getPicklistValues, graphql) over custom components and @AuraEnabled controllers, choosing standard REST/Composite/Composite Graph/sObject Collections/Bulk API 2.0/GraphQL/Pub-Sub endpoints over custom Apex REST, and reusing the frameworks already in the project instead of adding a second convention. Use this skill before writing Apex, LWC, Flow, or new metadata; when a story smells like it needs a new object, field, framework, or component; when reviewing a design, a pull request, or a metadata diff for over-build; and whenever someone proposes a trigger framework, wrapper component, utility layer, custom logging framework, custom scheduler, or config flag that nobody will ever flip.
Install
npx vskill@latest install grzmol/vibe-force/sf-minimal-changeSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as grzmol/vibe-force/sf-minimal-change.
Minimal Change on the Salesforce Platform
When to use
| Situation | Use this skill | |
|---|---|---|
| Before the first line of Apex, LWC, or a new Flow is written | Yes - run the ladder first | |
| Before creating a custom object, custom field, custom setting, or custom permission | Yes | |
| Story wording implies a "framework", "engine", "handler layer", or "wrapper" | Yes - rung 5 and 6 usually kill it | |
| Reviewing a design document, a PR, or a metadata diff | Yes - references/review-checklist.md | |
| Deciding declarative vs code for a specific requirement | Yes - references/declarative-vs-code.md | |
| Sizing the work of an already-agreed design | No - skill sf-workflow-orchestration | |
| Writing the Apex once rung 7 is reached | Skill sf-apex-development, tests in sf-apex-testing | |
| Writing the component once rung 7 is reached | Skill sf-lwc-development, tests in sf-lwc-jest-testing |
This skill answers one question: what is the smallest change that fully satisfies the requirement on this platform? It never answers "what is the least work" - the floor below is non-negotiable, and correctness always outranks smallness.
The documented Salesforce order of preference for working with data is itself a ladder: base components built on Lightning Data Service, then LDS wire adapters, then the GraphQL wire adapter, then Apex (Data Guidelines). The rungs below extend that principle to metadata, automation, and integration.
The ladder
Walk the rungs in order. Stop at the first rung that fully satisfies the acceptance criteria. Record the rung you stopped on, and the rung you rejected, in .vibeforce/state/contract.md (format in references/scope-contract.md).
Rung 1 - Does it need to exist?
| Test | The requirement maps to a written acceptance criterion that a user or an integration can observe. | |
|---|---|---|
| Artefacts killed here | Speculative fields, "future-proof" config flags, custom settings nobody reads, admin toggles with one value, status picklists with unused values, "just in case" custom permissions, extra LWC properties in targetConfig. | |
| Seconds check | Every changed metadata item must be traceable to an acceptance-criterion ID. Anything unmapped is deleted, not deferred. |
Requirement challenge questions: who consumes the output, what happens if the field is absent, what is the first real record that exercises this, and which existing report or list view already answers the question. If the answer is "the admin might want it later", it is not in scope.
Rung 2 - Does it already exist in this repo or org?
| Test | No existing field, class, Flow, permission set, label, or component already delivers the behaviour. | |
|---|---|---|
| Artefacts killed here | Duplicate fields (Region__c next to Sales_Region__c), a second selector for the same object, a second "utils" module, a duplicate custom label, a parallel record-triggered Flow on the same object. | |
| Seconds check | Repo grep first (free, offline), then org query. Full playbook: references/reuse-discovery.md. |
EntityDefinition and FieldDefinition are Tooling API objects, so they need --use-tooling-api (Tooling API: EntityDefinition, FieldDefinition). ApexClass, ApexTrigger, PermissionSet, and FlowDefinitionView are standard objects and query without that flag. sf org list metadata requires Modify All Data or Modify Metadata Through Metadata API Functions on the connected user (org list metadata).
Rung 3 - Can platform configuration do it?
| Test | The behaviour is expressible as a rule the platform already evaluates: validation rule, formula field, roll-up summary, duplicate/matching rule, assignment or escalation rule, approval process, sharing rule, record-triggered Flow, dynamic form, list view, or report. | |
|---|---|---|
| Artefacts killed here | Apex that only compares fields and throws, Apex rollups, Apex that only sets an owner, Apex that only stamps a formula-derivable value. | |
| Seconds check | Setup > Object Manager > Object > Validation Rules / Fields & Relationships / Flows; or the metadata types listed below. Capability table with breaking points: references/declarative-vs-code.md. |
| Requirement shape | Declarative artefact | Metadata type | |
|---|---|---|---|
| Block a save when data is inconsistent | Validation rule | ValidationRule | |
| Derive a value from fields on the same record or its parents | Formula field | CustomField (type Formula) | |
| Aggregate children onto a master record | Roll-up summary (Count, Min, Max, Sum) | CustomField (type Summary, summaryOperation) | |
| Prevent or warn on duplicates | Duplicate rule + matching rule | DuplicateRule, MatchingRule | |
| Route a record for sign-off | Approval process | ApprovalProcess | |
| React to a record change | Record-triggered Flow | Flow | |
| Grant record access by criteria or owner | Sharing rule | SharingRules, CriteriaBasedSharingRule, OwnerSharingRule | |
| Share picklist values across fields | Global value set | GlobalValueSet | |
| Gate a feature for some users | Custom permission | CustomPermission |
Roll-up summary operations are exactly Count, Min, Max, and Sum, with optional summaryFilterItems (CustomField). A validation rule holds a formula that blocks the save and shows an error message when it returns true; since API 20.0 it cannot use compound fields (ValidationRule). Flow choice, ordering, and entry criteria belong to skill sf-flow-automation; sharing and permission design to sf-security-model.
Rung 4 - Is there a standard platform capability?
| Test | A shipped component, wire adapter, or API endpoint covers the interaction without new server code. | |
|---|---|---|
| Artefacts killed here | Hand-rolled forms, hand-rolled tables, @AuraEnabled read methods, custom Apex REST endpoints, custom polling jobs, custom auth headers, custom file upload controllers. | |
| Seconds check | references/base-components-first.md (UI) and references/standard-apis-first.md (integration). |
| Need | Standard capability | |
|---|---|---|
| View/create/edit a record with labels, help text, validation | lightning-record-form; lightning-record-edit-form when the layout must be custom | |
| Tabular data with sorting, inline edit, row actions, infinite scroll | lightning-datatable; lightning-tree-grid for hierarchy | |
| Attach files to a record | lightning-file-upload | |
| Read one record and its fields | @wire(getRecord) | |
| Read a related list | @wire(getRelatedListRecords) | |
| Read picklist values for a record type | @wire(getPicklistValues) | |
| Read several objects or parent/child data in one call | @wire(graphql) | |
| Create/update/delete one record from JS | createRecord / updateRecord / deleteRecord | |
| External system reads/writes a few records | REST API, sObject Collections, Composite | |
| External system writes a dependent record graph | Composite Graph | |
| External system moves more than 2,000 records | Bulk API 2.0 | |
| Authenticated callout without secrets in code | Named credential (callout:My_Named_Credential/path) | |
| Near-real-time change notification | Change Data Capture + Pub/Sub API |
lightning-record-form, lightning-record-edit-form, and lightning-record-view-form implement Lightning Data Service, need no Apex controller, and enforce field-level security and sharing (Record Form, Record Edit Form). Composite executes up to 25 subrequests as one API call (Composite); Bulk API 2.0 is the documented choice above 2,000 records, and bulkified synchronous calls below it (Bulk API intro).
Rung 5 - Is a framework or dependency already in the project?
| Test | If custom code is unavoidable, it extends the conventions already present instead of introducing a second one. | |
|---|---|---|
| Artefacts killed here | A second trigger framework, a second unit-of-work, a bespoke test data builder next to the existing factory, a new LWC utility module duplicating an existing one, a new logging framework. | |
| Seconds check | One grep per convention; if a convention exists, it wins - even if you prefer the other one. |
When the project is fflib-based, new behaviour goes into the existing layers - see sf-fflib-foundations, sf-fflib-selector-layer, sf-fflib-domain-service-uow, sf-fflib-testing, and sf-fflib-operations. Two conventions in one repo is a defect, not a style preference.
Rung 6 - Can it be one line or one attribute?
| Test | The whole requirement collapses into a field attribute, a component attribute, a permission-set entry, a WHERE clause, or a formula. | |
|---|---|---|
| Artefacts killed here | Client-side validation code replacing required, an Apex query filter replacing a WHERE clause, a trigger replacing a formula field, a new class replacing a permission-set entry. | |
| Seconds check | Ask "which single attribute would make this behaviour true?" before writing a method. |
Server-side truth still belongs in a validation rule: the platform documentation recommends validation rules over client-side validation, and the form surfaces those errors automatically (Record Edit Form).
Rung 7 - The minimum custom implementation
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sf-minimal-change/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/grzmol/vibe-force/sf-minimal-change)