Skip to content
forcedotcom avatar

Platform Permission Set Generate

Generates deployable Salesforce PermissionSet XML covering object, field, user, app, and tab access.

CCM score
71 of 100
skills.sh installs
7K
GitHub stars
1.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers permission set creation and editing: core properties, object CRUD, field-level security, user permissions, and app and tab visibility
  • Includes optional sections for Apex class and Visualforce page access, license, record type visibility, and Agentforce employee agent access
  • Enforces that required fields are never listed in <fieldPermissions> and that field permissions cover only fields the request names
  • Designed for Salesforce admins and developers deploying permission sets with the Salesforce CLI

Install

$ npx -y skills add forcedotcom/sf-skills --skill platform-permission-set-generate -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

When to Use This Skill

Use when generating or editing permission set metadata, or when granting object, field, user, and app permissions.

Step 1: Define Core Properties

Start by defining the required permission set properties:

<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>YourPermissionSetName</fullName>
    <label>Display Name for Administrators</label>
    <description>Clear description of purpose and intended audience</description>
</PermissionSet>

Naming conventions:

  • Use descriptive API names (e.g., Sales_Manager_Access)

Step 2: Configure Object Permissions

Add CRUD permissions for standard and custom objects:

<objectPermissions>
    <allowCreate>true</allowCreate>
    <allowRead>true</allowRead>
    <allowEdit>true</allowEdit>
    <allowDelete>false</allowDelete>
    <modifyAllRecords>false</modifyAllRecords>
    <viewAllRecords>false</viewAllRecords>
    <viewAllFields>false</viewAllFields>
    <object>Account</object>
</objectPermissions>

Step 3: Set Field-Level Security

Define field permissions for sensitive or custom fields:

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Backend & APIs, Business, Legal & HR, Security
First seen
Jul 14, 2026

Questions

What does the platform-permission-set-generate skill do?

It generates correct, deployable Salesforce permission set metadata in PermissionSet XML, covering object, field, user, and app permissions. It is meant for creating or editing permission set metadata, object permissions, field-level security, tab visibility, and deploying permission sets.

How do I install the platform-permission-set-generate skill?

Run npx -y skills add forcedotcom/sf-skills --skill platform-permission-set-generate -y in a project. Once installed, the agent can generate permission set XML that grants object, field, user, and app access.

Which fields can the skill grant field-level security on?

It only grants field permissions for fields the request explicitly names, after confirming from object metadata that the field exists and is not required. Required fields, including master-detail fields on the child object, must never appear in fieldPermissions, since deployment would fail.

Why would a permission set deployment fail with this skill?

Common causes are field permissions on required fields, incorrect API names such as missing __c suffixes on custom objects, fields, or tabs, and invented fields that do not exist on the object. Some user permissions like ModifyAllData also fail without their dependent permissions enabled.

More from forcedotcom/sf-skills

All 78

Similar to Platform Permission Set Generate

More Backend & APIs