Guide · Agent skill
How to use the Race Condition State Drift agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This guide explains the competition-race-condition-state-drift agent skill, a specialist add-on for the ctf-sandbox-orchestrator workflow. It is for security students practising race-condition challenges in a CTF lab and developers reproducing timing-sensitive bugs in a test environment. After reading, you will know how to install the skill, how to ask for it with natural requests, and how the agent is guided to prove a bug with a minimal replayable sequence.
Quick start
- 1Download the ZIP. Download the skill ZIP file from this page. The skill ships as a ZIP containing SKILL.md, references/race-condition-state-drift.md and agents/openai.yaml.
- 2Unzip into a skills folder. Unzip the file into ~/.claude/skills/ for a personal install, or into a project's .claude/skills/ folder for a project-only install.
- 3Or upload it in the Claude apps. If you use the Claude apps, go to Settings, then Capabilities, then Skills, and upload the ZIP file there.
- 4Activate the parent skill. Make sure $ctf-sandbox-orchestrator is active and has set up sandbox assumptions before you ask for race-condition work.
- 5Make a natural request. Describe the ordering or timing bug, the endpoint or state involved, and that the test runs in your own lab sandbox.
- 6Review the baseline and racing runs. Check that the agent captured one baseline run and one racing run that differ by a single variable, with timestamps or sequence numbers.
- 7Keep the replayable sequence. Save the minimal concurrent sequence and the before and after state so the bug can be replayed from a clean reset.
What does this skill make the agent do?
The skill covers bugs where the order or timing of simultaneous requests changes the outcome. Examples named in the source include race windows, idempotency failures, lock gaps, concurrent worker drift, stale reads, and privilege or balance drift caused by request ordering.
When the skill is active, the agent is guided to map the mutable state (rows, cache keys, queue payloads, session fields, counters or files), build a small concurrent test, capture a baseline run and a racing run that differ by one variable, and record the read, check, write, enqueue and commit boundaries separately.
- Identify the mutable state first.
- Reproduce with the smallest concurrent sequence and fixed timing assumptions.
- Compare one baseline run with one racing run.
- Prove the final state drift from a clean reset.
Install the skill from a ZIP file
Download the ZIP file from this page and unzip it into one of two locations. Use ~/.claude/skills/ for a personal install available to all your projects, or use the .claude/skills/ folder inside a specific project if you want it limited to that project.
If you use the Claude apps instead, you can upload the ZIP under Settings, then Capabilities, then Skills.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
~/.claude/skills/Install the parent skill first
This skill is designed to be used only after $ctf-sandbox-orchestrator is already active and has set up sandbox assumptions, node ownership and evidence priorities. The skill itself says that if this has not happened, the agent should return to $ctf-sandbox-orchestrator first.
Without the parent skill, this skill is out of place on its own. Make sure your sandbox target environment is set up by you, because these files do not provide one.
How do you trigger the skill with a natural request?
You do not need special syntax. The skill is meant to activate when you ask for help reproducing timing-sensitive or ordering-dependent behaviour. The source lists these trigger themes: timing-sensitive bugs, concurrent state corruption, duplicate actions, stale reads, and privilege or balance drift caused by request ordering.
Say what the system does, what should happen, and that the test runs in your lab. Mention the parent workflow so the agent routes correctly.
- Using ctf-sandbox-orchestrator, reproduce a double-spend race on the balance endpoint in my lab sandbox.
- Two identical checkout requests sometimes both succeed. Build a minimal concurrent test to show why.
- Our CTF challenge seems to return a stale session role after a privilege change. Help me capture a baseline and a racing run.
- Show me a replayable request sequence that proves the duplicate submission bug in my test environment.
What the agent produces
The source asks the agent to keep evidence together so the result can be checked. For each finding this includes the state side (key or row, initial value, final value, commit boundaries), the timing side (request order, delays, retries, queue timing) and the effect side (duplicated action, privilege drift, balance drift or stale authorisation).
The agent should reduce the finding to a short chain: request A and B ordering, then a stale check or lock gap, then conflicting writes, then the resulting capability or artifact. It should also say whether the root cause is a missing lock, weak idempotency, a stale cache read, a delayed async commit, or a retry side effect.
- Mutable keys, transaction boundaries, lock behaviour and idempotency markers
- Timestamped or sequenced traces for baseline and race runs
- One minimal replayable concurrent sequence that proves the drift
Safety, scripts and network use
Use this skill only on systems you own or are explicitly allowed to test, such as a CTF lab or a test environment you control. The source describes the skill as aimed at reproducing exploitable bugs, and it describes no authorisation check, so the responsibility for scope sits with you.
According to the source, the skill runs no scripts and uses no network access. The source also says the agent should reply in Simplified Chinese unless you explicitly ask for English. It does not cover general performance or load testing.
- Do not point it at live or production systems you do not own.
- Scripts: none listed.
- Network: none listed.
- Default reply language: Simplified Chinese unless you request English.
Tips for better results
The source warns about two common mistakes. The first is running noisy stress tests without a minimal deterministic sequence. The second is mixing several mutable keys without proving which one drives the effect. Start small and change one thing at a time.
A timing bug is only proven when the final state differs from a clean reset in a way you can show. Reporting timing sensitivity alone is not enough.
- Start with a single pair of requests before scaling up.
- Reset the sandbox to a clean state before each comparison.
- Track one mutable key at a time until you know which one drives the effect.
- If the problem turns out to be dominated by a queue, the source says to hand off to a queue worker drift skill.
What people use it for
- A security student reproducing a race-condition challenge in a CTF lab and documenting why the check was bypassed.
- A developer reproducing a double-spending or duplicate-submission bug in a test environment before fixing it.
- A security reviewer who already uses ctf-sandbox-orchestrator checking whether a stale read leads to a privilege change.
- A team tracing balance drift in a test database after concurrent requests to the same account.
Frequently asked questions
Is the Race Condition State Drift skill free to use?
The source file list names an MIT licence for the repository, which is the licence information this page can confirm. It does not describe any price, so check the repository licence file for the full terms.
Do I need to install anything else before this skill?
Yes. The skill requires the parent skill ctf-sandbox-orchestrator to be active first, and a sandbox target environment that you set up yourself. Without them, the skill tells the agent to return to the parent skill first.
Where do I put the skill files after downloading?
Unzip the ZIP into ~/.claude/skills/ for a personal install or into the project's .claude/skills/ folder for a project install. In the Claude apps, you can upload the ZIP under Settings, then Capabilities, then Skills.
Can I use this skill to test a live website?
The source says no for systems you do not own. It is aimed at reproducing bugs in a CTF lab or test environment, and no authorisation check is described in the files, so use it only on systems you are allowed to test.
Does the skill run scripts or use the internet?
According to the source, it runs no scripts and uses no network access. Its guidance is delivered as instructions and reference notes that the agent follows.
How is this different from a general load or performance test?
This skill focuses on whether ordering or timing changes the final state, such as duplicate actions or balance drift. The source says it does not cover general performance or load testing.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits security students on CTF race-condition challenges and developers reproducing ordering bugs in their own test environments, provided they already use ctf-sandbox-orchestrator. It is a poor fit for anyone who has not set up the parent skill, wants load or performance testing, or plans to test systems they do not own.
Download the skill