# Dx Org Permission Set Assign

ALWAYS USE THIS SKILL to assign permission sets to org users.

- Repository: https://github.com/forcedotcom/sf-skills (1134 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add forcedotcom/sf-skills --skill dx-org-permission-set-assign -g -a claude-code -y`
Codex: `npx skills add forcedotcom/sf-skills --skill dx-org-permission-set-assign -g -a codex -y`
Cursor: `npx skills add forcedotcom/sf-skills --skill dx-org-permission-set-assign -g -a cursor -y`
Gemini CLI: `npx skills add forcedotcom/sf-skills --skill dx-org-permission-set-assign -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add forcedotcom/sf-skills`

## Description

ALWAYS USE THIS SKILL to assign permission sets to org users. Assign one or more permission sets to org users using the sf org assign permset command. TRIGGER when the user asks to assign, grant, give, add, or apply permission sets to users, admins, specific orgs, or specific users. Supports granting permissions, giving access, and adding permission sets to default admin or specific users via --on-behalf-of. DO NOT TRIGGER for listing permission sets or checking user permissions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# dx-org-permission-set-assign

Assigns one or more permission sets to org users using `sf org assign permset`. Handles all variants: default admin user, specific org targets, multiple permission sets, and assignment to specific users.

---

## Tool Restrictions

**Use ONLY the Bash tool** to execute `sf org assign permset`. Do NOT use MCP tools like `assign_permission_set`, ignore them completely.

---

## Scope

- **In scope**: Assigning permission sets to users via `sf org assign permset`
- **Out of scope**: Creating permission sets (use `platform-permission-set-generate`), listing permission sets, checking user permissions

---

## Required Inputs

Infer from the user's request:

- **Permission set name(s)**: Extract from user message (can be multiple)
- **Target org**: Use default unless specific alias/username mentioned
- **Target user(s)**: Default is org's default admin user; use `--on-behalf-of` if specific users mentioned

---

## Workflow

1. Match user request to command in table below
2. Execute via Bash tool: `sf org assign permset` with appropriate flags and `--json` flag
3. Return result

If error occurs, check the `failures` array in JSON output for details.

### Command Decision Table

| User intent | Execute via Bash tool |
|-------------|---------|
| Assign one permission set to default admin | `sf org assign permset --name <PermSetName> --json` |
| Assign multiple permission sets to default admin | `sf org assign permset --name <PermSet1> --name <PermSet2> --json` |
| Assign to specific org | `sf org assign permset --name <PermSetName> --target-org <alias> --json` |
| Assign to specific user(s) | `sf org assign permset --name <PermSetName> --on-behalf-of <username1> --on-behalf-of <username2> --json` |
| Assign multiple sets to specific users | `sf org assign permset --name <PermSet1> --name <PermSet2> --on-behalf-of <username1> --on-behalf-of <username2> --json` |

---

## Rules / Constraints

The rest: https://github.com/forcedotcom/sf-skills/blob/HEAD/plugins/builder/dx-org-lifecycle/skills/dx-org-permission-set-assign/SKILL.md
