race-conditions

race-conditions is a skill for Claude Code from emre-guler/websec. It costs 89 tokens per session (5,893 once invoked), scanned A, original, MIT.

A security check for race conditions, where overlapping requests can act between a condition check and the state change that follows. The result can depend on request timing rather than the intended rule.

In plain words
What is it for?
Use it to review coupon and gift-card redemption, stock changes, transfers, rate limits, per-user caps, object creation, and session, cache, or database updates split across several steps.
Why use it?
It helps find operations that are safe one at a time but fail when requests run concurrently. This can allow repeated redemptions, overspending, exceeded limits, or partially created records.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the websec plugin — 36 skills, 2 agents shipped together

Good fit Use it to review coupon and gift-card redemption, stock changes, transfers, rate limits, per-user caps, object creation, and session, cache, or database updates split across several steps.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add emre-guler/websec
Claude Code
/plugin install websec

Made for: Claude Code.

Or install websec, the plugin that ships this one along with the rest of its 36 skills, 2 agents.

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-conditions

README.md
[![agentmods](https://agentmods.dev/badge/skills/emre-guler/websec/race-conditions/github.svg)](https://agentmods.dev/skills/emre-guler/websec/race-conditions)
Your own site
<a href="https://agentmods.dev/skills/emre-guler/websec/race-conditions"><img src="https://agentmods.dev/badge/skills/emre-guler/websec/race-conditions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for race-conditions

Your own site · 80×15
<a href="https://agentmods.dev/skills/emre-guler/websec/race-conditions"><img src="https://agentmods.dev/badge/skills/emre-guler/websec/race-conditions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,893 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.00089 $0.05893
Opus 5 $0.00044 $0.02946
Sonnet 5 $0.00018 $0.01179
Haiku 4.5 $0.00009 $0.00589

Measured 8d ago against content hash 5944715e7586, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

race-conditions 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 8d 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.

skills/race-conditions/SKILL.md · 168 lines

How it starts

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

Race Conditions Detection

Overview

A race condition is a timing flaw: the application validates a condition at one instant and acts on it at a slightly later instant, and in the interval between the two it is in a temporary, inconsistent sub-state. Because the outcome depends on how concurrent requests interleave rather than on what any one request contains, a rule that holds perfectly for sequential traffic collapses under overlapping requests. These flaws sit in the server-side path between a check and the commit it authorises, and in any place where composite state is written one piece at a time. The attacker is an ordinary user who can send many requests at once with tight timing, so that two of them both pass the check before either performs the update. What they gain mirrors whatever the guarded operation protects: a single-use code redeemed many times, a balance overdrawn, a cap exceeded, a rate limit or challenge defeated, or an object caught half-initialised and used as an identity. This skill finds such flaws by locating every non-atomic check-then-act site, checking each one in parallel, and merging the results into <output_dir>/race-conditions-results.md.

What it is NOT

  • Business logic (/websec:business-logic): a logic flaw is exploitable with one ordinary sequence of requests. Test: if you can describe the exploit without any two requests overlapping, it is a logic flaw, not a race. A missing limit is logic; a limit that exists but is momentarily stale is a race.
  • Access control (/websec:access-control): those are checks that are absent or wrong and reproduce sequentially. Here the check exists and is correct — it is simply read from state that another request is about to change.
  • Authentication (/websec:authentication): a login handler that passes through a window where the session is authenticated but a second factor is not yet enforced is judged here, as a sub-state. A missing or weak factor, or a guessable credential, is not. Predictable token generation is theirs: claim it here only when two overlapping requests collide and are handed the same token, and describe the overlap — a token that is weak on its own, issued one request at a time, is not a race.
  • Deadlocks, lost updates in reporting, and performance issues: a concurrency bug is in scope only when the contended value carries money, entitlement, identity, or a security limit.
  • Not a finding: a check-then-act pair on state only that caller can reach, where no second party and no second session of the same party can contend for the record; a read-modify-write already wrapped in one transaction whose lock covers the read; an operation whose duplicate execution is idempotent and provably harmless.
  • Not proof of safety: apparent serialisation. A framework that locks one request per session makes the race invisible to a naive test while leaving it fully exploitable from two sessions. Record it as a mitigating factor, never as the control.

Read the full file on GitHub · 168 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. 8d ago First seen · 168 lines · 89 tokens per session scan A 5944715e7586

Subscribe to this mod's changes

race-conditions is a skill published in the GitHub repository emre-guler/websec (2 stars, last pushed 12d ago), licensed MIT. It adds 89 tokens to every session and 5,893 once invoked, about $0.0004 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-08-31.

Related

Other skills, from other repositories

ponytail-sec-audit

Full project security audit. Scans the entire codebase across three passes: code that shouldn't exist, all dependencies assessed, all hardening findings. Produces a comprehensive numbered report with blast-radius narrative. Persists findings to .ponytail-sec/ for cross-scan tracking. For per-diff review use…

andypitcher/ponytail-sec · 74 tokens

ponytail-sec

Security companion for active development. Scopes to the current diff or changed files. Three passes: YAGNI code review, new-dep assessment, and up to 3 material hardening findings. Lean by design — surfaces the one thing to fix before merging, not a backlog. Use ponytail-sec-audit for a full project scan.

andypitcher/ponytail-sec · 74 tokens

dockerfile

Binary Dockerfile image-build hardening check. Use when reviewing Dockerfiles, container image builds, multi-stage builds, runtime users, pinned bases, or reproducible dependency installs. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 51 tokens

k8s-securitycontext

Binary Kubernetes securityContext hardening check. Use when reviewing Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Helm templates, or Kubernetes manifests that define containers. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 57 tokens

Mixed-Language Monorepos

This skill should be used when the user is auditing a "polyglot monorepo", "multi-language codebase", "microservices with different languages", "Go + Python + TypeScript", or any codebase with services written in different programming languages. Provides strategies for cross-service security analysis and unified…

allsmog/vuln-scout · 71 tokens

OWASP API Security Top 10

This skill should be used when the user asks about "API security", "OWASP API Top 10", "BOLA", "broken object level authorization", "API authentication", "mass assignment", "GraphQL security", "gRPC security", "rate limiting", "API abuse", "REST API vulnerabilities", or needs to identify API-specific security issues…

allsmog/vuln-scout · 85 tokens