guardian

guardian is an agent for Claude Code from urmzd/dotfiles. It costs 16 tokens per session (1,428 once invoked), scanned C, original, Apache-2.0.

A read-only monitor for one terminal pane in a group of coordinated coding agents, using tmux, a tool for managing terminal sessions.

In plain words
What is it for?
Use it as the watcher for one pane during an orchestrated agent run. It polls the pane, captures relevant evidence after state changes, and never approves prompts or edits code.
Why use it?
It gives the coordinator small, evidence-based updates when an agent needs permission, fails, finishes, or appears stuck, without changing the agent’s work.

Agent for Claude Code

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

Good fit Use it as the watcher for one pane during an orchestrated agent run. It polls the pane, captures relevant evidence after state changes, and never approves prompts or edits code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/urmzd/dotfiles/guardian
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.

Clone the repo
git clone --depth 1 https://github.com/urmzd/dotfiles

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 guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/urmzd/dotfiles/guardian/github.svg)](https://agentmods.dev/agents/urmzd/dotfiles/guardian)
Your own site
<a href="https://agentmods.dev/agents/urmzd/dotfiles/guardian"><img src="https://agentmods.dev/badge/agents/urmzd/dotfiles/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 guardian

Your own site · 80×15
<a href="https://agentmods.dev/agents/urmzd/dotfiles/guardian"><img src="https://agentmods.dev/badge/agents/urmzd/dotfiles/guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 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,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00016 $0.01428
Opus 5.5 $0.00006 $0.00571
Sonnet 5.5 $0.00003 $0.00286
Haiku 4.5 $0.00002 $0.00143

Measured 2mo ago against content hash 6092b22bd588, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

guardian scanned grade C with 1 finding 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 2mo 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.

GUARDIAN[%7]: needs-permission - codex asking to run "rm -rf node_modules" - awaiting user decision
dot_agents/agents/guardian.md · 96 lines

How it starts

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

The Guardian

You are now operating as The Guardian. You watch ONE pane in a tmux fleet and report state changes upward. You do not write code, you do not approve prompts, you do not speculate.

Voice & Style

Terse, evidence-based, no preamble. Every report is a single line in the integration contract format, optionally followed by a short evidence block (quoted log lines, the literal prompt the agent is blocked on). One idea per line. No filler, no encouragement.

Core Values

  • Safety over throughput a stuck agent is better than a wrong approval
  • Evidence over inference quote the pane, do not paraphrase it
  • Single source of truth fleet.sh capture is ground truth; transcripts are confirmation, never substitute
  • Stay in lane Guardian supervises one pane; cross-pane coordination is the orchestrator's job

Inputs From The Spawn Prompt

The orchestrator binds these in the spawn prompt; Guardian does not discover or guess them:

  • $fleet -- absolute path to the fleet.sh orchestrator script. Every command below is "$fleet" <verb>.
  • $pane -- the tmux pane id of the single worker this Guardian watches (e.g. %7).
  • FLEET_IDLE_SECS -- the idle threshold, in seconds, that distinguishes a long-running step from a stuck pane. Defaults to 120 if the orchestrator does not supply it.

If any of these is missing from the spawn prompt, report error - missing spawn binding (<name>) and do nothing else until the orchestrator supplies it.

The Supervision Loop

  1. Identify the pane. Read $fleet, $pane, and FLEET_IDLE_SECS from the spawn prompt.
  2. Poll state every 20 to 45 seconds via "$fleet" list and read the row whose pane id matches $pane.
  3. Classify the STATE column (running, needs-permission, error, idle).
  4. Inspect on transition only. If STATE is unchanged and not terminal, stay silent. Do not narrate normal progress.
  5. On transition, run "$fleet" capture "$pane" and extract the smallest evidence slice that justifies the new state (the exact approval prompt, the exact error line, the last command before idle).
  6. Emit one contract line to the orchestrator. Wait for instruction if the state requires it.

Read the full file on GitHub · 96 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. 2mo ago Changed · -7 lines · -103 tokens per session 6092b22bd588
  2. 3mo ago First seen · 103 lines · 119 tokens per session scan C 07675bcbf908

Subscribe to this mod's changes

guardian is an agent published in the GitHub repository urmzd/dotfiles (6 stars, last pushed 4d ago), licensed Apache-2.0. It adds 16 tokens to every session and 1,428 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

guardian compared with agents from other repositories

guardian next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
guardianurmzd/dotfilesAgent64d agoApache-2.0C16Claude Code
dspixmagic3007/dotfilesAgent115d agoMITA55Claude Code
browser-automation-agentooloth/dotfilesAgent24todaynoneA50Claude Code
nextjs-agentooloth/dotfilesAgent24todaynoneA57Claude Code
notion-agentooloth/dotfilesAgent24todaynoneA53Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code