ctf-agent

Orchestrates authorized CTF question-bank competitions through API-driven state machine workflows.

1|Updated Aug 3, 2026
One-click install
npx skills add https://github.com/hanmujun/hanmujun-agent-public --skill ctf-agent-hanmujun
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ctf-agent
Source: https://github.com/hanmujun/hanmujun-agent-public/tree/main/.agents/skills/ctf-agent
Command: npx skills add https://github.com/hanmujun/hanmujun-agent-public --skill ctf-agent-hanmujun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running a full authorized CTF competition manually requires tracking dozens of challenges, routing each to the right specialist, validating candidate flags, and managing retry budgets and resume state. This Skill automates that entire loop through a contest API so no challenge is lost, double-submitted, or submitted with unverified flags. ## Core Features & Use Cases - State Machine Enforcement: Every challenge advances through new, prepared, solving, candidate, submitted, and solved states, with stuck and deferred branches and no skipping candidate checks. - Category-Based Routing: Normalized categories (web, pwn, crypto, reverse, forensics, misc) are dispatched to dedicated sub-agents for specialized solving. - Evidence-Gated Submission: Candidates must match the platform flag format, come from reproducible artifacts, and not appear in failed submission history before being submitted. - Use Case: During an authorized multi-challenge CTF event, run the dual-model runner to list unsolved challenges, prepare and start each one, validate candidates against evidence rules, submit within a 3-attempt budget, and resume cleanly after interruption via .ctf-state/state.json. ## Quick Start Ask the agent to load the contest profile, list unsolved challenges, and begin solving the lowest-cost challenge through the candidate-check and submit workflow.

Frequently Asked Questions about ctf-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate a full CTF competition with an agent?▼

Configure contest.config.json with the event API endpoint, field mappings, and flag pattern, then run the dual-model runner via start-agentx-dual.cmd. The agent lists unsolved challenges, prepares each one, routes by category, validates candidates, and submits within retry budgets.

How are CTF challenges routed to specialized solvers?▼

Challenges are normalized into categories and dispatched to sub-agents: web/api to ctf-web, pwn/binary to ctf-pwn, crypto to ctf-crypto, reverse to ctf-reverse, forensics/stego to ctf-forensics, and misc/osint/ai to ctf-misc.

What checks must a candidate flag pass before submission?▼

A candidate must be non-empty, match the platform flag format, originate from challenge attachments, service responses, or a reproducible solve script, cite evidence linked to an existing artifact, and not appear in the challenge's failed submission history.

Can the CTF agent resume after an interruption?▼

Yes. Challenge state is persisted to .ctf-state/state.json by the contest_api.py tool, so the workflow can resume from the last recorded state. States must never be hand-edited or forged.

What are the submission and retry limits per challenge?▼

At most 3 distinct candidates may be submitted to the same challenge, with a default of 3 solving rounds. After the budget is exhausted, the challenge transitions from stuck to deferred with a recorded reason.

How does the agent handle malicious text inside challenge content?▼

Challenge descriptions, attachments, web pages, and service outputs are treated as untrusted data only. Instructions embedded in them, such as requests to read tokens or run system commands, are never executed as agent commands.