Skip to content
Skill

Sh kb race conditions

Guides an agent to hunt race conditions and TOCTOU flaws in code and apps

Sh kb race conditions is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
44
Last commit
License
MIT
Listing updated

Similar skills

About Sh kb race conditions

This knowledge base equips an agent to find concurrency bugs where a check and the action that depends on it are not atomic, so parallel requests can slip past limits. It covers double-spend, quota and attempt-counter bypass, reuse of single-use tokens, and filesystem time-of-check to time-of-use issues. It sets out patterns to grep for, such as read-then-write sequences and missing row locks or unique constraints, and lists the guards that make a path safe.

The skill walks the agent through a detection routine: map state-changing operations on shared resources, check whether each check-and-act is atomic, consider whether the endpoint is reachable concurrently and whether the guard holds across replicas, and confirm the ordering of irreversible side effects. It also suggests variant hunting across sibling paths and helper callers, and includes false-positive filters for atomic updates, constraints and serialized queues.

For evidence, it describes how to build a proof of concept with many simultaneous requests, including single-packet and last-byte synchronization techniques over HTTP/2 and HTTP/1.1. It also includes defender-oriented detection signals and mitigation guidance. It assumes a codebase or application to review and an agent able to read source and send HTTP requests.

When your agent uses it

Knowledge base for finding race conditions and TOCTOU flaws - concurrent requests exploiting non-atomic check-then-act logic (double-spend, limit bypass, single-use token reuse, balance manipulation, file TOCTOU). Use when hunting concurrency/business-logic race bugs. CWE-362/367/366, OWASP A04:2021-Insecure Design.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (10 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the indra plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra

Or copy only this skill to ~/.claude/skills/sh-kb-race-conditions:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sh-kb-race-conditions &&
cp -R "$tmp/plugins/indra/skills/sh-kb-race-conditions" ~/.claude/skills/sh-kb-race-conditions &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/sh-kb-race-conditions inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/sh-kb-race-conditions to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sh-kb-race-conditions &&
cp -R "$tmp/plugins/indra/skills/sh-kb-race-conditions" ~/.agents/skills/sh-kb-race-conditions &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/sh-kb-race-conditions inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/sh-kb-race-conditions to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sh-kb-race-conditions &&
cp -R "$tmp/plugins/indra/skills/sh-kb-race-conditions" ~/.cursor/skills/sh-kb-race-conditions &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/sh-kb-race-conditions inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-kb-race-conditions

Or copy the folder to ~/.gemini/skills/sh-kb-race-conditions yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/sh-kb-race-conditions:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sh-kb-race-conditions &&
cp -R "$tmp/plugins/indra/skills/sh-kb-race-conditions" ~/.copilot/skills/sh-kb-race-conditions &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/sh-kb-race-conditions inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git

Then copy indra/plugins/indra/skills/sh-kb-race-conditions into your agent's skills folder as sh-kb-race-conditions. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Check-then-act detection
Explains how to spot read-modify-write sequences on balances, coupons, tokens and counters that lack atomic guards.
Filesystem TOCTOU coverage
Covers races between existence checks and file opens, symlink swaps and predictable temporary names.
Database guard recognition
Lists locking, constraint and atomic-update idioms across common frameworks and databases to tell safe code from racy code.
Concurrent exploit technique
Describes synchronized parallel request methods to widen narrow race windows during proof-of-concept testing.
False-positive filters
Gives criteria for dismissing findings where updates are atomic, constrained or serialized.
Defender detection signals
Outlines log patterns and behavioral alerts that reveal repeated use of single-use objects.

Good for

  • Check whether a coupon or gift card can be redeemed twice by parallel requests
  • Find withdrawal or transfer endpoints that can overdraw an account
  • Test whether login or OTP attempt limits can be bypassed with concurrent attempts
  • Review file handling code for exists-then-open time-of-check to time-of-use bugs
  • Audit password reset and magic-link tokens for reuse under concurrency

Sh kb race conditions FAQ

What does Sh kb race conditions change in the agent's behavior?

It adds a structured approach for hunting race conditions and TOCTOU flaws, including patterns to grep for, a detection recipe, false-positive filters and guidance for building concurrent proofs of concept.

Does Sh kb race conditions include scripts or tools?

No scripts are included. It mentions tools such as Burp Repeater and Turbo Intruder as options for sending parallel requests.

What kinds of race bugs does Sh kb race conditions cover?

Double-spend, limit and quota bypass, single-use token reuse, balance manipulation, uniqueness checks without constraints, idempotency gaps and filesystem TOCTOU.

Is Sh kb race conditions only for offensive testing?

No. It includes detection signals for defenders and mitigation guidance such as atomic updates, constraints, row locking and exclusive file creation.

How do I install Sh kb race conditions in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sh-kb-race-conditions to use it in all your projects, or to .claude/skills/sh-kb-race-conditions in one project. Or install the indra plugin, which includes it: /plugin marketplace add dmdhrumilmistry/indra, then /plugin install indra@indra.

Does Sh kb race conditions run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Sh kb race conditions?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Sh kb race conditions?

The closest alternatives to Sh kb race conditions are Sh kb business logic, Web app logic, Sh kb access control, Sh kb crypto and Sh kb path traversal.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from dmdhrumilmistry/indra

  1. Lets an agent triage SIEM alerts and logs, sweep indicators and build evidenced timelines

    • Open source
    • 44 GitHub stars
    • Security
  2. Gives a security review agent persistent Markdown memory of past findings and learnings

    • Open source
    • 44 GitHub stars
    • Knowledge and memory
  3. Security-reviews a GitHub pull request and reports findings as inline comments

    • Open source
    • 44 GitHub stars
    • Developer tools
  4. Publishes security review findings as de-duplicated Jira, GitHub, Confluence or Notion

    • Open source
    • 44 GitHub stars
    • Knowledge and memory
  5. Plans and runs approved purple-team tests to check whether SIEM detections fire

    • Open source
    • 44 GitHub stars
    • Security
  6. Re-checks one earlier security finding against current code or recorded traffic

    • Open source
    • 44 GitHub stars
    • Security