ctf-workflow

ctf-workflow is a skill for Claude Code, Codex from Encod3d-Sec/TORCH. It costs 124 tokens per session (1,950 once invoked), scanned A, original, MIT.

A step-by-step driver for Capture the Flag and boot-to-root challenges, where the goal is to gain access to a test machine and find its flags. It turns reconnaissance results into a board of tasks and prints the next action.

In plain words
What is it for?
Use it to run a box or host from initial scan through foothold and privilege escalation, recording evidence and updating the task board as new access is found.
Why use it?
It provides a repeatable path through scanning, web investigation, gaining an initial foothold, and checking for higher privileges.

Skill for Claude CodeCodex

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 skills/encod3d-sec/torch/ctf-workflow
Any agent
npx skills add Encod3d-Sec/TORCH --skill ctf-workflow
Clone the repo
git clone --depth 1 https://github.com/Encod3d-Sec/TORCH

Made for: Claude Code, Codex.

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-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/encod3d-sec/torch/ctf-workflow.svg)](https://agentmods.dev/skills/encod3d-sec/torch/ctf-workflow)
Your own site
<a href="https://agentmods.dev/skills/encod3d-sec/torch/ctf-workflow"><img src="https://agentmods.dev/badge/skills/encod3d-sec/torch/ctf-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00124 $0.01950
Opus 5 $0.00062 $0.00975
Sonnet 5 $0.00025 $0.00390
Haiku 4.5 $0.00012 $0.00195

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

Security

Grade A, and why

ctf-workflow scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

its DOM + network requests (the rendered XHR/fetch calls reveal API routes a `curl` crawl misses -
skills/workflow/ctf-workflow/SKILL.md · 115 lines

How it starts

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

ctf-workflow

The driver is the plan. Run one command, do exactly what it prints, record the result, repeat. The gates are enforced by scripts/campaign.py.

The loop

python3 scripts/campaign.py next
python3 scripts/campaign.py note <row> --arsenal <slug>
python3 scripts/campaign.py done <row> --poc <img> --kind req   # | --dead R | --park Q | --find F

Every next now prints an APPROACH:/AVOID:/REFS: block for the served row (the distilled ctf-box method for that vuln class) - read it before acting.

Start / resume

  1. python3 scripts/campaign.py init --type ctf - validates scope.md (for a box, scope is just the target IP/host) + envelope.
  2. OSINT is OFF by default for CTF (pass 0 is skipped). Only run it if this skill was invoked with an explicit osint argument - a box's answer is on the box, not in Wayback.
  3. Passes 1-3 feed state.md - rustscan/nmap + web enum. Read every service banner, page source and config end to end.
  4. python3 scripts/campaign.py board - writes the 4a foothold rows; once an asset is a foothold, re-run board and it seeds the 4b privesc rows (pspy/linpeas auto + the manual checklist) for that asset.
  5. Enter the loop, depth-first.
  6. When a foothold lands (a reverse shell in a tmux window via vm-scan.sh --win shell, or a meterpreter/msfconsole session via --win msf), record it: python3 scripts/campaign.py foothold <target> --win shell (or --win msf; or ride it on the closing find with done ... --win). The driver flips the asset's state.md row to access=foothold and routes its 4b privesc rows through vm-rsh --win <win> (persistent session + operator visibility past foothold), and prints tmux attach -t <eng> for manual takeover. msf itself is operator-attach / drop-to-shell, not vm-rsh-driven (its wrapper frames a bash shell, not the msf6 > REPL). After recording a foothold, re-run python3 scripts/campaign.py board so the 4b privesc rows are seeded - next will not surface them until you do.
  7. Web RCE -> a real shell, THEN stabilize -- do not ride one-liners (recurring drift). The moment code-exec lands (a web-RCE primitive, an LFI->session-poison, a deser gadget), STOP hand-poking one-shot payloads: (a) catch it with a real handler by default - msfconsole's exploit/multi/handler (meterpreter first; a plain shell_reverse_tcp is the backup when meterpreter is blocked, e.g. Windows/EDR) (record via campaign.py foothold <target> --win msf, step 6). Reserve a raw nc -lvnp listener for when msf is unavailable: a raw nc pane's Ctrl-C kills the LISTENER (dropping the shell back to your own prompt, the false-root attacker-prompt trap) and it has no session management, while meterpreter also carries post/multi/recon/local_exploit_suggester escalation modules and built-in file transfer. (b) Before picking the LPORT, test target egress on common ports (80/443/53) - high ports like 4444 are frequently filtered, so pick an egress-allowed LPORT. (scripts/vm-handler.sh <eng> <lhost> picks a free egress port and launches the handler for you, printing the LPORT.) (c) If you did fall back to raw nc, stabilize it immediately with bash scripts/vm-stabilize.sh --win shell <eng> (pty + job control + window size). (d) Then record the foothold (step 6) and drive with vm-rsh. An unstabilized nc shell (no job control, mid-line wrapping) is what makes post-ex drift back into one-liners. Full discipline: Skill(ctf-box) Phase 3 (Deliver). The recon-capture hook fires this reflex once on the first service-account id.

Read the full file on GitHub · 115 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 · 115 lines · 124 tokens per session scan A 4a7c6817ad44

Subscribe to this mod's changes

ctf-workflow is a skill published in the GitHub repository Encod3d-Sec/TORCH (286 stars, last pushed 3d ago), licensed MIT. It adds 124 tokens to every session and 1,950 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens