ctf-agent-dispatch: Instructions file for Codex

AGENTS.md

ctf-agent-dispatch AGENTS.md is an instructions file for Codex, OpenCode from fjh1997/ctf-agent-dispatch. It costs 970 tokens per session, scanned A, original, MIT.

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is fjh1997/ctf-agent-dispatch's own configuration. It tells Codex and OpenCode 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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/fjh1997/ctf-agent-dispatch

Made for: Codex, OpenCode.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/fjh1997/ctf-agent-dispatch/agents-md"><img src="https://agentmods.dev/badge/instructions/fjh1997/ctf-agent-dispatch/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00970 $0.00970
Opus 5.5 $0.00388 $0.00388
Sonnet 5.5 $0.00194 $0.00194
Haiku 4.5 $0.00097 $0.00097

Measured 1mo ago against content hash a6b7d06580fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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
  • 禁止 mkfs、diskpart clean/format、对 /dev/sd* nvme* 的破坏性 dd、wipefs -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. 1mo 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 3mo ago), licensed MIT. It adds 970 tokens to every session, about $0.0039 per session on Opus 5.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