agent-governance
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
Skill by muhammedadnank
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/muhammedadnank-agent-governance
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
agent-governance- Description
- Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)
- License
- MIT
- Instructions
- 558 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 558 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Agent Governance Patterns
Patterns for adding safety, trust, and policy enforcement to AI agent systems.
## Overview
Governance patterns ensure AI agents operate within defined boundaries — controlling which tools they can call, what content they can process, how much they can do, and maintaining accountability through audit trails.
```
User Request → Intent Classification → Policy Check → Tool Execution → Audit Log
↓ ↓ ↓
Threat Detection Allow/Deny Trust Update
```
## When to Use
- **Agents with tool access**: Any agent that calls external tools (APIs, databases, shell commands)
- **Multi-agent systems**: Agents delegating to other agents need trust boundaries
- **Production deployments**: Compliance, audit, and safety requirements
- **Sensitive operations**: Financial transactions, data access, infrastructure management
---
## Pattern 1: Governance Policy
Define what an agent is allowed to do as a composable, serializable policy object.
```python
from dataclasses import dataclass, field
from enum import Enum
from typing import Optional
import re
class PolicyAction(Enum):
ALLOW = "allow"
DENY = "deny"
REVIEW = "review" # flag for human review
@dataclass
class GovernancePolicy:
"""Declarative policy controlling agent behavior."""
name: str
allowed_tools: list[str] = field(default_factory=list) # allowlist
blocked_tools: list[str] = field(default_factory=list) # blocklist
blocked_patterns: list[str] = field(default_factory=list) # content filters
max_calls_per_request: int = 100 # rate limit
require_human_approval: list[str] = field(default_factory=list) # tools needing approval
def check_tool(self, tool_name: str) -> PolicyAction:
"""Check if a tool is allowed by this policy."""
if tool_name in self.blocked_tools:
return PolicyAction.DENY
if tool_name in self.require_human_approval:
return PolicyAction.REVIEW
if self.allowed_tools and tool_name not in self.allowed_tools:
return PolicyAction.DENY
return PolicyAction.ALLOW
def check_content(self, content: str) -> Optional[str]:
"""Check content against blocked patterns. Returns matched pattern or None."""
for pattern in self.blocked_patterns:
if re.search(pattern, content, re.IGNORECASE):
return pattern
return None
```
### Policy Composition
Combine multiple policies (e.g., org-wide + team + agent-specific):
```python
def compose_policies(*policies: GovernancePolicy) -> GovernancePolicy:
"""Merge policies with most-restrictive-wins semantics."""
combined = GovernancePolicy(name="composed")
for policy in policies:
combined.blocked_tools.extend(policy.blocked_tools)
combined.blocked_patterns.extend(policy.blocked_patterns)
combined.require_human_approval.extend(policy.require_human_approval)
combined.max_calls_per_request = min(
combined.max_calls_per_request,
policy.max_calls_per_request
)
if policy.allowed_tools:
if combined.allowed_tools:
combined.allowed_tools = [
t for t in combined.allowed_tools if t in policy.allowed_tools
]
else:
combined.allowed_tools = list(policy.allowed_tools)
return combined
# Usage: layer policies from broad to specific
org_policy = GovernancePolicy(
name="org-wide",
blocked_tools=["shell_exec", "delete_database"],
blocked_patterns=[r"(?i)(api[_-]?key|secret|password)\s*[:=]"],
max_calls_per_request=50
)
team_policy = GovernancePolicy(
name="data-team",
allowed_tools=["query_db", "read_file", "write_report"],
require_human_approval=["write_report"]
)
agent_policy = compose_policies(org_policy, team_policy)
```
### Policy as YAML
Store policies as configuration, not code:
```yaml
# governance-policy.yaml
name: agent-governance
allowed_tools:
- search_documents
- query_databaseFrom muhammedadnank/Antigravity-Skills, MIT.
More from muhammedadnank/Antigravity-Skills
- 0.551score
3-statement-model
muhammedadnank
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) .
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
agent-owasp-compliance
muhammedadnank
Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
agent-supply-chain
muhammedadnank
Verify supply chain integrity for AI agent plugins, tools, and dependencies.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
acreadiness-generate-instructions
muhammedadnank
Generate tailored AI agent instruction files via AgentRC instructions command.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
acreadiness-assess
muhammedadnank
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
acreadiness-policy
muhammedadnank
Help the user pick, write, or apply an AgentRC policy.
SkillCFreshness: C★ 13Claude Code +9 - 0.543score
aegisops-ai
muhammedadnank
Autonomous DevSecOps & FinOps Guardrails.
SkillCFreshness: C★ 13Claude Code +9 - 0.543score
accrual-schedule
muhammedadnank
Build the period-end accrual schedule — for each accrual, compute the entry, cite the support, and draft the JE.
SkillCFreshness: C★ 13Claude Code +9 - 0.543score
accessibility-auditing
muhammedadnank
Use Cursor's browser aria snapshots to audit a page for accessibility issues — missing labels, broken tab order, contrast, and ARIA misuse.
SkillCFreshness: C★ 13Claude Code +9 - 0.543score
adding-auth
muhammedadnank
Add authentication to a web application using NextAuth.js (Auth.js), including OAuth providers, session management, and protected routes.
SkillCFreshness: C★ 13Claude Code +9 - 0.543score
adding-api-docs
muhammedadnank
Generate OpenAPI/Swagger documentation for an API, including endpoint schemas, request/response types, and interactive docs UI.
SkillCFreshness: C★ 13Claude Code +9 - 0.543score
adding-feature-flags
muhammedadnank
Add feature flags to an application for gradual rollouts, A/B testing, and kill switches using PostHog, LaunchDarkly, or a simple local implementation.
SkillCFreshness: C★ 13Claude Code +9
Signals
- Stars
- 13
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jun 6, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.540score
agent-governance
LeoYeAI
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.374score
agent-governance
mouadja02
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillAFreshness: A★ 11Claude Code +9 - 0.309score
agent-governance
miyake-san
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillBFreshness: BClaude Code +9 - 0.309score
agent-governance
thimslugga
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillBFreshness: BClaude Code +9 - 0.306score
agent-governance
qveys
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillBFreshness: BClaude Code +9 - 0.306score
agent-governance
eryajf
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillBFreshness: BClaude Code +9 - 0.306score
agent-governance
qveys
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillBFreshness: BClaude Code +9 - 0.264score
agent-governance
Pr-E
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillDFreshness: D★ 3Claude Code +9 - 0.257score
agent-governance
jcasnellie69
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillDFreshness: D★ 2Claude Code +9 - 0.254score
agent-governance
jyjeanne
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillDFreshness: D★ 1Claude Code +9 - 0.251score
agent-governance
xurenlu
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillDFreshness: D★ 1Claude Code +9 - 0.237score
agent-governance
williamlimasilva
Patterns and techniques for adding governance, safety, and trust controls to AI agent systems.
SkillDFreshness: DClaude Code +9
More from muhammedadnank
- 0.551score
3-statement-model
muhammedadnank
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) .
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
acreadiness-generate-instructions
muhammedadnank
Generate tailored AI agent instruction files via AgentRC instructions command.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
acreadiness-policy
muhammedadnank
Help the user pick, write, or apply an AgentRC policy.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
acreadiness-assess
muhammedadnank
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
agent-owasp-compliance
muhammedadnank
Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks.
SkillCFreshness: C★ 13Claude Code +9 - 0.546score
agent-supply-chain
muhammedadnank
Verify supply chain integrity for AI agent plugins, tools, and dependencies.
SkillCFreshness: C★ 13Claude Code +9
Cite this page
agent-governance skill. Agent Mart. https://agentmart.dev/skills/muhammedadnank-agent-governance (last updated 2026-10-24)