race-condition

race-condition is a skill for Claude Code, Codex from yaklang/hack-skills. It costs 50 tokens per session (5,005 once invoked), scanned A, original, MIT.

A guide to testing race conditions, where two requests arrive at nearly the same time and both pass a check before the application updates its data.

In plain words
What is it for?
Use it to test coupons, rewards, purchases, transfers, inventory reservations, referrals, and verification actions.
Why use it?
It helps find cases where one-time actions can be repeated or balances, quotas, stock, and records become inconsistent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test coupons, rewards, purchases, transfers, inventory reservations, referrals, and…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yaklang/hack-skills/race-condition
About the project

HackSkills is an organized knowledge base of installable skills that gives AI agents practical security knowledge across areas such as web security, privilege escalation, reverse engineering, and digital forensics. It is intended for bug bounty work, penetration testing, CTF competitions, and authorized security research. The catalogue entries are the project's own master, category, and topic skills.

yaklang/hack-skills · 2,098 stars · on GitHub

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.

Any agent
npx skills add yaklang/hack-skills --skill race-condition
Clone the repo
git clone --depth 1 https://github.com/yaklang/hack-skills

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 race-condition

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaklang/hack-skills/race-condition.svg)](https://agentmods.dev/skills/yaklang/hack-skills/race-condition)
Your own site
<a href="https://agentmods.dev/skills/yaklang/hack-skills/race-condition"><img src="https://agentmods.dev/badge/skills/yaklang/hack-skills/race-condition.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00050 $0.05005
Opus 5 $0.00025 $0.02502
Sonnet 5 $0.00010 $0.01001
Haiku 4.5 $0.00005 $0.00500

Measured 3d ago against content hash 2fc1e1623968, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

race-condition scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/race-condition/SKILL.md · 527 lines

How it starts

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

SKILL: Race Conditions — Testing & Exploitation Playbook

AI LOAD INSTRUCTION: Treat race conditions as authorization/state integrity issues: non-atomic read-then-write lets multiple requests observe stale state. Prioritize one-time or balance-like operations. Combine parallel transport (HTTP/1.1 last-byte sync, HTTP/2 single-packet, Turbo Intruder gates) with application evidence (duplicate success responses, inconsistent balances, duplicate ledger rows). Authorized testing only. Routing note: for business workflows, coupons, inventory, or one-time rewards, start with this skill and cross-load business-logic-vulnerabilities.


0. QUICK START — What to Test First

Target endpoints where check and update are unlikely to be a single atomic database operation:

Priority Operation class Example paths / parameters
1 One-time redeem / coupon / bonus redeem, apply_coupon, claim_reward, voucher
2 Balance / quota / stock deduction transfer, purchase, reserve, inventory
3 Invite / referral / signup bonus invite_accept, referral_claim
4 Password / email / MFA verification verify_token, confirm_email, reset_password
5 Idempotent-looking APIs without strong keys POST that should succeed only once per user

First moves (conceptual):

  1. Capture the state-changing request in a proxy.
  2. Send 20–100 copies as simultaneously as your tooling allows.
  3. Classify outcome: 0/1 expected successes vs N successes or inconsistent final state.

1. CORE CONCEPT

1.1 TOCTOU (Time-of-check to time-of-use)

Thread A                    Thread B
   |                            |
   +-- CHECK (resource OK)      |
   |                            +-- CHECK (resource OK)  ← both see "OK"
   +-- USE / UPDATE             |
   |                            +-- USE / UPDATE           ← duplicate effect

Read the full file on GitHub · 527 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. 3d ago First seen · 527 lines · 50 tokens per session scan A 2fc1e1623968

Subscribe to this mod's changes

race-condition is a skill published in the GitHub repository yaklang/hack-skills (2,098 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 5,005 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

neuron-evaluation-engineer

Create and run AI evaluations with datasets, assertions, and output drivers in Neuron AI. Use this skill whenever the user mentions evaluation, testing AI systems, creating evaluators, dataset-driven testing, assertion-based validation, or wants to measure AI system performance. Also trigger for tasks involving…

neuron-core/neuron-ai · 77 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens

skill-benchmark

Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.

HoangNguyen0403/agent-skills-standard · 16 tokens