audit-guard

audit-guard is a skill for Claude Code, Codex from Xwen0857/agent-orchestrator. It costs 50 tokens per session (1,517 once invoked), scanned A, original, MIT.

A safety and approval gateway for assessing risky agent operations, blocking dangerous actions, and recording decisions in audit logs.

In plain words
What is it for?
Use it before actions such as changing production data, altering permissions, exposing services, force-pushing Git history, or performing destructive file operations.
Why use it?
It prevents high-risk changes from running without the required approval and preserves evidence of what was requested and decided.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before actions such as changing production data, altering permissions, exposing services, force-pushing Git history, or performing destructive file operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xwen0857/agent-orchestrator/audit-guard
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Xwen0857/agent-orchestrator --skill audit-guard
Clone the repo
git clone --depth 1 https://github.com/Xwen0857/agent-orchestrator

Made for: Claude Code, Codex.

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 audit-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/xwen0857/agent-orchestrator/audit-guard/github.svg)](https://agentmods.dev/skills/xwen0857/agent-orchestrator/audit-guard)
Your own site
<a href="https://agentmods.dev/skills/xwen0857/agent-orchestrator/audit-guard"><img src="https://agentmods.dev/badge/skills/xwen0857/agent-orchestrator/audit-guard/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 audit-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/xwen0857/agent-orchestrator/audit-guard"><img src="https://agentmods.dev/badge/skills/xwen0857/agent-orchestrator/audit-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,517 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.00050 $0.01517
Opus 5 $0.00025 $0.00758
Sonnet 5 $0.00010 $0.00303
Haiku 4.5 $0.00005 $0.00152

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

Security

Grade A, and why

audit-guard 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 10d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/create_approval_ticket.sh, scripts/evaluate_gate.sh, scripts/grant_approval.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

audit-guard/SKILL.md · 110 lines

How it starts

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

Audit Guard

V2 基线(强制优先)

  1. 命中需审批规则时,统一将任务状态写为 BLOCKED_PENDING_APPROVAL(替代旧名 BLOCKED_PENDING_MASTER_APPROVAL)。
  2. gate 决策必须同时写入:
  • templates/coordination/tasks/task_folders/<task_id>/audit.md
  • templates/coordination/tasks/task_folders/<task_id>/log.ndjson
  1. 放行条件是 templates/coordination/tasks/task_folders/<task_id>/approval.json 存在且有效;未满足前不得恢复执行。
  2. 审计日志字段以 agent-orchestrator/references/event-log-schema.mdaudit-guard/references/audit-log-schema.md 的交集为最低要求,必须包含哈希链字段。

何时使用

  • planner 将要执行可能高风险的操作。
  • 需要对操作进行风险分级、冻结审批、审计留痕。
  • 需要紧急越权(break-glass)并保留完整证据。

输入

  • operation_request:拟执行动作、参数、目标对象、执行人、来源任务。
  • runtime_context:当前系统状态、近 1h 行为统计、token/cost、并发负载。
  • policy_config:风险规则、审批策略、SLA、越权开关。

输出

  • gate_decisionALLOW | MONITOR | BLOCK | BLOCK_PENDING_APPROVAL.
  • risk_assessment:风险等级、命中规则、影响面、预演结果。
  • approval_ticket(若需):提交 master 的审批单。
  • audit_log_entry:不可篡改日志记录。

风险分级

Tier 1: CRITICAL (必须人工审批)

  • 系统级破坏或不可逆影响(例如:sudo、生产数据库结构/数据直接变更)。
  • 安全边界变更(权限边界、白名单、密钥暴露)。
  • 代码库强制历史覆盖(例如:git push --force)。
  • 网络暴露高风险行为(公网暴露本地服务)。

默认动作:BLOCK_PENDING_APPROVAL

Tier 2: HIGH (策略驱动审批)

  • 破坏性文件操作(例如:rm)。
  • 大范围状态回滚(例如:git reset --hard)。
  • 明显的成本放大(并发或资源规格骤增)。
  • 未知模块调用、未知 Bash 指令执行。
  • 可疑注入模式命中。

默认动作:BLOCK_PENDING_APPROVAL;仅在明确白名单策略下可降为 MONITOR

Tier 3: MONITORED (记录 + 阈值告警)

  • 短时高频 API 调用。
  • 配置参数批量变更。
  • 测试标准放宽。

默认动作:MONITOR;超过阈值升级为 Tier 2。

动态行为分析规则

  1. 频率异常:同类高风险动作在 window_minutes 内超过阈值。
  2. 序列异常:出现高危链路(如“放宽测试 -> 提高并发 -> 强制回滚”)。
  3. 基线偏移:当前 token/cost 或失败率显著偏离近 24h 基线。
  4. 上下文冲突:动作意图与任务目标不一致(例如文档任务触发数据库变更)。

门禁工作流

  1. 检测与评估:匹配静态规则 + 动态行为分析。
  2. 冻结与打包:命中 Tier 1/2 时冻结动作,生成决策上下文包。
  3. 状态变更:BLOCKED_PENDING_MASTER_APPROVAL
  4. 通知 master:提交审批单。
  5. 执行决策:
  • 批准:发放一次性许可并放行。
  • 拒绝:终止动作,保留冻结记录。
  1. 全程记录:写入 append-only 审计日志。

审批 SLA 与超时

  • approval_sla_minutes 默认 30。
  • 超时策略默认 DENY_AND_KEEP_FROZEN
  • 超时后必须发送升级告警并等待 master 明确处置。

紧急越权 (Break-Glass)

  • 仅用于无法及时审批且业务必须继续的极端场景。
  • 触发前必须生成系统快照并记录触发原因。
  • 每 4 小时最多 1 次。
  • 需要至少 2 名管理员授权(或全管理员一致)。
  • 放行范围仅限指定操作与时效窗口。
  • 使用本身视为严重安全事件并强制告警。

Read the full file on GitHub · 110 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. 10d ago First seen · 110 lines · 50 tokens per session scan A 7ddf2b104bff

Subscribe to this mod's changes

audit-guard is a skill published in the GitHub repository Xwen0857/agent-orchestrator (2 stars, last pushed 5mo ago), licensed MIT. It adds 50 tokens to every session and 1,517 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

decision-matrix

Compare options with weighted scoring, pros and cons, pre-mortems, opportunity costs, and ICE prioritization. Use when a user wants to reason through a choice, expose assumptions, or rank alternatives.

iflytek/skillhub · 45 tokens

meeting-note-summarizer

Turn meeting notes or transcripts into factual summaries, decisions, questions, and action items. Use when a user wants a concise recap or needs explicit owners and deadlines extracted without filling in missing details.

iflytek/skillhub · 44 tokens

daily-standup-journal

Generate concise daily standups, reflection prompts, and weekly retrospectives for individuals or teams. Use for planning a day, surfacing blockers, reviewing user-provided entries, or drafting a check-in without assuming prior history.

iflytek/skillhub · 51 tokens

skillhub-cli

Connect an Agent to a SkillHub registry and use the official SkillHub CLI to search, install, list, or explicitly upgrade SkillHub skills. Use when a user asks to connect SkillHub, install a SkillHub skill, or manage skills previously installed from SkillHub.

iflytek/skillhub · 58 tokens

anysearch

Real-time search engine supporting web search, vertical domain search, parallel batch search, and URL content extraction.

anysearch-ai/anysearch-skill · 24 tokens

dev-workflow

The complete development workflow for SkillHub contributors including local dev, staging validation, testing, and PR creation. Ensures agents follow the correct sequence of steps.

iflytek/skillhub · 35 tokens