Skip to content

Agent Governance Patterns

Adds policy checks, threat screening, trust scoring and audit logging to AI agent code.

Stars
40,703
Licence
MIT
Files
1 file

What it does

When installed, this gives an AI agent guidance and ready-made code patterns for keeping its own actions within set limits. It explains how to define policies that allow or block specific tools, filter content with patterns, cap the number of tool calls, and require human approval for sensitive actions. It also shows how to scan prompts for dangerous signals such as data exfiltration, privilege escalation or prompt injection, and how to keep audit trails. It is aimed at engineers building agent systems rather than end users.

Great for

  • Developers building AI agents that call APIs, databases or file systems
  • Teams adding access controls, approval steps or audit logging to production agents
  • Engineers designing trust boundaries for multi-agent workflows

Skip it if

  • Non-developers looking for a ready-made safety product: it provides patterns and sample code, not a tested security system, and the regex-based threat detection is easy to bypass
  • Projects needing certified compliance (such as SOC 2 or HIPAA): the file offers no compliance guarantees or verification

Try asking

  • “Add a policy that blocks shell_exec and requires human approval before send_email in my agent”
  • “Show me how to compose org-wide and team-level governance policies for my agent”
  • “Write an audit trail for every tool call my LangChain agent makes”
  • “Add a prompt injection check to screen user input before it reaches my CrewAI agent”
Step-by-step guide: how to use Agent Governance PatternsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    agent-governance.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip agent-governance.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip agent-governance.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Treat the regex threat signals as a first filter only; combine them with real policy enforcement and human review.
  • Review the sample policies and blocked patterns against your own tools before relying on them.
  • Ask the agent to adapt the patterns to your specific framework and tool names.

What's inside

  • SKILL.md

Redistributed unmodified from github/awesome-copilot under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.