Skip to main content
skill CX Codex

competition-race-condition-state-drift — Claude Code skill

The competition-race-condition-state-drift Claude Code skill investigates request races and state drift in a CTF sandbox. It runs after ctf-sandbox-orchestrator routes a timing-sensitive or ordering-related bug.

MIT 110 installs ★ 45,047 updated 2026-09-22

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add zhaoxuya520/reverse-skill --skill competition-race-condition-state-drift -a claude-code
Open on GitHub

What competition-race-condition-state-drift does

The skill reproduces failures caused by concurrent requests, stale state, or reordered operations. It maps read, check, write, enqueue, and commit boundaries, then compares a baseline run with a racing run while changing one variable.

ctf-sandbox-orchestrator must first establish the sandbox assumptions, node ownership, and evidence priorities. The skill reduces the failure to a minimal replayable sequence and records the resulting state drift after a clean reset. If queue behavior dominates the issue, it hands the investigation to the queue worker drift skill.

The reference file references/race-condition-state-drift.md contains harness ideas, evidence blocks, and parity checks. Without an active ctf-sandbox-orchestrator, this skill does not start the investigation.

What it helps with

  • reproduce a bug that depends on request timing
  • locate a gap between reading, checking, and writing
  • compare a baseline run with a racing run
  • prove state drift with a minimal concurrent sequence

Example prompts for the agent

  • After ctf-sandbox-orchestrator, reproduce duplicate actions from concurrent requests.
  • Compare a baseline run with a race caused by a stale cache read.
  • Trace the lock gap that changes the account balance.

How to install competition-race-condition-state-drift

1Skills CLI (Vercel)

npx skills add zhaoxuya520/reverse-skill --skill competition-race-condition-state-drift -a claude-code

2Manually: put the files in place

~/.claude/skills/competition-race-condition-state-drift/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/competition-race-condition-state-drift/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about competition-race-condition-state-drift

How do I install competition-race-condition-state-drift in Claude Code?

Run npx skills add zhaoxuya520/reverse-skill --skill competition-race-condition-state-drift -a claude-code. The skill file is at ~/.claude/skills/competition-race-condition-state-drift/SKILL.md.

What does competition-race-condition-state-drift do?

It helps reproduce failures tied to request order, timing, missing locks, or stale state. The skill compares baseline and racing runs, then reduces the cause to a replayable sequence.

When does competition-race-condition-state-drift run?

It runs after ctf-sandbox-orchestrator establishes the sandbox assumptions and routes the issue. Its scope includes concurrent state corruption, duplicate actions, and stale reads.

Source text

SKILL.md · MIT
---
name: competition-race-condition-state-drift
description: 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 ordering. Use only after `$ctf-sandbox-orchestrator` has already established sandbox assumptions and routed here.
---

# 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

1. Identify mutable state first: rows, cache keys, queue payloads, session fields, counters, or files.
2. Reproduce with smallest concurrent sequence and fixed timing assumptions.
3. Capture one baseline run and one racing run with only one variable changed.
4. Track read, check, write, enqueue, and commit boundaries separately.
5. 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.md` for 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

© zhaoxuya520 · MIT · zhaoxuya520/reverse-skill

Similar skills

All skills for Testing and QA →

From the same set36

The whole set →
binary-ninja-reverse binary-ninja-reverse guides binary analysis in Binary Ninja using HLIL, MLIL, and LLIL representations. Useful for tracing cross-references, inspecting exports, and reviewing binary patches. CX Codex +1 769installs ctf-sandbox-orchestrator ctf-sandbox-orchestrator is a Claude Code skill that routes CTF investigations to the right analysis path. It starts when a task includes challenge infrastructure, binaries, hosts, or identities. CX Codex +1 113installs competition-web-runtime competition-web-runtime — a skill for Claude Code that automates web application and API analysis for CTF challenges. Runs after $ctf-sandbox-orchestrator is active to debug routing, sessions, and browser behavior. CX Codex +1 111installs competition-android-hooking competition-android-hooking — a skill for Claude Code that automates Android app security analysis within a CTF sandbox. It activates for hooking APKs, bypassing SSL pinning, or tracing JNI boundaries. CX Codex +1 110installs competition-container-runtime competition-container-runtime — a Claude Code skill for live container runtime analysis, comparing static manifests against running pods. CX Codex +1 110installs competition-crypto-mobile The competition-crypto-mobile Claude Code skill handles CTF tasks involving cryptography, steganography, and mobile apps. It is routed in after sandbox assumptions are set for blob decoding or APK and IPA analysis. CX Codex +1 110installs competition-request-normalization-smuggling competition-request-normalization-smuggling is a Claude Code skill that analyzes HTTP parsing discrepancies between proxies and backend servers in CTF workflows. CX Codex +1 110installs competition-bundle-sourcemap-recovery The competition-bundle-sourcemap-recovery Claude Code skill reconstructs JavaScript structure from served assets and source maps. It runs after ctf-sandbox-orchestrator routes a task involving chunk loading or hidden routes. CX Codex +1 110installs

Project sponsors

Companies that keep this analytics open