PlugWiki

agent-governance Skill for Claude: Safety and Policy Patterns for AI Agents

Gives Claude patterns for adding policy checks, trust scores and audit trails to AI agents that call tools, with Python examples.

Installs
9.6K
on skills.sh
Stars
40.7K
on GitHub
Updated
Oct 2026
last repo commit

SKILL.md teaches 6 patterns: a governance policy, intent classification, a tool-level decorator, trust scoring, an audit trail and framework integration. Each comes with Python code, and the framework examples cover PydanticAI, CrewAI and the OpenAI Agents SDK.

It is one file with no scripts. It is a reference for code you write, not a tool that governs Claude itself. The file points to Microsoft's agent-governance-toolkit as a full framework.

Good for

  • Developers building agents that call external tools such as APIs, databases or file systems
  • Teams adding access policies, audit trails or human approval to agents in production
  • People building multi-agent systems that need trust boundaries

Install agent-governance

Claude Code

  1. 1

    Copy this prompt.

    Install the agent-governance skill in Claude Code. Run this command:
    
    npx skills add https://github.com/github/awesome-copilot --skill agent-governance
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

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)

Sections in SKILL.md

  1. Overview
  2. When to Use
  3. Pattern 1: Governance Policy
  4. Policy Composition
  5. Policy as YAML
  6. Pattern 2: Semantic Intent Classification
  7. Pattern 3: Tool-Level Governance Decorator
  8. Pattern 4: Trust Scoring
  9. Pattern 5: Audit Trail
  10. Pattern 6: Framework Integration
  11. PydanticAI
  12. CrewAI
  13. OpenAI Agents SDK
  14. Governance Levels
  15. Best Practices
  16. Quick Start Checklist

Key facts

Installs on skills.sh
9,649 (Nov 2, 2026)
License
MIT
Last repo commit
Oct 30, 2026

What it includes

  • A policy object with allowed tools, blocked tools, blocked patterns and rate limits.

    Policies compose with most-restrictive-wins, and can be stored as YAML instead of code.

    Pattern 1: Governance Policy

  • Screens prompts for dangerous intent with pattern-based signals before tools run.

    The example checks for data exfiltration, privilege escalation, system destruction and prompt injection with regular expressions.

    Pattern 2: Semantic Intent Classification

  • Wraps a tool function with policy, rate limit and content checks.

    It denies blocked tools, raises on tools that need human approval, and records allowed and failed calls.

    Pattern 3: Tool-Level Governance Decorator

  • Scores an agent's reliability over time, with decay when it is inactive.

    Includes a registry so a multi-agent system can track a score for each delegate.

    Pattern 4: Trust Scoring

  • An append-only log of agent actions with JSON Lines export.

    The example export_jsonl method writes the log to a file path you give it.

    Write · Pattern 5: Audit Trail

  • Examples for PydanticAI, CrewAI and the OpenAI Agents SDK.

    The description also lists LangChain and AutoGen as frameworks it applies to.

    Pattern 6: Framework Integration

  • Four levels: Open, Standard, Strict, Locked.

    Each pairs a set of controls with a use case, from internal testing to compliance-critical systems.

    Governance Levels

  • 7 practices and a 12-item checklist in 3 groups.

    The groups are Setup, Implementation and Validation.

    Best Practices and checklist

From the official docs

Permissions

Low risk

The skill is reference code and bundles no scripts. Code that Claude writes from it can write audit logs to files, so read it before running.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Example code writes files and names destructive commands

    The audit trail example writes a JSON Lines file. The intent filter lists rm -rf, DROP DATABASE and similar strings as patterns to block, not to run. Read code Claude generates from them before you run it.

Technical details
Scopes
  • Example code that writes an audit log to a file path

  • Example regexes that name destructive commands as blocked patterns

Questions

What does agent-governance do?

It gives Claude a set of patterns for controlling what an AI agent can do: which tools it may call, what content it may handle, how often, and how its actions are logged.

Does it put safety rules on Claude itself?

It is written as patterns for agent systems you build, with Python examples. SKILL.md describes adding governance to your agent code.

How do I install agent-governance?

Use the install box above. The skills CLI command works for Claude Code and Codex, and the Claude tab shows the ZIP upload for the Claude app.

Does it need an API key or a package?

SKILL.md names no key and the folder bundles no scripts. The code examples import Python libraries such as pydantic_ai, crewai and yaml, which you would install in your own project.

Is it safe to use?

It is code examples in one file with no scripts. The examples include a regex blocklist that names commands such as rm -rf and DROP DATABASE as patterns to catch, and a method that writes an audit log to a file. Review any code Claude writes from them before you run it.

How is it different from Microsoft's agent-governance-toolkit?

SKILL.md lists Microsoft's agent-governance-toolkit under Related Resources as a full governance framework. This skill is a short set of patterns with example code, not a library.

Information

updated Nov 2, 2026

Folder
skills/agent-governance

github/awesome-copilotskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 2
  1. agent-governance SKILL.md · github.com
  2. awesome-copilot README · github.com

Updated Nov 2, 2026.