/open-horizons-platform:azure-role-selectorfrom open-horizons-platform
Selects the least-privilege Azure RBAC role for an identity, compares built-in and custom role options, and produces Azure CLI assignment commands or Bicep snippets.
Ships in open-horizons-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Select the minimal Azure RBAC role that grants the requested actions at the narrowest safe scope, then return the matching built-in or custom role option with Azure CLI assignment commands and a Bicep role assignment snippet.
Azure MCP/documentation to find minimal built-in role definitions and confirm Actions, NotActions, DataActions, and NotDataActions.Azure MCP/extension_cli_generate to generate Azure CLI commands and to create a custom role definition when no built-in role matches the required permissions.Azure MCP/bicepschema and Azure MCP/get_bestpractices to produce Bicep role assignment snippets and current Azure best-practice guidance.| Input | Required detail | Examples |
|---|---|---|
| Identity | Principal type and object/principal ID or resolvable name | user, group, service principal, managed identity |
| Scope | Narrowest resource boundary that needs access | management group, subscription, resource group, storage account, Key Vault |
| Permissions | Operations the identity must perform | read metrics, restart web app, pull image, read blobs, manage secrets |
| Plane | Control plane or data plane | Actions for ARM management; DataActions for data access |
| Duration | Permanent, temporary, or Privileged Identity Management workflow | standing assignment, eligible assignment, break-glass |
| Decision | Rule |
|---|---|
| Least privilege | Choose the narrowest built-in role whose allowed operations cover the required actions without broad unrelated permissions. |
| Scope minimization | Assign at the resource scope when possible; move to resource group, subscription, or management group only when the required operation spans that scope. |
| Built-in before custom | Prefer a built-in role when it matches cleanly. Create a custom role only when built-ins are too broad or miss required operations. |
| Control plane vs data plane | Do not confuse ARM management with data access. For example, managing a storage account is different from reading blobs. |
| Wildcards | Treat *, broad Microsoft.Authorization/*, and owner-like roles as high risk unless the request explicitly requires administration. |
| Deny exclusions | Check NotActions and NotDataActions; an apparent match is invalid if exclusions remove a required operation. |
Actions or data-plane DataActions.Azure MCP/documentation and compare candidate built-in roles.Azure MCP/extension_cli_generate to produce a custom role definition containing only the required Actions or DataActions.Azure MCP/extension_cli_generate.Azure MCP/bicepschema and validate it against Azure MCP/get_bestpractices.| Request pattern | Check carefully |
|---|---|
| "Read a resource" | Reader may cover management metadata but not data-plane contents such as blobs, secrets, queues, or database rows. |
| "Deploy resources" | Contributor can create resources but cannot grant access; role assignment requires Microsoft.Authorization/roleAssignments/write. |
| "Manage access" | User Access Administrator grants role assignment management without full Owner permissions. |
| "Use Key Vault" | Separate secret, key, and certificate data operations from vault management operations. |
| "Use Storage" | Separate storage account management from blob, queue, table, or file data access roles. |
| "Pull container images" | Registry pull is narrower than contributor permissions on the registry. |
| "Managed identity access" | The consuming identity needs permissions at the target resource; the app host may also need permission to use or attach the identity. |
| Artifact | Include | Notes |
|---|---|---|
| Azure CLI command | az role assignment create --assignee <principal> --role "<role-name-or-id>" --scope <scope> | Prefer role ID for custom roles or ambiguous names. |
| Custom role JSON | Name, IsCustom, Description, Actions, NotActions, DataActions, NotDataActions, AssignableScopes | Include only when no suitable built-in role exists. |
| Bicep snippet | Microsoft.Authorization/roleAssignments with deterministic guid() name | Role assignment name must be stable for the same principal, role, and scope. |
| Explanation | Why the selected role is least privilege and which broader roles were rejected | Mention major excluded permissions and risk. |
AssignableScopes.open-horizons-orchestration (skill).## Azure role selection
**Status:** built-in selected | custom role required | blocked
**Identity:** <principal type and identifier>
**Scope:** `<scope>`
**Plane:** control plane | data plane | both
### Recommendation
| Role | Type | Why it matches | Broader roles rejected |
| --- | --- | --- | --- |
| `<role name or custom role name>` | built-in/custom | <required permissions covered> | <roles and reason> |
### Assignment command
```bash
az role assignment create --assignee <principal-id> --role "<role-name-or-id>" --scope <scope>
```
### Bicep
```bicep
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(<scope-id>, '<principal-id>', '<role-definition-id>')
scope: <scope-symbol>
properties: {
principalId: '<principal-id>'
roleDefinitionId: '<role-definition-resource-id>'
principalType: '<User|Group|ServicePrincipal|ForeignGroup|Device>'
}
}
```
### Custom role definition
<include only when no built-in role matches>
Azure MCP/documentation was used to compare built-in role definitions.Actions and data-plane DataActions are not confused.NotActions and NotDataActions do not exclude required permissions.Azure MCP/extension_cli_generate was used for assignment commands and custom role definitions when needed.Azure MCP/bicepschema and Azure MCP/get_bestpractices were used for the Bicep snippet.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin open-horizons-platform117 skills in this plugin
/agent-framework-pythonApplies Microsoft Agent Framework Python monorepo conventions to the imported example tree. Use when changing its public API exports, package metadata, tests, or Python implementation./agentsApplies current repository conventions for custom-agent metadata, tool scope, body structure, runtime boundaries, and validation. Use when creating or updating an agent./agent-safetyUse when editing Open Horizons agent runtimes, tools, orchestration, or policy code that requires safety and governance controls.Other plugins' skills for the same job