azure-policy-governance
Skill633 starsChanged 3 months agoMITView on GitHub
Use when the user wants to enforce cost governance with Azure Policy — require or inherit tags, restrict regions/SKUs/resource types, audit untagged resources, or generate Bicep/ARM policy assignments. Pairs with the finops-multitool policy scans to close governance gaps.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- src/templates/finops-hub-copilot/copilot-instructions.mdCopilot instructions
- microsoft-writing-style-guideSkill
- support-reportSkill
- support-sweepSkill
- finops-toolkitSkill
- anomaly-investigationSkill
- azure-workbooks-finopsSkill
- cost-allocationSkill
- cost-data-sourceSkill
- finops-multitoolSkill
- finops-reportingSkill
- focus-data-qualitySkill
- forecasting-budgetingSkill
- power-bi-finopsSkill
- rate-optimization-portfolioSkill
- sustainability-carbonSkill
- unit-economicsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
When asked for Bicep:
- Very specific: line 55
Use the Bicep MCP tools to validate the Microsoft.Authorization/policyAssignments schema and run diagnostics before presenting the file.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Azure Policy for cost governance
Enforce the guardrails that make FinOps allocation and waste-control durable: tag requirements, tag inheritance, region/SKU restrictions, and audit policies. This skill turns governance gaps into deployable policy for the user to review and apply. Don't assign policy or start remediation yourself; the FinOps skills are read-only.
When to use this skill
Use it when the user wants to enforce or audit tagging, restrict what can be deployed, or asks for "a policy" to back up a FinOps recommendation. Run policy inventory and policy recommendations from the finops-multitool skill first to see what's already assigned and where the gaps are, then generate policy here.
Workflow
- Inventory — policy inventory (existing assignments, scopes, effects, compliance).
- Gap analysis — policy recommendations (missing tagging/region/SKU guardrails).
- Verify definition IDs — built-in policy IDs change rarely but must be confirmed. Use the Microsoft Learn MCP / docs before emitting any ID into a template. Do not ship an ID from memory.
- Generate — produce Bicep or ARM for the assignment(s), parameterized and scoped.
- Stage effects — recommend that the user deploy
Audit/AuditIfNotExistsfirst, review compliance, then move toDeny/Modify. Never lead withDenyon an existing environment.
Core cost-governance policies
| Goal | Built-in policy (verify ID before use) | Effect |
| Require a tag on resource groups | "Require a tag on resource groups" | Deny |
| Require a tag on resources | "Require a tag on resources" | Deny |
| Inherit a tag from the resource group | "Inherit a tag from the resource group" | Modify |
| Audit missing tag | "Require a tag and its value on resources" (audit variant) | Audit |
| Allowed locations | "Allowed locations" | Deny |
| Allowed resource types | "Allowed resource types" | Deny |
| Allowed VM SKUs | "Allowed virtual machine size SKUs" | Deny |
Modify and DeployIfNotExists policies require a managed identity on the assignment with rights to remediate. Tell the user to create a remediation task after they assign the policy, so existing resources are brought into compliance, not just new ones.
Effect sequencing (safe rollout)
Audit → review compliance → Modify/Append (auto-fix) → remediate existing → Deny (block new violations)Apply the same tag key across all three layers (require on RG, inherit to resources, deny new untagged) so the allocation model from the cost-allocation skill is enforced end to end.
Generating templates
When asked for Bicep:
- Parameterize the tag name, allowed values/locations/SKUs, scope, and effect.
- Set
enforcementModetoDoNotEnforcefor a dry run when the user wants to preview impact. - Use the Bicep MCP tools to validate the
Microsoft.Authorization/policyAssignmentsschema and run diagnostics before presenting the file. - Output one assignment per concern; don't bundle unrelated guardrails into a single assignment.
Hand-offs
- Decide which tags to enforce →
cost-allocationskill. - See current gaps →
finops-multitoolpolicy scans. - Report compliance trend visually →
power-bi-finops(governance report) orazure-workbooks-finops.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

