Borrowing it
Nothing to install: this file belongs to xinxin7/claw-shield. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/xinxin7/claw-shield/main/AGENTS.mdgit clone --depth 1 https://github.com/xinxin7/claw-shieldWrote 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.
[](https://agentmods.dev/instructions/xinxin7/claw-shield/agents-md)<a href="https://agentmods.dev/instructions/xinxin7/claw-shield/agents-md"><img src="https://agentmods.dev/badge/instructions/xinxin7/claw-shield/agents-md/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.
<a href="https://agentmods.dev/instructions/xinxin7/claw-shield/agents-md"><img src="https://agentmods.dev/badge/instructions/xinxin7/claw-shield/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02046 | $0.02046 |
| Opus 5.5 | $0.00818 | $0.00818 |
| Sonnet 5.5 | $0.00409 | $0.00409 |
| Haiku 4.5 | $0.00205 | $0.00205 |
Grade C, and why
claw-shield AGENTS.md scanned grade C with 2 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 1mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- Test Judge: ask the agent to perform a sensitive operation (e.g., `rm -rf`, `DROP TABLE`). The dashboard should show a Judge verdict card (green = ALLOW, red = DENY) alongside the tool call Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Client status: `curl http://127.0.0.1:18789/api/plugins/claw-shield/status` How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — For AI Agents Working on This Codebase
This file is written for you, the AI agent. It describes the Claw Shield project structure, conventions, and how to make effective changes.
What Is Claw Shield
Claw Shield is an AI agent governance infrastructure. It sits between agents and model providers, providing:
- Privacy routing via OHTTP (Oblivious HTTP) relay-gateway architecture
- Real-time telemetry — captures chain-of-thought reasoning, tool call decisions, and execution results
- Model-as-a-Judge — automated audit of high-risk tool calls via a second model, with allow/deny verdicts
- A hosted dashboard for visualizing agent behavior as a reasoning-to-action waterfall, including Judge audit results
Architecture (Three Components)
client/ — OpenClaw Plugin (TypeScript)
- Entry point:
client/index.ts→ registersClawShieldPlugin - Core logic:
client/src/ohttp-shield.plugin.ts - Intercepts outbound model requests, wraps in OHTTP, injects
x-claw-shield-project-idandx-claw-shield-session-idheaders - Session ID rotates on new user prompts; persists across tool-result continuations within one agent turn
- Project ID is auto-generated UUID, persisted at
~/.openclaw/plugins/claw-shield/.project-id - Dependencies:
bhttp-js,ohttp-js
relay/ — Cloudflare Worker (JavaScript)
- Simple pass-through relay (
relay/index.js) - Sees the client's IP but never decrypts the OHTTP payload
- Deployed via
wrangler deployfromrelay/
gateway/ — Cloudflare Worker (Rust/WASM)
- Entry:
gateway/src/lib.rs— OHTTP decryption, request routing, Judge integration, telemetry orchestration - Telemetry:
gateway/src/telemetry.rs— SSE parsing for OpenAI/Anthropic/Gemini, CoT extraction, tool call logging, sensitivity detection, D1 storage - Judge:
gateway/src/judge.rs— Model-as-a-Judge logic:should_invoke_judge(),invoke_judge(),build_intervention_response(), provider-specific API calls - Skills:
gateway/src/skills/judge_audit.md— the Judge's system prompt (evaluation criteria), loaded viainclude_str!("skills/judge_audit.md") - Dashboard:
gateway/src/dashboard.html— single-page app embedded viainclude_str!(), served at/dashboard - D1 database
TELEMETRY_DBstores trace records in atracestable indexed by(project_id, timestamp_ms), withjudge_verdict(JSON) andjudge_action(TEXT) columns for Judge audit results - Migrations live in
gateway/migrations/— apply withnpx wrangler d1 migrations apply claw-shield-telemetry --remote - KV namespace
WAITLISTis used only for the waitlist feature (low-volume, read-heavy) - API endpoints:
GET /api/traces?project=X,GET /api/summary?project=X(summary includesjudge_triggered,judge_allowed,judge_denied) - Built with
worker-build --release, deployed viawrangler deployfromgateway/
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.
- 1mo ago First seen · 131 lines · 2,046 tokens per session scan C f1a6e52c1ed0
claw-shield AGENTS.md is an instructions file published in the GitHub repository xinxin7/claw-shield (25 stars, last pushed 7mo ago), licensed MIT. It adds 2,046 tokens to every session, about $0.0082 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.