sf-permissions
jaganpro/sf-skills
Permission Set analysis, hierarchy viewing, and access auditing for Salesforce orgs.
What is sf-permissions?
Analyzes Permission Sets and Permission Set Groups to answer "who has access to X?" questions and audit user permissions. Use this skill when investigating permission hierarchies, detecting access grants, or reviewing permission metadata—not for creating new metadata or deploying changes.
- Detect which permission sets or groups grant access to objects, fields, Apex classes, flows, tabs, or custom permissions
- Visualize permission set and permission set group hierarchies with ASCII trees or tables
- Analyze user-centric access: what permissions does a specific user have
- Export and audit permission configurations from the org
- Identify whether access is granted directly or inherited via Permission Set Groups
How to install sf-permissions
npx skills add https://github.com/jaganpro/sf-skills --skill sf-permissions- Salesforce CLI (sf) installed and authenticated to target org
- Read access to PermissionSet, PermissionSetGroup, and related metadata
How to use sf-permissions
- 1.Identify the target org alias and clarify what you want to analyze (object, field, user, or full hierarchy)
- 2.Run the appropriate permission detector or analyzer against the org using stable metadata names (PermissionSet.Name, object API names, usernames)
- 3.Review the output to identify which permissions grant access and whether access is direct or inherited
- 4.If you need to create or modify permissions, hand off to sf-metadata; if you need to deploy, use sf-deploy
Use cases
- Answering "who has access to the Account object?" by tracing permission sources
- Auditing a user's effective permissions across all assigned permission sets
- Visualizing the hierarchy of nested Permission Set Groups
- Exporting permission metadata for documentation or compliance review
- Investigating why a user lacks access to a specific field or Apex class
- Salesforce administrators auditing access control
- Security and compliance teams performing permission reviews
- Developers investigating permission-related access issues
- Architects designing permission hierarchies
sf-permissions FAQ
Use sf-permissions to analyze and audit existing permission configurations. Use sf-metadata when you need to create new permission sets or modify permission metadata definitions.
No. sf-permissions is read-only analysis. Use sf-deploy to roll out permission set changes to your org.
sf-permissions can detect which permission sets grant access to an Apex class. For deeper implementation analysis of Apex-managed sharing logic, delegate to sf-apex.
Prefer stable metadata names first: PermissionSet.Name, PermissionSetGroup.DeveloperName, object/field API names, and usernames. Use record IDs only when required by the underlying query.
sf-permissions is designed for focused analysis. For large-scale user data operations, delegate to sf-data.
Full instructions (SKILL.md)
Source of truth, from jaganpro/sf-skills.
name: sf-permissions description: > Permission Set analysis, hierarchy viewer, and access auditing. TRIGGER when: user asks "who has access to X?", analyzes permission sets/groups, or touches .permissionset-meta.xml / .permissionsetgroup-meta.xml files. DO NOT TRIGGER when: creating new metadata (use sf-metadata), deploying permission sets (use sf-deploy), or Apex sharing logic (use sf-apex). license: MIT metadata: version: "1.1.0" author: "Jag Valaiyapathy" inspiration: "PSLab by Oumaima Arbani (github.com/OumArbani/PSLab)"
sf-permissions
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.
When This Skill Owns the Task
Use sf-permissions when the work involves:
- permission set / permission set group analysis
- user access investigation
- finding which permission grants object / field / Apex / flow / tab / custom-permission access
- auditing or exporting permission configuration
- reviewing permission metadata impacts
Delegate elsewhere when the user is:
- creating new metadata definitions → sf-metadata
- deploying permission sets → sf-deploy
- analyzing Apex-managed sharing logic → sf-apex
Required Context to Gather First
Ask for or infer:
- target org alias
- whether the question is about an object, field, Apex class, flow, tab, custom permission, or specific user
- whether the goal is hierarchy visualization, access detection, export, or metadata generation
- whether the output should be terminal-focused or documentation-friendly
Recommended Workflow
1. Classify the request
| 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 |
2. Connect to the correct org
Verify sf auth before running permission analysis.
3. Use the narrowest useful query
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.DeveloperName- object and field API names such as
AccountorAccount.AnnualRevenue Assignee.Username/ email for user-centric checks
Use Salesforce record IDs only when:
- the underlying object model requires
ParentIdorSetupEntityId, or - you are drilling into records returned by a prior read-only query in the same investigation
4. Render findings clearly
Use:
- ASCII tree or table output for terminal work
- Mermaid only when documentation benefit is clear
- concise summaries of which permission source grants access
5. Hand off creation or deployment work
Use:
- sf-metadata for richer metadata generation
- sf-deploy for deployment
High-Signal Rules
- distinguish direct Permission Set grants from grants via Permission Set Groups
- prefer
Name/DeveloperName/ API names over org-specific record IDs for first-pass investigation queries - be explicit about whether access is object-level, field-level, class-level, flow-level, or custom-permission-based
- use Tooling API where required for setup entities and advanced visibility questions
- for agent access questions, verify exact agent-name matching in permission metadata
- when a follow-up child query requires
ParentIdorSetupEntityId, resolve the ID from a prior result instead of starting with copied IDs
Output Format
When finishing, report in this order:
- What was analyzed
- Org / subject scope
- Which permissions grant access
- Whether access is direct or inherited
- Recommended follow-up
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>
Cross-Skill Integration
| 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 |
Reference Map
Start here
Specialized analysis
Score Guide
| 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 |
Related skills
More from jaganpro/sf-skills and the wider catalog.

sf-soql
SOQL/SOSL query generation, optimization, and performance scoring for Salesforce.

sf-testing
Run Apex tests, analyze coverage, and fix failures with structured test-fix loops.

sf-vlocity-build-deploy
>

sf-ai-agentforce
>

transitions-dev
Production-ready CSS transitions for web apps. Use when implementing notification badges, dropdowns, modals, panel reveals, page transitions, card resizes, number pop-ins, text swaps, icon swaps, success checks, avatar group hovers, or error state shakes. Triggers on "add a transition", "animate the dropdown", "make the modal open smoothly", "swap icon", "page slide", "stagger animation", "open / close transition", "make it animate", "tween the size", "fade between", "smooth open", "smooth close", "success animation", "checkmark animation", "confirmation animation", "form error", "shake on invalid", "validation feedback", "hover lift", "avatar stack hover", "chip group hover".

transitions-dev
Production-ready CSS transitions for web apps—21 portable, namespaced snippets with motion tokens.