Agent skill

Apex Azure Rbac

by jonathan-vella in jonathan-vella/apex

ANALYSIS SKILL — Find the right Azure RBAC role for an identity with least-privilege access; generate CLI, Bicep, and Terraform code to assign it.

MITAuto-check passedBackend & APIs

Install Apex Azure Rbac

skills CLI
$ npx skills add jonathan-vella/apex --skill apex-azure-rbac -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jonathan-vella/apex apex-azure-rbac --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jonathan-vella/apex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/apex-azure-rbac .claude/skills/apex-azure-rbac && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apex-azure-rbac
GitHub stars
217
Token cost
~1.8k tokens
SKILL.md length
486 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

ANALYSIS SKILL — Find the right Azure RBAC role for an identity with least-privilege access; generate CLI, Bicep, and Terraform code to assign it.

  • Works in 7 steps: Identify the operation — what action… → Search Microsoft docs — invoke… → Verify against the live catalogue —… → …
  • : deploying (apex-azure-deploy)
  • SKILL.md covers Rules, Steps and Prerequisites for Granting Roles
  • Calls az

What it does

Apex Azure Rbac is an agent skill from jonathan-vella/apex. ANALYSIS SKILL — Find the right Azure RBAC role for an identity with least-privilege access; generate CLI, Bicep, and Terraform code to assign it. WHEN: "what role should I assign", "least privilege role", "RBAC role for", "role for managed identity", "custom role definition", "assign role to identity". DO NOT USE FOR: deploying (apex-azure-deploy), security audits (apex-azure-compliance).

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Authorization and RBAC, Infrastructure as code and Security review. It works with Microsoft Azure, Bicep, Terraform and Model Context Protocol. The repository describes itself as: APEX turns Azure platform engineering requirements into verified, deploy-ready IaC — powered by GitHub Copilot agents, real-time pricing, and built-in compliance. The licence is MIT.

When your agent uses it

  • : deploying (apex-azure-deploy)
  • Security audits (apex-azure-compliance)

Example prompts

  • “what role should I assign”
  • “least privilege role”
  • “RBAC role for”
  • “/apex-azure-rbac”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Identify the operation — what action does the identity need (read storage, manage keys, deploy resources, etc.)?
  2. Search Microsoft docs — invoke mcp_azure-mcp_documentation with command: "microsoft_docs_search" and a query such as "Azure built-in role…
  3. Verify against the live catalogue — preserve every permission block and scope
  4. If no built-in fits — scaffold a custom role definition with only the required actions / dataActions
  5. Generate the assignment CLI —
  6. Generate the IaC snippet —
  7. Verify the caller has assignment permission — cross-check with Prerequisites for Granting Roles

What it can do on your machine

Read from SKILL.md and the folder at commit b8e5908. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • az

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • registry.terraform.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Apex Azure Rbac loads about 1.8k tokens when it runs. Until then it costs about 103 tokens; SKILL.md has 486 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jonathan-vella/apex at commit b8e5908, republished under its MIT licence (© jonathan-vella). 486 words, ~1,805 tokens.

Download SKILL.mdSave it as .claude/skills/apex-azure-rbac/SKILL.md (or your agent's skills folder).
name
apex-azure-rbac
description
**ANALYSIS SKILL** — Find the right Azure RBAC role for an identity with least-privilege access; generate CLI, Bicep, and Terraform code to assign it. WHEN: "what role should I assign", "least privilege role", "RBAC role for", "role for managed identity", "custom role definition", "assign role to identity". DO NOT USE FOR: deploying (apex-azure-deploy), security audits (apex-azure-compliance).
user-invocable
true
disable-model-invocation
false
argument-hint
identity, resource scope and required access
license
MIT
metadata.author
Microsoft
metadata.version
1.1.0

Azure RBAC Skill

Find the minimal built-in Azure role that grants the requested permissions to an identity, then generate the az role assignment create CLI and a Bicep Microsoft.Authorization/roleAssignments snippet. Custom roles only when no built-in fits.

Rules

  • Least privilege first — prefer the most narrowly-scoped built-in role that satisfies the permissions; only define a custom role when no built-in fits
  • Role assignment scope matters — prefer resource-level or resource-group scope over subscription scope
  • Discover roles via mcp_azure-mcp_documentation — invoke with command: "microsoft_docs_search" to query for built-in role definitions before generating any CLI or Bicep
  • Verify with az role definition list — cross-check the discovered role against the live Azure RBAC catalogue
  • Use guid() in Bicep for Microsoft.Authorization/roleAssignments names so assignments are idempotent across re-deploys; set principalType: 'ServicePrincipal' for managed identities
  • Granting roles requires elevated permission — see Prerequisites for Granting Roles below
  • Generate before executing — require explicit approval for the exact principal, role and scope; generic role guidance does not confer write permission for role creation or assignment
  • Authentication is separate — use canonical auth guidance; Azure RBAC does not grant Microsoft Graph API consent
  • Out of scope: deploying resources (use apex-azure-deploy), security audits (use apex-azure-compliance)

Steps

  1. Identify the operation — what action does the identity need (read storage, manage keys, deploy resources, etc.)?

  2. Search Microsoft docs — invoke mcp_azure-mcp_documentation with command: "microsoft_docs_search" and a query such as "Azure built-in role <operation>" (e.g., "Azure built-in role read blob storage"); collect candidate role names + role IDs

  3. Verify against the live catalogue — preserve every permission block and scope:

    bash
    az role definition list --name "<RoleNameOrId>" --query "[].{name:roleName,id:name,permissions:permissions,assignableScopes:assignableScopes}" --output json

    Evaluate all permissions[]: actions minus notActions for management-plane operations, and dataActions minus notDataActions for data-plane operations, with wildcard matching against the requested provider operation. Combine grants across blocks and applicable assignments; exclusions subtract only from their own grant, not other roles. Management */read does not grant blob/secret data access. Check assignment scope/inheritance, conditions, deny assignments and active PIM state separately. A role definition alone does not prove effective access. Missing permissions or unavailable catalogue evidence means unverified, not granted.

  4. If no built-in fits — scaffold a custom role definition with only the required actions / dataActions:

    Use editing tools to create custom-role.json; generate the command separately.

    json
    {
      "Name": "<CustomRoleName>",
      "Description": "<purpose>",
      "Actions": ["<provider>/<resource>/<action>"],
      "NotActions": [],
      "DataActions": [],
      "NotDataActions": [],
      "AssignableScopes": ["/subscriptions/<sub-id>"]
    }
    bash
    az role definition create --role-definition custom-role.json
  5. Generate the assignment CLI —

    bash
    az role assignment create \
      --assignee <objectId|appId> \
      --role "<RoleName>" \
      --scope <scope>
  6. Generate the IaC snippet —

    Bicep (AVM, preferred): AVM resource modules accept a roleAssignments array, so assign the role where the module deploys the resource. Pin the module version per AVM modules.

    bicep
    module storage 'br/public:avm/res/storage/storage-account:<version>' = {
      name: 'storage'
      params: {
        name: storageAccountName
        roleAssignments: [
          {
            principalId: principalId
            roleDefinitionIdOrName: 'Storage Blob Data Reader'
            principalType: 'ServicePrincipal'
          }
        ]
      }
    }

    Bicep (raw resource on an existing target):

    bicep
    param principalId string
    param roleDefinitionGuid string
    param storageAccountName string
    
    resource targetResource 'Microsoft.Storage/storageAccounts@2026-04-01' existing = {
      name: storageAccountName
    }
    
    resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
      name: guid(targetResource.id, principalId, roleDefinitionGuid)
      scope: targetResource
      properties: {
        roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleDefinitionGuid)
        principalId: principalId
        principalType: 'ServicePrincipal'
      }
    }

    Terraform (raw azurerm_role_assignment):

    hcl
    resource "azurerm_role_assignment" "this" {
      scope                = azurerm_resource_group.target.id   # or any resource ID
      role_definition_name = "<RoleName>"                       # e.g., "Storage Blob Data Reader"
      principal_id         = azurerm_user_assigned_identity.app.principal_id
      principal_type       = "ServicePrincipal"
      # For idempotent imports/refreshes, lock to the role definition GUID instead:
      # role_definition_id = "/subscriptions/${data.azurerm_subscription.current.subscription_id}/providers/Microsoft.Authorization/roleDefinitions/<role-id-guid>"
    }

    AVM-TF callers should prefer the Azure/avm-res-authorization-roleassignment module over raw azurerm_role_assignment when available — it wraps the resource with the canonical AVM input/output contract.

  7. Verify the caller has assignment permission — cross-check with Prerequisites for Granting Roles

Show full SKILL.md (47 more words)Show less

Prerequisites for Granting Roles

To assign RBAC roles to identities, you need a role that includes the Microsoft.Authorization/roleAssignments/write permission. The most common roles with this permission are:

  • User Access Administrator (least privilege - recommended for role assignment only)
  • Owner (full access including role assignment)
  • Custom Role with Microsoft.Authorization/roleAssignments/write

© jonathan-vella, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/apex-azure-rbac of jonathan-vella/apex.

Open the folder on GitHubat commit b8e5908

Compare with similar skills

Apex Azure Rbac next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apex Azure Rbac compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apex Azure Rbac this skilljonathan-vella/apex217—~1.8kAutomated safety check: PassMIT
Azure Validatemicrosoft/GitHub-Copilot-for-Azure2551 repos~880Automated safety check: PassMIT
Azure Firmware AnalysisMicrosoftDocs/Agent-Skills776—~1.2kAutomated safety check: PassCC-BY-4.0
Azure Pricing Lookupthomast1906/github-copilot-agent-skills202—~4.9kAutomated safety check: PassNone
Writing Bicep Templatesmicrosoft-foundry/foundry-agent-webapp127—~1.2kAutomated safety check: PassMIT
Azure EnclaveMicrosoftDocs/Agent-Skills776—~2.7kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Azure Validate

    microsoft/GitHub-Copilot-for-Azure

    Official

    Pre-deployment validation for Azure readiness. An agent skill from microsoft/GitHub-Copilot-for-Azure.

    255 GitHub starsUsed in 1 repo~880 tokens
    DevOps & CloudAuto-check passed
  • Azure Firmware Analysis

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Firmware Analysis development including best practices, security, integrations & coding patterns, and deployment.

    776 GitHub stars~1.2k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Azure Pricing Lookup

    thomast1906/github-copilot-agent-skills

    Looks up live Azure retail prices by SKU, service or region through the Azure MCP pricing tool, estimates template costs and compares regions, price types and savings plans.

    202 GitHub stars~4.9k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Writing Bicep Templates

    microsoft-foundry/foundry-agent-webapp

    Provides Bicep coding standards for Azure infrastructure in this repository.

    127 GitHub stars~1.2k tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed
  • Azure Enclave

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Enclave development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, and deployment.

    776 GitHub stars~2.7k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated 4 days ago
    DevOps & CloudAuto-check: notes

More from jonathan-vella/apex

All 39 skills in this repo
  • Apex Azure Diagnostics

    jonathan-vella/apex

    WORKFLOW SKILL — Debug Azure production issues: Container Apps, Functions, App Service, AKS, VMs and messaging, with KQL log analysis.

    217 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • ANALYSIS SKILL — Azure Policy discovery: effective assignments (incl.

    217 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Apex Context Management

    jonathan-vella/apex

    UTILITY SKILL — Two-mode context-window management. An agent skill from jonathan-vella/apex.

    217 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Apex Python Diagrams

    jonathan-vella/apex

    UTILITY SKILL — Python diagram generation for Azure architectures, WAF/cost/compliance charts, ERDs, swimlanes, timelines, and wireframes.

    217 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Apex Terraform Search Import

    jonathan-vella/apex

    WORKFLOW SKILL — Manual-only discovery and import of existing Azure resources into Terraform management.

    217 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Apex Vendor Prompting

    jonathan-vella/apex

    ANALYSIS SKILL — Manual-only audit of Anthropic Claude Opus 5.5 / Sonnet 5.5 and OpenAI GPT-6 / GPT-5.6 prompting guidance and APEX conventions.

    217 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed

Questions about Apex Azure Rbac

What does Apex Azure Rbac do?

ANALYSIS SKILL — Find the right Azure RBAC role for an identity with least-privilege access; generate CLI, Bicep, and Terraform code to assign it. Apex Azure Rbac is an agent skill from jonathan-vella/apex. ANALYSIS SKILL — Find the right Azure RBAC role for an identity with least-privilege access; generate CLI, Bicep, and Terraform code to assign it.

When should I use Apex Azure Rbac?

Apex Azure Rbac fits situations like: : deploying (apex-azure-deploy); security audits (apex-azure-compliance).

How do I install Apex Azure Rbac in Claude Code?

Run `npx skills add jonathan-vella/apex --skill apex-azure-rbac -a claude-code`. Or copy the skill folder (.github/skills/apex-azure-rbac in jonathan-vella/apex) into .claude/skills/apex-azure-rbac in your project. Claude Code loads it when a task matches its description.

How do I install Apex Azure Rbac in Codex?

Run `npx skills add jonathan-vella/apex --skill apex-azure-rbac -a codex`. Or copy the skill folder (.github/skills/apex-azure-rbac in jonathan-vella/apex) into .agents/skills/apex-azure-rbac in your project. Codex loads it when a task matches its description.

Can I use Apex Azure Rbac in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jonathan-vella/apex --skill apex-azure-rbac -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apex-azure-rbac, .gemini/skills/apex-azure-rbac, .github/skills/apex-azure-rbac and .opencode/skills/apex-azure-rbac in your project.

What does Apex Azure Rbac need to run?

Going by SKILL.md and its folder, Apex Azure Rbac needs the command-line tools its instructions call (az).

Does Apex Azure Rbac access the network?

SKILL.md names 1 domain. As links in the text: registry.terraform.io. This is read from the text; nothing was executed.

Is Apex Azure Rbac safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apex Azure Rbac use?

Apex Azure Rbac is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apex Azure Rbac use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Apex Azure Rbac?

Skills that share tags, products or a category with Apex Azure Rbac: Azure Validate (microsoft/GitHub-Copilot-for-Azure, 255 stars), Azure Firmware Analysis (MicrosoftDocs/Agent-Skills, 776 stars), Azure Pricing Lookup (thomast1906/github-copilot-agent-skills, 202 stars) and Writing Bicep Templates (microsoft-foundry/foundry-agent-webapp, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apex Azure Rbac?

jonathan-vella (a GitHub user) maintains it in jonathan-vella/apex, which has 217 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 10, 2026.

Source: jonathan-vella/apex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.