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.
npx agentmods add instructions/chris-peterson/claudewatch/agents-mdgit clone --depth 1 https://github.com/chris-peterson/ClaudeWatchWrote 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/chris-peterson/claudewatch/agents-md)<a href="https://agentmods.dev/instructions/chris-peterson/claudewatch/agents-md"><img src="https://agentmods.dev/badge/instructions/chris-peterson/claudewatch/agents-md.svg" alt="Measured on agentmods" 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 | $0.02800 | $0.02800 |
| Opus 5 | $0.01400 | $0.01400 |
| Sonnet 5 | $0.00560 | $0.00560 |
| Haiku 4.5 | $0.00280 | $0.00280 |
Grade E, and why
ClaudeWatch AGENTS.md scanned grade E 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 5d 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
`~/.aws/credentials`). These are user-home patterns, not platform-specific Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
`except` to skip prompts on demonstrably-safe variants (`rm -rf /tmp/...`), How it starts
The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — Working on ClaudeWatch
This is the build philosophy and key constraints document for ClaudeWatch.
The contract lives in SPEC.md; this document captures the how to
think about it. Every Claude Code session should read this before making
non-trivial changes.
What ClaudeWatch is
A Claude Code plugin that wraps every shell invocation — Bash and Monitor,
which runs its command in the same shell — in a PreToolUse hook and applies
regex-based safety rules. The core safety advantage over Claude
Code's built-in deny rules is that patterns match anywhere in the command
string (re.search()), so compound commands (git add . && git push --force),
heredocs, and reordered flags are not bypassable by syntactic tricks.
Core contracts (don't break these)
- Determinism. Given the same command, the same
cwdand project root, the samewatches/tree, and the same on-disk state of the paths those name, the engine must always produce the same decision. No clocks, no randomness, no network on the decision path.cwdandCLAUDE_PROJECT_DIRenter the decision only as the deterministic per-invocation inputs theis_in_project_treepredicate ([RL-15], [RL-16]) resolvesrmtargets against — pure string work, no filesystem access.CLAUDE_PROJECT_DIRis the one environment variable on the decision path;CLAUDEWATCH_LOGgoverns a side channel only. The one predicate that does read the filesystem isis_recoverable([RL-18]), which asks git whether a delete target could be restored — a question with no textual answer. Its calls are read-only, bounded, and fail closed, so the decision stays a function of the command, the roots, and the on-disk state those name; a second predicate wanting filesystem access is a spec change, not a local call. Decision logging (on by default, see [LOG-01]–[LOG-04];CLAUDEWATCH_LOG=offopts out) is a side channel: it stamps a timestamp and writes a file after the decision is computed, never feeding back into it. Keep it that way — the clock stays in_log_event, not inevaluate_rules. - Exit code is always 0. A non-zero exit blocks the host (Claude Code)
from getting a useful decision. All errors are surfaced as
denydecisions with explanatory messages. - Single coalesced decision per invocation. Multiple matching rules
across multiple rule sets aggregate into one
deny(preferred) or oneask. Never emit more than one decision. - The engine ships self-contained.
scripts/watchdog.pyand everything on the decision path use only the Python standard library (with a minimal built-in YAML parser), so the plugin installs cleanly and evaluates rules fast in any environment Claude Code runs in — no pip step on the hot path. Build- and release-time tooling that never runs on the decision path (e.g. shipyard'sgen-plugin-json, run by CI's project job) may use PyYAML; it never runs in the hook. - Allow-by-default. When no rule matches, the engine produces no stdout output. Silence is allow.
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.
- 5d ago First seen · 209 lines · 2,800 tokens per session scan E 7a52d5abe7d2
ClaudeWatch AGENTS.md is an instructions file published in the GitHub repository chris-peterson/ClaudeWatch (3 stars, last pushed 2d ago), licensed MIT. It adds 2,800 tokens to every session, about $0.0140 per session on Opus 5. A static security scan graded it E with 2 findings (reaches for credential files, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
living-manual CLAUDE.md
Instructions for dougstanford/living-manual, covering living-manual, start of every session, how work lands — non-negotiable, user's manual (living-manual) and releasing.
ship-it open-pr.instructions.md
Instructions for khrichtchatyi/ship-it: When the user asks to open, create, or submit a pull request, follow the skill in skills/open-pr/SKILL.md in full: verify gh is authenticated, resolve the target repository and default branch, push the current branch, open one pull request with a title and body derived from the…
agent-skills CLAUDE.md
Instructions for mindbox-cloud/agent-skills, covering agent-skills — developer guide for claude code, repository purpose, repository structure, how to add a new plugin and step 1 — create the directory structure.
my-claude-skills CLAUDE.md
Instructions for brody-0125/my-claude-skills, covering claude code skills repository, validation commands, sub-kopring-engineer: kotlin/java 코드 컨벤션 검증, numerical: 수치 연산 코드 검증 and sub-test-engineer: 문서 일관성 검증.
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.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.