
This is what you reach for when someone asks "who can see this field?" or "why does this user have access to X?" in Salesforce. It analyzes permission sets and permission set groups, traces hierarchies, and pinpoints exactly which grants give access to objects, fields, Apex classes, flows, or custom permissions. The workflow is smart about using stable metadata names over record IDs and clearly separates direct assignments from inherited group permissions. Inspired by Oumaima Arbani's PSLab, it handles the detective work of access auditing and then hands off to other skills when you need to actually create or deploy permission changes. The output focuses on evidence: what was analyzed, which permissions granted access, and whether it came directly or through a group.
$ npx -y skills add jaganpro/sf-skills --skill sf-permissions --agent claude-codeInstalls into .claude/skills of the current project.
Use this skill when the user needs permission analysis and access auditing: Permission Set / Permission Set Group hierarchy views, “who has access to X?” investigations, user-permission analysis, or permission-set metadata review.
Use sf-permissions when the work involves:
Delegate elsewhere when the user is:
Ask for or infer:
| Request shape | Default capability |
|---|---|
| “who has access to X?” | permission detector |
| “what does this user have?” | user analyzer |
| “show me the hierarchy” | hierarchy viewer |
| “export this permset” | exporter |
| “generate metadata from analysis” | generator or handoff |
Verify sf auth before running permission analysis.
Prefer focused analysis over broad org-wide scans unless the user explicitly wants a full audit.
When choosing identifiers, prefer stable metadata names first:
PermissionSet.NamePermissionSetGroup.DeveloperNameCustomPermission.DeveloperNameAccount or Account.AnnualRevenueAssignee.Username / email for user-centric checksUse Salesforce record IDs only when:
ParentId or SetupEntityId, orUse:
Use:
Name / DeveloperName / API names over org-specific record IDs for first-pass investigation queriesParentId or SetupEntityId, resolve the ID from a prior result instead of starting with copied IDsWhen finishing, report in this order:
Suggested shape:
Permission analysis: <hierarchy / detect / user / export>
Scope: <org, user, permission target>
Findings: <permsets / groups / access level>
Source: <direct assignment or via group>
Next step: <export, generate metadata, or deploy changes>
| Need | Delegate to | Reason |
|---|---|---|
| generate or modify permission metadata | sf-metadata | metadata authoring |
| deploy permission changes | sf-deploy | rollout |
| identify Apex classes needing grants | sf-apex | implementation context |
| bulk user assignment analysis | sf-data | larger data operations |
| Score | Meaning |
|---|---|
| 90+ | strong permission analysis with clear access sourcing |
| 75–89 | useful audit with minor gaps |
| 60–74 | partial visibility only |
| < 60 | insufficient evidence; expand analysis |
Sponsors