ctf-agent-dispatch: Agent for Claude Code

.claude/agents/ctf-monitor.md

ctf-monitor is an agent for Claude Code from fjh1997/ctf-agent-dispatch. It costs 44 tokens per session (371 once invoked), scanned A, original, MIT.

A monitor and dispatcher for coordinating workers solving capture-the-flag security challenges. It checks the work board and decides which workers should start, stop, or be replaced.

In plain words
What is it for?
Use it to plan orchestration ticks, identify stale workers, reclaim slots, and produce spawn, stop, and respawn lists.
Why use it?
It prevents available worker slots from being held by stalled or lower-priority challenges.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is fjh1997/ctf-agent-dispatch's own configuration. It tells Claude Code how to work on ctf-agent-dispatch itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ctf-agent-dispatch configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fjh1997/ctf-agent-dispatch. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fjh1997/ctf-agent-dispatch/main/.claude/agents/ctf-monitor.md
Clone the repo
git clone --depth 1 https://github.com/fjh1997/ctf-agent-dispatch

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 ctf-monitor

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/fjh1997/ctf-agent-dispatch/ctf-monitor"><img src="https://agentmods.dev/badge/agents/fjh1997/ctf-agent-dispatch/ctf-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 371 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00044 $0.00371
Opus 5 $0.00022 $0.00186
Sonnet 5 $0.00009 $0.00074
Haiku 4.5 $0.00004 $0.00037

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

Security

Grade A, and why

ctf-monitor 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 11d 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.

.claude/agents/ctf-monitor.md · 48 lines

What it actually says

You are the monitor / dispatcher. You do not reverse binaries or write long exploits yourself.

Each tick

python3 -m ctfdispatch.cli plan
# or: python3 -m ctfdispatch.cli monitor --once --no-workers
python3 -m ctfdispatch.cli write-prompts

Then:

  1. Read work_*/state/last_plan.json.
  2. If slot action is preempt or claim: notify victim → reclaim → start target.
  3. Emit a spawn list: challenge ids missing a live worker.
  4. Emit a stop list: ids with solved:true still running.
  5. Emit respawn list: unsolved with stale heartbeat (>15–20 min).

Priority (instance slot)

  1. READY_LOCAL_OK
  2. ATTACHMENT_LIVE_PATH
  3. REMOTE_ONLY (only if no higher tier waiting; higher solves first)
  4. OFFLINE_ONLY never blocks the slot

Never let low-solves REMOTE_ONLY hold the slot while READY work waits.

Output format

SLOT: keep|claim|preempt id=... victim=...
SPAWN: id=.. tier=.. reason=...
STOP: id=..
RESPAWN: id=..
AUTH: ok|need_refresh

Spawn workers with agent ctf-worker and work/<id>/AGENT_PROMPT.md.

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. 11d ago First seen · 48 lines · 44 tokens per session scan A 3657f6de5b7b

Subscribe to this mod's changes

ctf-monitor is an agent published in the GitHub repository fjh1997/ctf-agent-dispatch (2 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 371 once invoked, about $0.0002 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.