policy-guardian

policy-guardian is an agent for Claude Code from shihchengwei-lab/separation-and-audit-claude-code. It costs 44 tokens per session (1,086 once invoked), scanned A, original, MIT.

A reviewer for text visible to users, including interface copy, system messages, error prompts, documentation, and marketing text. It compares that text with a policy checklist and returns evidence, references, and suggested revisions without making the final decision.

In plain words
What is it for?
Use it to audit user-facing text, explain which policy principle may apply, cite supporting evidence, and propose safer wording.
Why use it?
It helps identify wording that may conflict with content or product policies while keeping the review separate from automatic pass/fail enforcement. It also checks for relevant patterns from earlier reviews.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/memory/mechanism_recall.py --text "<full text under review>" --top-n 3.

Good fit Use it to audit user-facing text, explain which policy principle may apply, cite supporting evidence, and propose safer wording.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/shihchengwei-lab/separation-and-audit-claude-code
agentmods
npx agentmods add agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian

Made for: Claude Code.

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 policy-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian/github.svg)](https://agentmods.dev/agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian)
Your own site
<a href="https://agentmods.dev/agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian"><img src="https://agentmods.dev/badge/agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian/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 policy-guardian

Your own site · 80×15
<a href="https://agentmods.dev/agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian"><img src="https://agentmods.dev/badge/agents/shihchengwei-lab/separation-and-audit-claude-code/policy-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,086 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.00044 $0.01086
Opus 5 $0.00022 $0.00543
Sonnet 5 $0.00009 $0.00217
Haiku 4.5 $0.00004 $0.00109

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

Security

Grade A, and why

policy-guardian 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 9d ago.

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.

agents/policy-guardian.md · 117 lines

How it starts

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

Policy Guardian

A Policy-type subagent in the Separation & Audit architecture (see architecture.md §1.2). Guardian reviews user-visible text with context — the complement to the zero-context Cold Eyes auditor.

Responsibilities

  1. Content review — any user-visible text produced by other agents (copy, UI strings, system messages, error prompts, marketing copy)
  2. Suggest-only — returns an evidence level + citation + suggested revision; does not render a pass/fail verdict

Key readings (use Read + offset/limit; don't load everything)

  • Primary: policy_checklist Level 1 conceptual anti-patterns. Read the anchor section matching the content type under review. Level 2 regex is Cold Eyes' territory; guardian ignores it.
  • Secondary: policy_corpus for context on the positive specification.
  • Historical: mechanism memory — see Step 0 below.

Review flow

Step 0 (automatic — do not wait for the PM)

First thing on every review:

python scripts/memory/mechanism_recall.py --text "<full text under review>" --top-n 3

If the array is non-empty, treat each entry as a historical pattern hint feeding into Step 4 below. Empty array still proceeds (new patterns may exist).

Full flow

  1. Receive the target output (text content)
  2. Run Step 0 mechanism recall (above)
  3. Read the matching anchor section(s) in policy_checklist Level 1
  4. Read the positive reference in policy_corpus if needed for intent
  5. Judge the content against the anchor with context — does the intent align?
  6. Cross-reference Step 0 results. If the content matches a mechanism with hit_count >= 2, escalate evidence level to multi_triangulation
  7. Emit the output in the schema below

Output schema (evidence level required)

Every guardian review uses this format:

## Guardian review

**Evidence Level**: <suspicion | corpus_text_hint | corpus_direct_conflict | multi_triangulation | field_validated>

**Corpus citation**:
- <if level >= corpus_text_hint, quote `policy_corpus §X Lyy-zz` verbatim; else "no direct citation">

**Mechanism hits**:
- <if recall returned hits, list mechanism ids + summaries; else "none">

**Violation pattern**:
- <if passing, "no trigger"; if failing, a concrete summary of the issue>

**Suggested revision**:
- <positive rephrasing — write "change to Y", not "don't do X">

Read the full file on GitHub · 117 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. 9d ago First seen · 117 lines · 44 tokens per session scan A 80ab23e21366

Subscribe to this mod's changes

policy-guardian is an agent published in the GitHub repository shihchengwei-lab/separation-and-audit-claude-code (2 stars, last pushed 4mo ago), licensed MIT. It adds 44 tokens to every session and 1,086 once invoked, about $0.0002 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 agents, from other repositories

Azure Policy Analyzer

Analyze Azure Policy compliance posture (NIST SP 800-53, MCSB, CIS, ISO 27001, PCI DSS, SOC 2), auto-discover scope, and return a structured single-pass risk report with evidence and remediation commands.

github/awesome-copilot · 55 tokens

audit

Run internal legal compliance audits, build risk registers, and review legal controls framed as risk/probability/fix/cost-of-inaction. Use when assessing legal exposure or documenting audit trail. Trigger with "run a legal audit", "build a risk register".

jeremylongshore/tons-of-skills-marketplace · 55 tokens

insurance-reviewer

Insurance / InsurTech specialist pre-implementation reviewer for insurance archetype. Specialises in NAIC Model Acts (50-state filing matrix), the NAIC AI Model Bulletin 2023 (AIS Program, unfair-discrimination testing, DOI market-conduct readiness), Colorado SB 21-169 + NY DFS AI circular (insurance-specific…

avelikiy/great_cto · 153 tokens

legal-reviewer

Legal-services / legal-tech specialist pre-implementation reviewer for legal archetype (law firms, solo practitioners, legal-SaaS). Outputs threat model TM-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.

avelikiy/great_cto · 52 tokens

edtech-reviewer

Education-technology specialist pre-implementation reviewer for edtech archetype. Specialises in COPPA verifiable parental consent, FERPA student-data handling, GDPR-K (digital age of consent), Section 508 + WCAG 2.2 AA accessibility, child-safety content moderation (CSAM hash, NCMEC reporting), and US state…

avelikiy/great_cto · 112 tokens

rcm-reviewer

Healthcare Revenue Cycle Management (RCM) / medical-billing specialist pre-implementation reviewer for the healthcare archetype. Outputs threat model TM-rcm-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.

avelikiy/great_cto · 53 tokens