competition-race-condition-state-drift
Lets your agent investigate concurrency and execution order issues. It helps find bugs where the order of actions causes errors or state inconsistencies.
What it does
This tool helps recreate problems that happen when multiple actions occur simultaneously. It focuses on how the order and timing of these actions can cause unexpected errors, like incorrect data or duplicate actions.
When to use it
- ✓When you suspect the order of actions is causing an error.
- ✓To test what happens if two things try to change the same data at the same time.
- ✓To understand how temporary failures can lead to different outcomes.
Example of what to ask your AI
“I want to test what happens if two people try to withdraw money from the same account simultaneously.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool identifies parts of the system that can be changed (like data in a database or cache). It then simulates simultaneous actions, changing only the order or timing, to see if this causes a different outcome than expected.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add zhaoxuya520/reverse-skill --skill competition-race-condition-state-driftOr download just the file:
curl -L https://raw.githubusercontent.com/zhaoxuya520/reverse-skill/main/CTF-Sandbox-Orchestrator/competition-race-condition-state-drift/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Competition Race Condition State Drift
Use this skill only as a downstream specialization after $ctf-sandbox-orchestrator is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to $ctf-sandbox-orchestrator first.
Use this skill when the decisive behavior depends on request timing, async ordering, lock gaps, or stale state.
Reply in Simplified Chinese unless the user explicitly requests English.
Quick Start
- Identify mutable state first: rows, cache keys, queue payloads, session fields, counters, or files.
- Reproduce with smallest concurrent sequence and fixed timing assumptions.
- Capture one baseline run and one racing run with only one variable changed.
- Track read, check, write, enqueue, and commit boundaries separately.
- Prove final state drift from a clean reset.
Workflow
1. Map Mutable Boundaries
- Record transaction scope, lock behavior, retry logic, idempotency keys, cache invalidation, and queue handoff.
- Note where read-check-write is split across requests, workers, or services.
- Keep each boundary tied to exact timestamps or sequence numbers.
2. Reproduce Timing Window
- Build deterministic concurrent inputs with controlled delay, duplicate requests, or reordered worker execution.
- Compare accepted and rejected paths under identical payloads.
- Record which condition flips when ordering changes.
3. Reduce To Decisive Race Chain
- Compress to: request A and B ordering -> stale check or lock gap -> conflicting writes -> resulting capability or artifact.
- State whether root cause is missing lock, weak idempotency, stale cache read, delayed async commit, or retry side effect.
- If the path becomes queue-dominant, hand off to queue worker drift skill.
Read This Reference
- Load
references/race-condition-state-drift.mdfor race harness ideas, evidence blocks, and parity checks.
What To Preserve
- Mutable keys, transaction boundaries, lock behavior, and idempotency markers
- Timestamped or sequenced traces for baseline and race runs
- One minimal replayable concurrent sequence proving drift
FAQ
What is 'state'?
State is the information a system holds at a particular moment, like a bank account balance or an order status.
What is a 'race condition'?
It's a problem that occurs when the outcome of an operation depends on the exact order in which multiple concurrent actions are executed.
Why is 'order' important?
In systems with many actions happening at once, the order in which these actions are processed can change the final result. If the order isn't controlled, errors can occur.
Details
Original description by the author
Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for race windows, ordering bugs, idempotency failures, lock gaps, concurrent worker drift, and state inconsistencies that produce decisive effects. Use when the user asks to reproduce timing-sensitive bugs, concurrent state corruption, duplicate actions, stale reads, or privilege or balance drift caused by request orderin
Popularity
- GitHub stars
- 42k
- Ranking position
- #4732
- License
- MIT
- Updated
- 9/22/2026
Comments
- …
More skills from this repository
competition-ad-certificate-abuse
Helps your agent analyze attacks on digital certificate systems. It investigates how certificates can be misused to gain access.
zhaoxuya520/reverse-skill
competition-agent-cloud
Helps your agent analyze security challenges in AI and cloud systems. It investigates how prompts, tools, and the cloud can be exploited.
zhaoxuya520/reverse-skill
competition-android-hooking
Helps your agent investigate Android applications. It analyzes how apps work internally and how they might be modified or exploited.
zhaoxuya520/reverse-skill
competition-browser-persistence
Helps your agent analyze how websites store information in your browser. It investigates cookies and other data to understand how sessions work.
zhaoxuya520/reverse-skill
Similar skills
dashboard-builder
Helps your agent create useful monitoring dashboards. It turns data into charts that answer important system questions.
affaan-m/ECC
dev-team
Simulates a collaborative development team where different roles respond to a problem together. It's useful for getting multiple perspectives without manually switching agents.
affaan-m/ECC
ecc-council
Has your agent convene a four-voice council for difficult decisions. It's useful when there are multiple good options and debate is needed before choosing.
affaan-m/ECC