Concurrent counter

From zakirkun/ice-tea · View interactive version

Concurrent counter is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects concurrent counter increments and decrements without atomic operations or mutex protection.

How to use this skill

Skill file

Non-Atomic Counter Race Condition

Overview

Incrementing/decrementing shared counters (count++, balance += amount) without atomic operations creates race conditions where concurrent updates lose some increments, leading to incorrect values. This affects rate limiters, inventory counters, and financial balances.

Remediation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.