watchdog

watchdog is a command for coding agents from MartyBonacci/specswarm. It costs 73 tokens per session (2,646 once invoked), scanned A, original, MIT.

A background process that watches a SpecSwarm project for new commits, checked tasks, flagged verifications, and certain mentor-to-builder conduct runs. It sends a notification when something needs attention and keeps running across session restarts.

In plain words
What is it for?
It is for starting, stopping, checking the status of, and viewing logs from a per-project watchdog that monitors Git and verification state.
Why use it?
It removes the need to repeatedly check project and verification state by hand, including after a coding session ends.

Command

Part of the ss plugin — 10 skills, 34 commands, 6 agents, 4 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/martybonacci/specswarm/watchdog
Clone the repo
git clone --depth 1 https://github.com/MartyBonacci/specswarm

Or install ss, the plugin that ships this one along with the rest of its 10 skills, 34 commands, 6 agents, 4 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 watchdog

README.md
[![agentmods](https://agentmods.dev/badge/commands/martybonacci/specswarm/watchdog.svg)](https://agentmods.dev/commands/martybonacci/specswarm/watchdog)
Your own site
<a href="https://agentmods.dev/commands/martybonacci/specswarm/watchdog"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/watchdog.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,646 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 $0.00073 $0.02646
Opus 5 $0.00036 $0.01323
Sonnet 5 $0.00015 $0.00529
Haiku 4.5 $0.00007 $0.00265

Measured 5d ago against content hash 618dd863f3e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

watchdog 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.

plugins/ss/commands/watchdog.md · 258 lines

How it starts

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

SpecSwarm Watchdog Daemon

Background bash process that polls the project's git + verify-queue state and pings Marty when something needs attention. Completes v7.4.0's verification loop by surviving session restarts — when a Claude session ends with pending verifications, the watchdog notices and surfaces them.

Per-project: each project has its own watchdog (state lives in .specswarm/watchdog.{pid,log,state}). Stop one before starting another in the same project.

Subcommand dispatch

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/watchdog/state.sh"

# Parse args
SUBCOMMAND="status"
INTERVAL=30
WITH_VERIFY=false
TAIL_LINES=40

while [ $# -gt 0 ]; do
  case "$1" in
    --interval)    INTERVAL="$2";    shift 2 ;;
    --with-verify) WITH_VERIFY=true; shift ;;
    --tail)        TAIL_LINES="$2";  shift 2 ;;
    -h|--help)
      cat <<EOF
Usage: /ss:watchdog [SUBCOMMAND] [options]

Subcommands:
  start    Launch daemon in background (nohup + setsid)
  stop     Send SIGTERM to running daemon; clean up PID file
  status   Show PID, uptime, last check, queue state (default)
  logs     Tail the watchdog log file
  once     Run a single check cycle in the foreground (debugging)

Options:
  --interval N      Polling interval in seconds (default 30; min 5)
  --with-verify     EXPERIMENTAL — dispatch headless \`claude --print\` on
                    pending verifications. Burns tokens; off by default.
  --tail N          Lines to tail with the logs subcommand (default 40)

State lives at: .specswarm/watchdog.{pid,log,state}

Examples:
  /ss:watchdog start
  /ss:watchdog start --interval 60
  /ss:watchdog start --with-verify
  /ss:watchdog status
  /ss:watchdog logs --tail 100
  /ss:watchdog once   # foreground test
  /ss:watchdog stop
EOF
      exit 0
      ;;
    start|stop|status|logs|once)
      SUBCOMMAND="$1"
      shift
      ;;
    *)
      echo "❌ Unknown argument: $1 (try /ss:watchdog --help)" >&2
      exit 2
      ;;
  esac
done

# Enforce minimum interval
if [ "$INTERVAL" -lt 5 ]; then
  echo "❌ --interval must be ≥5 seconds (got $INTERVAL)" >&2
  exit 2
fi

PID_FILE=$(ss_watchdog_pid_file)
LOG_FILE=$(ss_watchdog_log_file)
STATE_FILE=$(ss_watchdog_state_file)
RUN_SCRIPT="${PLUGIN_DIR}/lib/watchdog/run.sh"
CHECK_SCRIPT="${PLUGIN_DIR}/lib/watchdog/check-cycle.sh"

Read the full file on GitHub · 258 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 · 258 lines · 73 tokens per session scan A 618dd863f3e3

Subscribe to this mod's changes

watchdog is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 73 tokens to every session and 2,646 once invoked, about $0.0004 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-30.