read-only-reentrancy-check

read-only-reentrancy-check is a skill for Claude Code, Codex from mtarcure/claude-vibe-squad. It costs 82 tokens per session (628 once invoked), scanned A, original, MIT.

A smart-contract security check for values read while a decentralised-finance protocol is partway through an operation. Decentralised finance, or DeFi, uses blockchain contracts for activities such as lending, trading, and vaults.

In plain words
What is it for?
It is for reviewing pricing, share-value, collateral, and reserve-related view functions in connected DeFi protocols. It maps external readers and tests whether callbacks can observe unsafe intermediate state.
Why use it?
A temporary, inconsistent value can be read through a callback even when writes are protected, causing another protocol to price assets incorrectly. The check looks for consumers that trust such exposed values.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit It is for reviewing pricing, share-value, collateral, and reserve-related view functions in connected DeFi protocols. It maps external readers and tests whether callbacks can observe unsafe intermediate state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check
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 mtarcure/claude-vibe-squad --skill read-only-reentrancy-check
Clone the repo
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad

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 read-only-reentrancy-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check/github.svg)](https://agentmods.dev/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check)
Your own site
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check/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 read-only-reentrancy-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 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.00082 $0.00628
Opus 5.5 $0.00033 $0.00251
Sonnet 5.5 $0.00016 $0.00126
Haiku 4.5 $0.00008 $0.00063

Measured 1mo ago against content hash ec25a44c397e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

read-only-reentrancy-check 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 1mo 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/skills/read-only-reentrancy-check/SKILL.md · 42 lines

How it starts

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

Read-Only Reentrancy Check

Audit composable DeFi integrations for read-only reentrancy: while a protocol is mid-operation (its state temporarily inconsistent and its non-reentrant write guard held), an attacker re-enters through an ERC-721/1155/777 receiver hook or a native-transfer callback and reads a view function (price, share value, collateral ratio) that returns a skewed value, which a second consuming protocol trusts to over-borrow, mint, or liquidate.

Source: corpus A §III.3 (OWASP SC08 read-only reentrancy) — strategy-to-vault state mismatches in composable lending/AMM stacks. Impact class: funds theft / vault drain via mispriced valuation (intrinsic). Governing method: Phase-3a hypothesis lane of systematic-attacking; leads only into the verification spine.

Method

  1. Identify every externally-callable view function used by other protocols for pricing/valuation (get_virtual_price, getReserves-derived quotes, share-to-asset conversions). slither + manual mapping of cross-protocol consumers.
  2. For each, check whether it can be read while the owning protocol holds only a write-side nonReentrant guard (no read guard) during an operation that hands control to the caller (token callbacks, ETH transfers, remove_liquidity).
  3. Map the consumer: a second protocol that reads that view mid-callback and acts on it (borrow, mint, liquidate).
  4. PoC on anvil --fork: trigger the owning op, re-enter via the receiver hook, read the skewed view, and execute the over-borrow/mint on the consumer in the same transaction. Link-level negative control = the same read outside the reentrant window returns the correct value and the consumer action reverts/nets zero.
  5. Add a medusa/echidna property spanning both protocols: "consumer valuation reads are never served from an inconsistent mid-operation state."

Acceptance

  • Cross-protocol valuation views are enumerated with their reentrancy-window exposure classified.
  • The PoC realizes a fund loss on a real fork by reading a skewed view mid-callback; the outside-window negative control does not.
  • Finding names the view, the reentrancy window, and the consuming protocol; deduped before submission.

Read the full file on GitHub · 42 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. 1mo ago First seen · 42 lines · 82 tokens per session scan A ec25a44c397e

Subscribe to this mod's changes

read-only-reentrancy-check is a skill published in the GitHub repository mtarcure/claude-vibe-squad (165 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 628 once invoked, about $0.0003 per session on Opus 5.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-19.