/everything-copilot-cli:agent-governancefrom everything-copilot-cli
Adds policy-based access controls, intent classification, tool-level rate limiting, trust scoring, and append-only audit trails for AI agent systems. Use when designing or reviewing multi-agent workflows that need governance boundaries.
Ships in everything-copilot-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Add explicit policy, trust, and audit controls around agent behavior before "helpful" automation becomes unbounded automation.
| Instead of agent-governance | Use |
|---|---|
| Broad repository security scoring | evaluate-repository |
| OWASP ASI checklist review | agent-owasp-check |
| Architecture-first threat modeling | threat-model-analyst |
Think in this order:
User request -> intent classification -> policy check -> tool execution -> audit log
↓ ↓ ↓
threat signals allow/review/deny trust update
A useful governance layer usually needs five parts:
Start with a serializable policy instead of hardcoding checks across business logic.
Include:
allowed_toolsblocked_toolsblocked_patternsmax_calls_per_requestrequire_human_approvalprofiletool_policiesExample shape:
name: production-agent
allowed_tools:
- search_documents
- query_database
blocked_tools:
- shell_exec
- delete_record
blocked_patterns:
- "(?i)(api[_-]?key|secret|password)\\s*[:=]"
max_calls_per_request: 25
profile: balanced
require_human_approval:
- send_email
tool_policies:
shell_exec:
rate_limit: 3/hour
approval: required
justification: ticket-or-incident
query_database:
rate_limit: 30/request
approval: not-required
Use "most restrictive wins" when composing org-wide, team, and agent-specific policies.
Policy timing is part of enforcement: apply a skill's tool restriction when that skill is
activated, not merely when its declaration is discovered.
When a system supports a ToolPolicy schema, keep rate-limit, approval, and
justification guards in that policy layer instead of scattering them across
prompts, docs, and handler code.
If the policy file is missing, unreadable, or fails validation, fail closed: apply the strict profile and stop instead of falling through to a more permissive default.
Close policy paths where "nothing was checked" can be mistaken for "policy passed":
When your policy layer supports dynamic conditions, keep them declarative and reviewable instead of burying them in agent instructions.
Evaluate these conditions at the same enforcement boundary as your normal allow/deny/review checks. If the condition inputs are missing, stale, or unverifiable, fail closed instead of silently falling back to a permissive tier.
Do not wait until after a tool runs to discover the request was dangerous. Blocking a result prevents propagation; it does not undo an already executed side effect. Treat post-execution interception as observation, not rollback, and gate irreversible operations first. Reserve budget before evaluation, then charge actual usage after execution, so concurrency cannot cross a limit before accounting notices.
Look for signals such as:
Keep the classifier simple and auditable first:
Every tool call should answer:
Apply the checks at the boundary where the tool is actually invoked, not only in a planner or prompt template.
Treat external fetch results as an input boundary, not as pre-trusted working context.
Before using fetched content to guide tool calls, memory updates, or code changes, check for:
At minimum:
In strict mode, do not execute downstream actions from untrusted fetched content until this scan is complete.
Be careful with wildcard or glob-style permission rules in tool-approval systems such as
--allow-tool patterns. A rule that looks narrowly intended on paper can still auto-approve a
broader real scope than the author meant — for example, write(dir/**) may match deeply nested
writes well beyond the reviewer's mental boundary.
When reviewing permission rules:
Shell rules are a common case. In Copilot CLI, tools such as git, gh, and npm are matched by
the command plus its first subcommand only (copilot help permissions, CLI 1.0.114):
shell(gh pr) matches gh pr create --fill, while shell(gh pr create) matches nothing. A rule
written for one narrow action therefore either does nothing or, once widened to the form that
works, also approves its siblings — shell(gh pr) lets gh pr merge and gh pr close run without
a prompt. Deny rules are named the same way, so they cannot carve one sub-subcommand back out. When
only one such action is acceptable, leave it unapproved and answer the prompt each time, or run the
step outside the agent.
Denying one tool blocks that tool, not the outcome the tool produced. An agent that cannot use a file-writing tool may still reach the same result through a shell command, an MCP server, or a network fetch — and it may do so inconsistently, so a single passing test proves nothing.
Measured on GitHub Copilot CLI 1.0.87: with only --deny-tool=write, the same prompt created the
target file on one run and reported itself blocked on two others. Adding --deny-tool=shell and
--deny-tool=url alongside it blocked the file on every run.
When you deny a capability:
A command rule that matches only the first word is bypassed by wrapping. Before a shell command policy decides, normalize it to the command that will actually run:
| Form | Check |
|---|---|
sudo rm -rf …, doas … | the wrapped command (rm) — and treat the privilege escalation itself as high-risk |
xargs rm, find … -exec rm {} + | the command xargs or -exec will run |
FOO=1 rm …, env FOO=1 rm … | the command after the assignments |
bash -c "…", pwsh -Command "…" | the inner script, parsed again with the same rules |
| text with zero-width or other invisible Unicode characters | strip default-ignorable characters before matching |
If normalization fails or the command cannot be parsed, fail closed: deny or ask, never allow.
microsoft/agent-governance-toolkit fixed each of these bypasses in October 2026 (wrappers and
assignments 3b8bdfc, sudo/doas/xargs 86db460, invisible-character evasion e9ccebe), and Copilot CLI's Assisted
permissions likewise look inside nested bash -c and PowerShell commands so the permission judge
evaluates what will actually run (v1.0.100). Write preToolUse hooks to the same standard.
Policy at the tool boundary decides whether a write is allowed; it cannot tell a legitimate PR
from one an injected issue comment asked for. When an agent handles untrusted input, remove the
direct write path altogether: the agent emits its intended writes (PR, comment, label, release) as
data, a separate step inspects them, and only that step holds the write permission.
github/gh-aw builds this in by default — agent jobs run read-only, and writes run in validated
safe-outputs jobs with scoped permissions. Workflow authors can still grant direct write
permissions or add custom jobs, so audit those as separate trust boundaries. See
github-pr-workflow → Staged Writes
for the interactive version.
Multi-agent systems need memory of which delegates are reliable.
Track at least:
Use trust thresholds to choose between:
Trust should decay over time so stale reputation does not behave like permanent trust.
If remote identities, signed delegates, or service-issued agent credentials affect authorization, define the trust boundary before enabling autonomy:
Do not let planner, worker, verifier, and synthesizer roles silently share one flat trust zone when their permissions differ.
For every governed action, log:
allowed, denied, error, review)Export to JSONL or another append-only form that works with later incident review.
| Profile | Controls | Good fit |
|---|---|---|
| Advisory | Detect and warn on risky patterns, but do not block by default | internal experimentation or supervised migrations |
| Balanced | Auto-allow known low-risk tools, require review for new tools and risky writes/fetches | general production agents |
| Strict | Fail closed on policy errors, require fetched-content scanning before action, inspect shell output, and block unapproved high-risk actions | regulated, customer-facing, or high-trust environments |
If your organization already uses broader maturity labels such as open or locked, map them onto these profiles explicitly instead of assuming the names are equivalent.
As systems mature, separate the governance contract into a few explicit layers:
This keeps tool policy, identity, trust, and audit requirements reviewable instead of burying them in one prose blob.
| Rationalization | Reality |
|---|---|
| "We trust our agent because we wrote it." | Governance is about constraining runtime behavior, not trusting authorship. |
| "The model will probably avoid risky tools on its own." | Tool access without enforcement is a permission model with no guardrails. |
| "We log enough already." | Generic app logs rarely capture policy decisions, denials, or agent-to-agent trust changes. |
agent-owasp-check - audit an existing agent system against OWASP ASI risksthreat-model-analyst - model architecture and trust-boundary risksevaluate-repository - broader repository security and AI governance reviewWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub drvoss/everything-copilot-cli --plugin everything-copilot-cli115 skills in this plugin
/actions-debuggingUse when a GitHub Actions workflow fails — diagnose the run log, identify the root cause, and apply a targeted fix/add-to-changelogUse when you've shipped a feature, fix, or breaking change and need to update CHANGELOG.md — follows Keep a Changelog format and syncs version numbers across package manifests./agentic-engineeringUse when designing or decomposing a task for agent execution — applies 15-minute task units, eval-first loops, and explicit input/output contracts so agents work reliably without implicit stateOther plugins' skills for the same job