grzmol/vibe-force/sf-minimal-change

Claude Code and agent skill by grzmol/vibe-force

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

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-change

Semi-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

SituationUse this skill
Before the first line of Apex, LWC, or a new Flow is writtenYes - run the ladder first
Before creating a custom object, custom field, custom setting, or custom permissionYes
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 diffYes - references/review-checklist.md
Deciding declarative vs code for a specific requirementYes - references/declarative-vs-code.md
Sizing the work of an already-agreed designNo - skill sf-workflow-orchestration
Writing the Apex once rung 7 is reachedSkill sf-apex-development, tests in sf-apex-testing
Writing the component once rung 7 is reachedSkill 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?
TestThe requirement maps to a written acceptance criterion that a user or an integration can observe.
Artefacts killed hereSpeculative 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 checkEvery changed metadata item must be traceable to an acceptance-criterion ID. Anything unmapped is deleted, not deferred.
bash
# Every criterion needs an owner; every artefact needs a criterion.
grep -n "AC-" .vibeforce/state/contract.md

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?
TestNo existing field, class, Flow, permission set, label, or component already delivers the behaviour.
Artefacts killed hereDuplicate 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 checkRepo grep first (free, offline), then org query. Full playbook: references/reuse-discovery.md.
bash
# Repo: fields, classes, flows, permission sets
grep -rn "Region" force-app --include=*.field-meta.xml
ls force-app/main/default/classes | grep -i selector
sf data query --use-tooling-api -q "SELECT QualifiedApiName, DataType, IsCalculated FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName = 'Account'" --target-org vf-dev
sf data query -q "SELECT ApiName, Label, IsActive, ProcessType, TriggerType FROM FlowDefinitionView WHERE IsActive = true" --target-org vf-dev
sf org list metadata --metadata-type ApexClass --target-org vf-dev

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?
TestThe 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 hereApex that only compares fields and throws, Apex rollups, Apex that only sets an owner, Apex that only stamps a formula-derivable value.
Seconds checkSetup > 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 shapeDeclarative artefactMetadata type
Block a save when data is inconsistentValidation ruleValidationRule
Derive a value from fields on the same record or its parentsFormula fieldCustomField (type Formula)
Aggregate children onto a master recordRoll-up summary (Count, Min, Max, Sum)CustomField (type Summary, summaryOperation)
Prevent or warn on duplicatesDuplicate rule + matching ruleDuplicateRule, MatchingRule
Route a record for sign-offApproval processApprovalProcess
React to a record changeRecord-triggered FlowFlow
Grant record access by criteria or ownerSharing ruleSharingRules, CriteriaBasedSharingRule, OwnerSharingRule
Share picklist values across fieldsGlobal value setGlobalValueSet
Gate a feature for some usersCustom permissionCustomPermission

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?
TestA shipped component, wire adapter, or API endpoint covers the interaction without new server code.
Artefacts killed hereHand-rolled forms, hand-rolled tables, @AuraEnabled read methods, custom Apex REST endpoints, custom polling jobs, custom auth headers, custom file upload controllers.
Seconds checkreferences/base-components-first.md (UI) and references/standard-apis-first.md (integration).
NeedStandard capability
View/create/edit a record with labels, help text, validationlightning-record-form; lightning-record-edit-form when the layout must be custom
Tabular data with sorting, inline edit, row actions, infinite scrolllightning-datatable; lightning-tree-grid for hierarchy
Attach files to a recordlightning-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 JScreateRecord / updateRecord / deleteRecord
External system reads/writes a few recordsREST API, sObject Collections, Composite
External system writes a dependent record graphComposite Graph
External system moves more than 2,000 recordsBulk API 2.0
Authenticated callout without secrets in codeNamed credential (callout:My_Named_Credential/path)
Near-real-time change notificationChange 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?
TestIf custom code is unavoidable, it extends the conventions already present instead of introducing a second one.
Artefacts killed hereA 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 checkOne grep per convention; if a convention exists, it wins - even if you prefer the other one.
bash
grep -rln "fflib_SObjectDomain\|fflib_SObjectSelector\|fflib_ISObjectUnitOfWork" force-app/main/default/classes | head
grep -rln "TriggerHandler\|TriggerDispatcher" force-app/main/default/classes | head
grep -rln "@IsTest" force-app/main/default/classes | xargs -r grep -ln "TestDataFactory\|TestFactory" | head
ls force-app/main/default/lwc | grep -iE "util|helper|common"

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?
TestThe whole requirement collapses into a field attribute, a component attribute, a permission-set entry, a WHERE clause, or a formula.
Artefacts killed hereClient-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 checkAsk "which single attribute would make this behaviour true?" before writing a method.
html
<!-- Whole requirement: "Rating must be filled in before save" -->
<lightning-record-edit-form object-api-name="Account" record-id={recordId}>
<lightning-messages></lightning-messages>
<lightning-input-field field-name="Rating" required></lightning-input-field>
<lightning-button type="submit" label="Save"></lightning-button>
</lightning-record-edit-form>

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/grzmol/vibe-force/sf-minimal-change/badge)](https://verified-skill.com/skills/grzmol/vibe-force/sf-minimal-change)

Something wrong with this skill or its page? Tell us.