Platform Sharing Rules Generate
Generates, edits, deletes, and retrieves Salesforce sharing rules for record-level access beyond org-wide defaults.
- CCM score
- 73 of 100
- skills.sh installs
- 6.3K
- GitHub stars
- 1.2K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers criteria-based, role or group owner-based, and guest user sharing rules stored in
.sharingRules-meta.xmlfiles - Retrieves the latest org state with
sf project retrieve startbefore every edit or delete to avoid stale overwrites - Blocks sharing to queues and refuses in-place changes to
sharedToorsharedFrom, requiring delete and recreate instead - Designed for Salesforce developers managing record sharing, excluding permission sets, profiles, and object-level security
Install
$ npx -y skills add forcedotcom/sf-skills --skill platform-sharing-rules-generate -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Sharing Rules Generator
Get, create, edit, and delete Salesforce Sharing Rules metadata to control record-level access beyond org-wide defaults. Supports criteria-based rules, role/group-based owner rules, and guest user rules for Experience Sites.
Scope
- In scope: Creating, editing, deleting, and retrieving (getting)
sharingCriteriaRules,sharingOwnerRules, andsharingGuestRulesmetadata; retrieving existing sharing rules from an org using the Metadata API Retrieve pattern; appending new rules to existing files; modifying rule criteria or access levels; removing rules from metadata files; configuring rules for Guest and Portal profiles. - Out of scope: Changing org-wide defaults (OWD/sharing model), creating Experience Sites, configuring permission sets or profiles (use
platform-permission-set-generate), territory-based sharing rules.
Clarifying Questions
Before proceeding, confirm with the user if not already clear:
For Get operations:
- Which object's sharing rules should be retrieved? (standard or custom object API name, or all objects)
- Which target org should the rules be retrieved from? (org alias or default)
Details
- Repository
- github.com/forcedotcom/sf-skills
- Categories
- Backend & APIs, Security
- First seen
- Jul 14, 2026
Questions
What does the platform-sharing-rules-generate skill do?
It creates, edits, deletes and retrieves Salesforce Sharing Rules metadata to control record-level access beyond org-wide defaults. It supports criteria-based rules, role or group owner rules, and guest user rules for Experience Sites.
How do I install the platform-sharing-rules-generate skill?
Run npx -y skills add forcedotcom/sf-skills --skill platform-sharing-rules-generate -y in a project. Once installed, the agent can work with sharingCriteriaRules, sharingOwnerRules and sharingGuestRules files.
What does this skill need to work?
It needs the Salesforce CLI (sf, version 2.0.0 or later) and access to a target org so it can retrieve the latest sharing rules before editing them. It targets metadata API version 60.0 or later.
When should I not use this skill?
Do not use it for permission sets, profiles or object-level security, which fall under platform-permission-set-generate. It also does not change org-wide defaults or create territory-based sharing rules.
Where does this skill sit in its category?
It is listed in the Backend and APIs category on Claude Marketplaces. It focuses on Salesforce record-level sharing metadata rather than general backend services.
More from forcedotcom/sf-skills
All 78- Platform Metadata Api Context Get6.3K
- Design Systems Slds Apply6.2K
- Design Systems Slds Validate6.1K
- Agentforce Generate6K
- Platform Custom Tab Generate6K
- Dx Code Analyzer Configure6K
- Platform Custom Application Generate6K
- Platform List View Generate6K
- Agentforce Architecture Analyze5.9K
- Dx Org Switch5.9K
- Dx Org Permission Set Assign5.9K
- Platform Custom Lightning Type Generate5.9K
- Agentforce Test5.8K
- Agentforce Observe5.8K
- Platform Lightning App Coordinate5.8K
- Design Systems Slds2 Migrate5.8K
- External Diagram Mermaid Generate5.6K
- Integration Connectivity Connected App Configure5.6K
- Integration Connectivity Generate5.6K
- Agentforce D360 Analyze5.4K
- Experience Ui Bundle Frontend Generate5.4K
- Platform Tracing Configure5.3K
- Experience Ui Bundle Metadata Generate5.3K
- Experience Ui Bundle App Coordinate5.3K
Similar to Platform Sharing Rules Generate
More Backend & APIsplatform-metadata-api-context-getforcedotcom/sf-skills6.3K installsREQUIRED companion for Salesforce metadata generation — load this schema/API-context skill in the SAME turn as ANY metadata generation skill; if you load a gene
fullstack-guardianjeffallan/claude-skills6.2K installsBuilds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level. Covers the
platform-custom-tab-generateforcedotcom/sf-skills6K installsUse this skill when users need to create or configure Salesforce Custom Tabs. Trigger when users mention tabs, navigation tabs, object tabs, web tabs, Visualfor
platform-list-view-generateforcedotcom/sf-skills6K installsUse this skill when users need to create, generate, or validate Salesforce List View metadata. Trigger when users mention list views, filtered record lists, cre
platform-lightning-app-coordinateforcedotcom/sf-skills5.8K installsBuild complete Salesforce Lightning Experience applications from natural language descriptions. Use this skill when a user requests a "complete app", "Lightning
principle-make-operations-idempotentcursor/plugins5.7K installsApply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of p