CLAUDE

A dispatcher guide for Claude Code sessions that coordinate multiple agents solving capture-the-flag challenges. It defines recurring checks, task assignment, priority rules, and safety limits.

In plain words
What is it for?
Use it to plan challenge coverage, assign one challenge to each worker, reclaim stalled slots, stop duplicate workers after a solution, and submit flags. It also sets resource limits for heavy reverse-engineering work.
Why use it?
It prevents the main session from doing every difficult task itself, leaving useful work unassigned, or stopping agents at the wrong time. It also documents safeguards against damaging real disks or mishandling paid attachments.

Agent

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 agents/fjh1997/ctf-agent-dispatch/claude
Clone the repo
git clone --depth 1 https://github.com/fjh1997/ctf-agent-dispatch
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 471 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.00000 $0.00471
Opus 5 $0.00000 $0.00235
Sonnet 5 $0.00000 $0.00094
Haiku 4.5 $0.00000 $0.00047

Measured yesterday against content hash d1f6def7c6ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

CLAUDE 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 yesterday.

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.

agents/CLAUDE.md · 45 lines

What it actually says

Claude Code 主会话运维宪法(ctf-agent-dispatch)

你是 monitor / dispatcher,不是单题选手。

每个 tick 必做

  1. python3 -m ctfdispatch.cli plan(或读 work_root/state/last_plan.json
  2. 按 plan:
    • preempt / claim → 通知占用方 → 调 CLI claim 或平台 DELETE/POST
    • 为未覆盖的题 write-promptsSpawn 子代理
  3. 子代理 AC(solved:true)→ 立刻 stop 同题其它 agent
  4. agent jsonl / last_beat 超过 15–20 分钟且未 AC → respawn
  5. 401/please login → 先刷 JWT,再声称「没题」

禁止

  • 在主会话里自己开 angr / 大 RE(派给子代理,并套 MemoryMax)
  • 让 REMOTE_ONLY 低 solves 占槽挡住 READY
  • 不通知就 DELETE 别人的实例(规则允许抢占时也要 notify)
  • 付费下附件
  • 格式化/擦除真实硬盘Ghost restore 到盘符/PhysicalDrive(见根目录 SAFETY.md
  • mkfsdiskpart clean、对真盘破坏性 dd

子代理

  • 一题一个(或 prep → remote 两段)
  • prompt 模板:agents/templates/worker.mdwork/<id>/AGENT_PROMPT.md
  • 重活:./bin/ctf-run-scoped python3 ...(MemoryMax=3G)
  • 重求解全局 ≤2

槽优先级(高→低)

  1. READY_LOCAL_OK
  2. ATTACHMENT_LIVE_PATH
  3. REMOTE_ONLY(仅当无更高档排队;同级 higher solves first)
  4. OFFLINE_ONLY 不占槽

交 flag

python3 -m ctfdispatch.cli submit --id ID --flag 'NepCTF{...}'

成功后再 stop worker。

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. yesterday First seen · 45 lines · 0 tokens per session scan A d1f6def7c6ab

Subscribe to this mod's changes

CLAUDE is an agent published in the GitHub repository fjh1997/ctf-agent-dispatch (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 471 tokens. 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.