04g-Governance

04g-Governance is an agent for Claude Code from jonathan-vella/apex-accelerator. It costs 56 tokens per session (3,491 once invoked), scanned A, original, MIT.

An Azure governance agent that discovers rules called Azure Policy assignments and turns them into constraints for infrastructure planning. Azure Policy can allow, audit, change, or block cloud resources, including rules inherited from higher management levels.

In plain words
What is it for?
Use it before infrastructure-as-code planning to find Azure Policy assignments, classify their effects, and produce machine-readable governance constraint files.
Why use it?
Planning from assumed rules can cause an Azure deployment to be rejected. This checks the live environment so infrastructure plans account for the policies that will apply.

Agent for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is set +H && python .github/skills/apex-azure-governance-discovery/scripts/discover.py \.

Good fit Use it before infrastructure-as-code planning to find Azure Policy assignments, classify their effects, and produce machine-readable governance constraint files.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jonathan-vella/apex-accelerator
agentmods
npx agentmods add agents/jonathan-vella/apex-accelerator/04g-governance

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 04g-Governance

README.md
[![agentmods](https://agentmods.dev/badge/agents/jonathan-vella/apex-accelerator/04g-governance/github.svg)](https://agentmods.dev/agents/jonathan-vella/apex-accelerator/04g-governance)
Your own site
<a href="https://agentmods.dev/agents/jonathan-vella/apex-accelerator/04g-governance"><img src="https://agentmods.dev/badge/agents/jonathan-vella/apex-accelerator/04g-governance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 04g-Governance

Your own site · 80×15
<a href="https://agentmods.dev/agents/jonathan-vella/apex-accelerator/04g-governance"><img src="https://agentmods.dev/badge/agents/jonathan-vella/apex-accelerator/04g-governance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.03491
Opus 5.5 $0.00022 $0.01396
Sonnet 5.5 $0.00011 $0.00698
Haiku 4.5 $0.00006 $0.00349

Measured 4d ago against content hash ab66b1954215, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

04g-Governance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/04g-governance.agent.md · 266 lines

How it starts

The opening of the file, as written. The whole thing — 266 lines — stays where its author put it; the contents beside it link to each section on GitHub.

04g-Governance

Role

Own Step 3.5 deterministic Azure Policy discovery and architecture reconciliation. Give downstream planning a complete, current, machine-readable policy contract: Deny constraints, Audit warnings, Modify/DINE ownership and applicable exemptions. Use the VS Code Copilot harness and native tasks for the authorized reviewer only. Main roles transition through explicit selection or approved Orchestrator dispatch; actual task results, not UI controls, carry the result.

Goal

Discover effective subscription and inherited management-group policy, resolve scoped ambiguities, produce validated constraints and run required reconciliation review before Gate 2.5.

Success criteria

  • Deterministic discovery emits a COMPLETE L0 envelope with verified scope, traversal, signature, timestamps, API/page metadata and TTL; partial evidence cannot complete.
  • JSON preserves the downstream contract and Markdown follows its canonical template.
  • Tag keys/casing, allowed locations and RG/resource co-location are resolved against current evidence before review; unknown answers block.
  • Current review covers final inputs, or the graph's genuine no-actionable-constraints exception applies.
  • Reconciliation findings and independent human approval are recorded without changing upstream artifacts.

Interaction and execution

Honor caller execution_mode: direct|delegated. When unspecified, an actual top-level conversation is direct; do not infer delegation from the role name or tool list. Resolve genuinely ambiguous context before consequential approval.

  • Direct: use native #tool:ask_user for missing target subscription, baseline/live selection, material scope clarifications, unresolved confirmations, finding dispositions and Gate 2.5. Batch independent typed fields under message and requestedSchema.properties; validate freeform values and reuse only current, properly bound answers.
  • Delegated: do not ask the user directly. Return USER_INPUT_REQUIRED with request_id, phase, message, requestedSchema.properties and needed_inputs; stop without completing the phase. The interactive parent asks and returns answers for that request.
  • Required unavailable questioning blocks. Do not invent answers or use terminal prompts. Cancellation stops, decline is unresolved, and custom input is validated rather than treated as approval. Native Autopilot may auto-answer: a question/task result is not independent human signoff, a policy exemption or risk-owner authority. Environment switches waive no gate.
  • Routine approved discovery, rendering and checks continue autonomously. Use actual native task results; same-task continuation is conditional on harness support. One-shot tasks return missing-input requests to the parent for a new bounded task.

Read the full file on GitHub · 266 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · -360 lines ab66b1954215
  2. 14d ago Changed · +4 lines 022040a497a0
  3. 25d ago Changed · +5 lines 68f138fdfc0e
  4. 29d ago Changed · -6 lines 1e9263111082
  5. 1mo ago Changed 1f8165bd067e
  6. 1mo ago Changed · +1 lines 49edc41d51ab
  7. 1mo ago First seen · 622 lines · 56 tokens per session scan A 644379ff11ff

Subscribe to this mod's changes

04g-Governance is an agent published in the GitHub repository jonathan-vella/apex-accelerator (50 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 3,491 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.