erc1271-revert-data-check

erc1271-revert-data-check is a skill for Claude Code, Codex from mtarcure/claude-vibe-squad. It costs 81 tokens per session (709 once invoked), scanned A, original, MIT.

A smart-contract audit check for incorrect ERC-1271 signature validation. ERC-1271 lets a contract wallet approve a signature, and the check looks for code that treats a failed call with a special error value as approval.

In plain words
What is it for?
It helps review Solidity code that calls isValidSignature through a low-level call and decodes the returned data.
Why use it?
A faulty check can let an attacker make an invalid signature look valid and authorize transfers from a contract wallet.

Skill for Claude CodeCodex

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

Good fit It helps review Solidity code that calls isValidSignature through a low-level call and decodes the returned data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mtarcure/claude-vibe-squad/erc1271-revert-data-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 erc1271-revert-data-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 erc1271-revert-data-check

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/erc1271-revert-data-check"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/erc1271-revert-data-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 709 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.00081 $0.00709
Opus 5.5 $0.00032 $0.00284
Sonnet 5.5 $0.00016 $0.00142
Haiku 4.5 $0.00008 $0.00071

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

Security

Grade A, and why

erc1271-revert-data-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/erc1271-revert-data-check/SKILL.md · 43 lines

How it starts

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

ERC-1271 Revert-Data Confusion Check

Audit smart-contract-wallet signature validation for the "revert-data trick": a low-level staticcall/call to isValidSignature(hash,sig) whose EVM success flag is ignored, so an attacker-deployed verifier that reverts with the ERC-1271 magic value (0x1626ba7e) in its revert reason is misread as a valid signature — authorizing a drain.

Source: corpus A §I.3 — ChainSecurity / Zodiac Roles Modifier / Gnosis Pay, June 2026 (~$1.5M). Impact class: funds theft / full wallet drain (intrinsic — clears the impact bar). Governing method: a Phase-3a hypothesis lane of systematic-attacking; emits a lead only — it re-enters the Phase 4–8 verification spine (runnable PoC on a mainnet fork, negative control, G1–G4, cross-family repro) before it is ever a finding.

Method

  1. Grep the target for every ERC-1271 consumer: isValidSignature, the 0x1626ba7e magic value, and low-level staticcall/call into a signer address (slither, semgrep custom rule, cast for on-chain bytecode).
  2. For each call site, confirm the code checks the call's success boolean BEFORE decoding returnData. The bug pattern is (, bytes memory ret) = signer.staticcall(...) followed by ret[:4] == MAGIC with the success flag discarded, or an assembly { returndatacopy } that never checks success.
  3. Build the differential PoC in Foundry: deploy a malicious verifier that reverts with abi.encode(0x1626ba7e) (or raw bytes) in its reason; call the target's auth path with it as the declared signer.
  4. forge test on an anvil --fork of the real deployment: assert the drain succeeds against the live contract state, then assert a success-checked reference implementation rejects it (link-level negative control).
  5. Add a halmos/forge invariant: "no auth path accepts a signature whose verifier call returned success == false."

Acceptance

  • Every ERC-1271 / low-level-signer call site is enumerated with its success-flag handling classified.
  • The PoC drains against a real mainnet fork, not a mock, and the negative control (success-checked variant) rejects the same input.
  • Finding names the exact call site, the ignored success flag, and the realized fund impact; it is deduped against prior Zodiac/ERC-1271 disclosures before submission.

Read the full file on GitHub · 43 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 · 43 lines · 81 tokens per session scan A b09695cfb103

Subscribe to this mod's changes

erc1271-revert-data-check is a skill published in the GitHub repository mtarcure/claude-vibe-squad (165 stars, last pushed 1mo ago), licensed MIT. It adds 81 tokens to every session and 709 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.