ctf-agent-dispatch AGENTS.md

Instructions for a CTF dispatch monitor that assigns cybersecurity challenge tasks to worker agents. CTF means capture the flag, a type of security competition where participants solve technical puzzles.

In plain words
What is it for?
Planning dispatch cycles, preparing worker prompts, assigning one worker per challenge, tracking solved tasks, and restarting inactive workers.
Why use it?
They separate scheduling from solving, prioritise available tasks, and define when workers should be started, stopped, or replaced.

Instructions file for CodexOpenCode

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 instructions/fjh1997/ctf-agent-dispatch/agents-md
Clone the repo
git clone --depth 1 https://github.com/fjh1997/ctf-agent-dispatch

Made for: Codex, OpenCode.

Per session 970 This file is loaded in full into every session.
When invoked 970 The same file — it is already loaded in full.
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.00970 $0.00970
Opus 5 $0.00485 $0.00485
Sonnet 5 $0.00194 $0.00194
Haiku 4.5 $0.00097 $0.00097

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

Security

Grade A, and why

ctf-agent-dispatch AGENTS.md 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 2d 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.

AGENTS.md · 83 lines

How it starts

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

AGENTS.md — 多 harness 通用入口(Codex / Claude / 其它)

Codex:打开本仓库时会读根目录 AGENTS.md
Claude Code:同时读根目录 CLAUDE.md(更细的启动步骤)+ 本文件。
CLI only:不开 agent 也能用 bash scripts/bootstrap.sh && ./.venv/bin/python scripts/selftest.py

你是 CTF 调度主会话(monitor),不是单题硬刚 RE 的工人。

一启动(所有对话式 agent)

  1. bash scripts/bootstrap.sh(幂等)
  2. source .venv/bin/activate 或使用 .venv/bin/python
  3. 默认 demo:.venv/bin/python scripts/selftest.py
    期望:SELFTEST_OK 且 preempt #71 → #64
  4. 之后按调度循环工作

每个 tick

.venv/bin/python -m ctfdispatch.cli plan
.venv/bin/python -m ctfdispatch.cli write-prompts
# 读 work_*/state/last_plan.json
  • preempt/claim → 先 notify → 再删/开实例
  • spawn worker:一题一个;prompt = work/<id>/AGENT_PROMPT.md
  • solved:true → 立刻 stop 同题 worker
  • 静默 >15–20min 未 AC → respawn

槽优先级

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

子代理(Claude Code 具名 agent)

文件 名称
.claude/agents/ctf-worker.md ctf-worker
.claude/agents/ctf-monitor.md ctf-monitor

Codex 没有同一套 .claude/agents 时:用 多会话 / 多任务 模拟——主会话只调度,新开 task 贴 AGENT_PROMPT.md 当 worker,规则仍以本文件 + SAFETY.md 为准。

安全(强制)

完整条文见 SAFETY.md。摘要:

  • 禁止 格式化/擦除/Ghost 还原 真实硬盘、分区、盘符、PhysicalDrive
  • 禁止 mkfsdiskpart clean/format、对 /dev/sd* nvme* 的破坏性 ddwipefs -a 真盘
  • Ghost/镜像题 work/<id>/ 文件副本上分析
  • 禁止付费附件;禁止未授权对外攻击

兼容性矩阵

工具 如何用本仓库
Claude Code 目录内 claude → 读 CLAUDE.md + 本文件;Spawn ctf-worker
OpenAI Codex CLI 目录内启动 → 读本 AGENTS.md;用 task/子会话当 worker
纯终端 bootstrap + selftest / cli monitor,不依赖任何 LLM
其它 agent(Cursor/Aider/…) AGENTS.md + SAFETY.md 设为项目规则;调度仍走 ctfdispatch CLI

确定性策略(抢槽、交 flag、cgroup)在 Python 包里,与用哪家模型无关。

文件索引

路径 用途
CLAUDE.md Claude 专用启动细则
AGENTS.md 本文件 · 多 harness 通用
SAFETY.md 磁盘/安全红线
QUICKSTART.md 人类一页纸
.claude/agents/* Claude 可 Spawn 定义
ctfdispatch/ 调度实现

Read the full file on GitHub · 83 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. 2d ago First seen · 83 lines · 970 tokens per session scan A a6b7d06580fd

Subscribe to this mod's changes

ctf-agent-dispatch AGENTS.md is an instructions file published in the GitHub repository fjh1997/ctf-agent-dispatch (2 stars, last pushed 1mo ago), licensed MIT. It adds 970 tokens to every session, about $0.0049 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 instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens