state-concurrency-auditor

state-concurrency-auditor is an agent for Claude Code from vigolium/piolium. It costs 99 tokens per session (2,947 once invoked), scanned A, original, MIT.

A security-audit agent that examines how shared data changes over time, especially during concurrent requests or repeated operations.

In plain words
What is it for?
Use it to inspect status fields, balances, idempotency records, transactions, and other shared state for race conditions and business-logic errors.
Why use it?
Bugs involving timing can cause double spending, stale data, broken state transitions, or failed duplicate-request handling even when individual functions look correct.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Good fit Use it to inspect status fields, balances, idempotency records, transactions, and other shared state for race conditions and business-logic errors.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vigolium/piolium/state-concurrency-auditor
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.

Clone the repo
git clone --depth 1 https://github.com/vigolium/piolium

Made for: Claude Code.

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 state-concurrency-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/vigolium/piolium/state-concurrency-auditor.svg)](https://agentmods.dev/agents/vigolium/piolium/state-concurrency-auditor)
Your own site
<a href="https://agentmods.dev/agents/vigolium/piolium/state-concurrency-auditor"><img src="https://agentmods.dev/badge/agents/vigolium/piolium/state-concurrency-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,947 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.00099 $0.02947
Opus 5 $0.00049 $0.01473
Sonnet 5 $0.00020 $0.00589
Haiku 4.5 $0.00010 $0.00295

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

Security

Grade A, and why

state-concurrency-auditor 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.

agents/state-concurrency-auditor.md · 239 lines

How it starts

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

You are the state & concurrency auditor for Phase 7. You reason over temporal ordering and shared mutable state — abstractions that syntactic SAST and per-component hypothesis generation systematically miss. Race conditions, double-spend, stale-read bugs, and idempotency gaps are your remit.

Context Loading

Read, in order:

  1. piolium/attack-surface/knowledge-base-report.md — sections ## Architecture Model, ## DFD/CFD Slices, ## Data Stores, ## Domain Attack Research (focus on business-logic and transaction subsections), ## High-Risk DFD Slices.
  2. piolium/codeql-artifacts/entry-points.json and sinks.json if present — Phase 4 already catalogued write operations; you layer temporal reasoning on top.
  3. Migration / schema files in the target repo (ORM migrations, SQL schema files) — the authoritative source for state-holding columns.

If the KB has no data-store or architecture sections, stop and write ## State & Concurrency Audit\n\nSkipped — Phase 3 KB lacks the required data-store / architecture sections. to the KB, then exit.

Step 1 — Discover State-Holding Entities

1a. Schema-level state columns

From migration files / schema SQL / ORM model files, extract columns whose names match:

status, state, lifecycle_stage, phase, step, workflow_state
approved_at, rejected_at, deleted_at, archived_at, published_at, locked_at, verified_at
is_active, is_deleted, is_published, is_locked, is_verified
enum fields (PostgreSQL ENUM, MySQL ENUM, application-level choice fields)

For each state column discovered, record: table, column, allowed values (if enumerated), and the model/ORM class that owns it.

1b. Financial / quota / capacity entities

balance, credit, debit, quota, limit, allowance, remaining, available
tokens, points, coins, gems, stars (virtual currency)
inventory, stock, count, supply

These are high-impact state: a TOCTOU here is a double-spend.

1c. Idempotency / dedup infrastructure

Search for:

idempotency_key, idempotent_id, request_id (stored, not logged)
redis keys named *dedupe*, *idempotent*, *seen*
tables named idempotency_*, request_log, processed_events
nonce, jti (JWT ID), event_id (for webhook dedup)

Read the full file on GitHub · 239 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 · 239 lines · 99 tokens per session scan A 84268ff0be82

Subscribe to this mod's changes

state-concurrency-auditor is an agent published in the GitHub repository vigolium/piolium (134 stars, last pushed 1mo ago), licensed MIT. It adds 99 tokens to every session and 2,947 once invoked, about $0.0005 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-30.

Related

Other agents, from other repositories

MS-SQL Database Administrator

Work with Microsoft SQL Server databases using the MS SQL extension.

github/awesome-copilot · 18 tokens

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking. Automatically scans Core Data code for the 5 most critical safety violations - schema migration risks, thread-confinement errors, N+1 query patterns, production data loss risks, and performance issues…

CharlesWiltgen/Axiom · 261 tokens

lens

Turns raw data into actionable decisions — dashboards, metric definitions, SQL analytics, funnel and cohort analysis across BI platforms. Use when designing a dashboard, defining KPIs, or running funnel analysis. Trigger with "design a dashboard", "analyze our funnel".

jeremylongshore/tons-of-skills-marketplace · 53 tokens

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

django-migrations-specialist

Database specialist for Django, runs in the "database" extra phase after development. Finalizes model field types and Meta indexes/constraints, runs makemigrations, reviews generated SQL with sqlmigrate, runs migrate, verifies with migrate --check. Do NOT use for: application logic (django-architect), tests…

AratKruglik/claude-sdlc · 85 tokens

sql-expert

Usa este agente para cualquier tarea relacionada con base de datos en FacturaScripts: diseñar esquemas de tabla XML, optimizar consultas con DbQuery y Where, crear índices y constraints, escribir migraciones SQL, analizar rendimiento de queries, usar transacciones, trabajar con DataBaseWhere/DataBase/DbQuery, diseñar…

FacturaScripts/fs-claude-plugin · 102 tokens