patrol-status

patrol-status is a command for coding agents from cukas/patrol. It costs 17 tokens per session (1,487 once invoked), scanned A, original, MIT.

A command that displays Patrol's current session state, including its mode, rule tier, activity counts, health, verification, and configuration.

In plain words
What is it for?
It is for diagnosing Patrol during a coding session and checking reads, edits, unread changes, warnings, verification status, and settings.
Why use it?
It gives a quick view of whether Patrol is watching the session, what it has observed, and whether recent changes were verified.

Command

Part of the patrol plugin — 4 skills, 7 commands, 3 hooks shipped together

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.

agentmods
npx agentmods add commands/cukas/patrol/patrol-status
Clone the repo
git clone --depth 1 https://github.com/cukas/patrol

Or install patrol, the plugin that ships this one along with the rest of its 4 skills, 7 commands, 3 hooks.

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 patrol-status

README.md
[![agentmods](https://agentmods.dev/badge/commands/cukas/patrol/patrol-status.svg)](https://agentmods.dev/commands/cukas/patrol/patrol-status)
Your own site
<a href="https://agentmods.dev/commands/cukas/patrol/patrol-status"><img src="https://agentmods.dev/badge/commands/cukas/patrol/patrol-status.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,487 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00017 $0.01487
Opus 5 $0.00009 $0.00744
Sonnet 5 $0.00003 $0.00297
Haiku 4.5 $0.00002 $0.00149

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

Security

Grade A, and why

patrol-status 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 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.

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.

commands/patrol-status.md · 140 lines

How it starts

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

Patrol Status Dashboard

Run this diagnostic and present the output as a formatted dashboard:

SESSION_ID="${CLAUDE_SESSION_ID:-default}"
STATE_DIR="/tmp/patrol-${SESSION_ID}"

# Mode
MODE="watching"
TIER="off"
[ -f "$STATE_DIR/mode" ] && MODE=$(cat "$STATE_DIR/mode")
[ -f "$STATE_DIR/tier" ] && TIER=$(cat "$STATE_DIR/tier")

# Reads/Edits
READ_COUNT=0
EDIT_COUNT=0
UNREAD=0
[ -f "$STATE_DIR/reads" ] && READ_COUNT=$(wc -l < "$STATE_DIR/reads" | tr -d ' ')
[ -f "$STATE_DIR/edits" ] && EDIT_COUNT=$(wc -l < "$STATE_DIR/edits" | tr -d ' ')
if [ "$EDIT_COUNT" -gt 0 ] && [ -f "$STATE_DIR/edits" ]; then
  if [ -f "$STATE_DIR/reads" ]; then
    UNREAD=$(comm -23 <(sort -u "$STATE_DIR/edits") <(sort -u "$STATE_DIR/reads") | wc -l | tr -d ' ')
  else
    UNREAD=$EDIT_COUNT
  fi
fi

# Nudge level
NUDGE=0
[ -f "$STATE_DIR/nudge-level" ] && NUDGE=$(cat "$STATE_DIR/nudge-level" | tr -d '[:space:]')

# Verification
VERIFY_STATUS="never"
if [ -f "$STATE_DIR/verified" ]; then
  TIMESTAMP=$(cat "$STATE_DIR/verified")
  NOW=$(date +%s)
  AGO=$(( (NOW - TIMESTAMP) / 60 ))
  if [ "$AGO" -lt 1 ]; then
    VERIFY_STATUS="just now"
  else
    VERIFY_STATUS="${AGO}m ago"
  fi
fi

# Custom keywords count
CUSTOM_KW=0
if [ -f "$HOME/.patrol/config.json" ]; then
  CUSTOM_KW=$(jq -r '.custom_keywords // [] | length' "$HOME/.patrol/config.json" 2>/dev/null)
fi

# Config values
ALWAYS_ON=$(jq -r '.always_on // true' "$HOME/.patrol/config.json" 2>/dev/null || echo "true")
EASTER_EGGS=$(jq -r '.easter_eggs // false' "$HOME/.patrol/config.json" 2>/dev/null || echo "false")
THRESHOLD=$(jq -r '.band_aid_threshold // 3' "$HOME/.patrol/config.json" 2>/dev/null || echo "3")
AUTO_DETECT=$(jq -r '.auto_detect_bugfix // true' "$HOME/.patrol/config.json" 2>/dev/null || echo "true")

# Adaptive
ADAPTIVE=$(jq -r '.adaptive // true' "$HOME/.patrol/config.json" 2>/dev/null || echo "true")
if [ "$ADAPTIVE" = "true" ] && [ -f "$HOME/.patrol/history.json" ]; then
  ADAPTIVE_DATA=$(jq -r '.rules | to_entries[] | "\(.key) \(.value.score) \(.value.total_violations) \(.value.last_violation)"' "$HOME/.patrol/history.json" 2>/dev/null || echo "")
else
  ADAPTIVE_DATA=""
fi

echo "MODE=$MODE"
echo "TIER=$TIER"
echo "READS=$READ_COUNT"
echo "EDITS=$EDIT_COUNT"
echo "UNREAD=$UNREAD"
echo "NUDGE=$NUDGE"
echo "VERIFY=$VERIFY_STATUS"
echo "CUSTOM_KW=$CUSTOM_KW"
echo "ALWAYS_ON=$ALWAYS_ON"
echo "EASTER_EGGS=$EASTER_EGGS"
echo "THRESHOLD=$THRESHOLD"
echo "AUTO_DETECT=$AUTO_DETECT"
echo "ADAPTIVE=$ADAPTIVE"
echo "ADAPTIVE_DATA<<EOF"
echo "$ADAPTIVE_DATA"
echo "EOF"

Present the output as this formatted dashboard (fill in actual values):

╭──────────────────── Patrol ─────────────────────╮
│  Mode:     {icon} {mode description}            │
│  Tier:     {tier description}                   │
│  Health:   🛡️ 📖{reads} ✏️{edits}               │
│  Unread:   {unread} file(s) edited without read │
│  Verify:   {verify status}                      │
│  Keywords: 14 default + {custom} custom         │
│  Config:   ~/.patrol/config.json                │
├─────────────────────────────────────────────────┤
│  always_on: {val} | easter_eggs: {val}          │
│  threshold: {val} | auto_detect: {val}          │
├─────────────────────────────────────────────────┤
│  Adaptive: {on/off}                             │
│                                                 │
│  {rule_id}  score: {score}  violations: {total} │
│    → {level_status}                             │
╰─────────────────────────────────────────────────╯

Mode icons:

  • MODE=on → 🟢 bugfix (manual)
  • MODE=auto or TIER=full → 🟢 bugfix (auto-detected)
  • MODE=watching + TIER=light → ⚪ watching (always-on light)
  • MODE=off → 🔴 disabled (/patrol-off)
  • TIER=off + no mode → ⚪ inactive

Tier descriptions:

  • full → Full escalation (nudge → warning → STOP)
  • light → Light (nudge only, no STOP)
  • off → Off

Nudge level in Health line:

  • 0 → shows just the read/edit counts
  • 1+ → show the nudge level label after counts

Read the full file on GitHub · 140 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. 5d ago First seen · 140 lines · 17 tokens per session scan A dffb0b909dec

Subscribe to this mod's changes

patrol-status is a command published in the GitHub repository cukas/patrol (3 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 1,487 once invoked, about $0.0001 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 commands, from other repositories