azure-role-selector

Identify least privilege Azure roles and generate CLI commands and Bicep code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/MoonAxis/azure-stack --skill azure-role-selector-moonaxis
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: azure-role-selector
Source: https://github.com/MoonAxis/azure-stack/tree/main/skills/azure-role-selector
Command: npx skills add https://github.com/MoonAxis/azure-stack --skill azure-role-selector-moonaxis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users identify the most appropriate Azure role to assign to an identity, ensuring adherence to the principle of least privilege and simplifying the role assignment process.

Core Features & Use Cases

  • Role Identification: Determines the built-in or custom role that grants precisely the required permissions.
  • Least Privilege Guidance: Recommends roles that minimize access, enhancing security.
  • Custom Role Generation: Creates custom roles when no suitable built-in role exists.
  • CLI Command Generation: Provides commands to assign the identified or custom role.
  • Bicep Snippet Generation: Offers Bicep code for declarative role assignment.
  • Use Case: A developer needs to grant read-only access to a specific storage account. This Skill will identify the Storage Blob Data Reader role or generate a custom role if necessary, and provide the CLI command and Bicep code to apply it.

Quick Start

Use the azure-role-selector skill to find the minimal role to grant read access to Azure Key Vault secrets.

Frequently Asked Questions about azure-role-selector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I assign least privilege Azure roles to an identity?▼

To assign least privilege Azure roles, identify the specific built-in role granting exactly the required permissions, or generate a custom role when no built-in match exists. This ensures identities receive minimal access for enhanced security.

What is the best way to create custom Azure RBAC roles when built-in roles are too broad?▼

Creating custom Azure RBAC roles is best handled by generating custom role definitions via CLI commands. This approach grants precisely the required permissions while strictly adhering to the principle of least privilege for resource access control.

Can I generate Bicep code for declarative Azure role assignments?▼

Yes, you can generate Bicep snippets for declarative Azure role assignments. This allows you to programmatically deploy and manage role assignments alongside your infrastructure as code for consistent resource access control.

Does this approach work for finding specific Azure permissions like Key Vault secret access?▼

Yes, this approach works for finding specific Azure permissions like Key Vault secret access. It identifies the minimal built-in role matching your requirements or generates a custom role definition to provide exact permission grants.

Why should I use least privilege role assignments instead of broad built-in Azure roles?▼

Using least privilege role assignments instead of broad built-in Azure roles minimizes security risks by ensuring identities only have the exact permissions needed. This prevents unauthorized access and maintains strict security best practices for Azure resources.