# Erc1271 revert data check

> Erc1271 revert data check is an open-source agent skill for security. Checks whether a contract's ERC-1271 signature validation can be fooled by revert data. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/mtarcure/claude-vibe-squad/tree/main/.agents/skills/erc1271-revert-data-check
- **Repository:** https://github.com/mtarcure/claude-vibe-squad
- **GitHub stars:** 227
- **License:** MIT
- **Skill name:** erc1271-revert-data-check
- **Collection:** https://github.com/mtarcure/claude-vibe-squad
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill guides an agent through auditing smart-contract wallet signature checks for a specific flaw: a low-level call to isValidSignature whose success flag is ignored, so a verifier that reverts with the 0x1626ba7e magic value is accepted as valid. The workflow starts by locating every ERC-1271 consumer and low-level call into a signer address, then checks whether success is tested before the return data is decoded.

For each suspicious call site, the skill describes building a differential proof of concept in Foundry: deploying a malicious verifier that reverts with the magic value, running the target's authorization path against a mainnet fork, and confirming that a success-checked reference implementation rejects the same input. It also suggests an invariant stating that no authorization path accepts a signature whose verifier call returned false.

The skill expects a Solidity codebase, Foundry and anvil for forked testing, and optionally slither, semgrep, cast or halmos. Its output is framed as a lead to be verified rather than a confirmed finding.

## When your agent uses it

> Use when a contract validates a smart-contract-wallet signature by low-level-calling isValidSignature and you suspect the revert-data trick — the call's EVM success flag is discarded, so an attacker-deployed verifier that reverts with the 0x1626ba7e magic value in its reason is misread as a valid signature and authorizes a drain.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/mtarcure/claude-vibe-squad/tree/HEAD/.agents/skills/erc1271-revert-data-check)
- [License: MIT](https://github.com/mtarcure/claude-vibe-squad/tree/HEAD/.agents/skills/erc1271-revert-data-check)

## Features

- **Signer call enumeration:** Locates every ERC-1271 consumer and low-level staticcall or call into a signer address.
- **Success flag classification:** Checks whether each call site tests the call's success boolean before decoding return data.
- **Malicious verifier PoC:** Describes a Foundry test with a verifier that reverts with the magic value to exercise the auth path.
- **Mainnet fork validation:** Runs the drain test against live contract state on an anvil fork alongside a negative control.
- **Invariant suggestion:** Proposes a forge or halmos invariant that rejects signatures whose verifier call failed.

## Good for

- Audit a Gnosis Safe module for ERC-1271 revert-data confusion
- Find low-level signer calls that ignore the success flag
- Write a Foundry proof of concept for a fake isValidSignature verifier
- Add an invariant that rejects signatures from failed verifier calls

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/erc1271-revert-data-check` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/erc1271-revert-data-check &&
cp -R "$tmp/.agents/skills/erc1271-revert-data-check" ~/.claude/skills/erc1271-revert-data-check &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/erc1271-revert-data-check` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/erc1271-revert-data-check` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/erc1271-revert-data-check &&
cp -R "$tmp/.agents/skills/erc1271-revert-data-check" ~/.agents/skills/erc1271-revert-data-check &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/erc1271-revert-data-check` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/erc1271-revert-data-check` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/erc1271-revert-data-check &&
cp -R "$tmp/.agents/skills/erc1271-revert-data-check" ~/.cursor/skills/erc1271-revert-data-check &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/erc1271-revert-data-check` inside it instead.

### Gemini CLI

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

```sh
gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .agents/skills/erc1271-revert-data-check
```

Or copy the folder to `~/.gemini/skills/erc1271-revert-data-check` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/erc1271-revert-data-check`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/erc1271-revert-data-check &&
cp -R "$tmp/.agents/skills/erc1271-revert-data-check" ~/.copilot/skills/erc1271-revert-data-check &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/erc1271-revert-data-check` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git
```

Then copy `claude-vibe-squad/.agents/skills/erc1271-revert-data-check` into your agent's skills folder as `erc1271-revert-data-check`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It expects a Solidity codebase and uses Foundry with anvil for forked tests, with optional slither, semgrep, cast or halmos for scanning and invariants.

### What does Erc1271 revert data check change in my code?

The skill describes auditing and writing tests and invariants; it does not state that it modifies contract source.

### When does Erc1271 revert data check trigger?

It is meant for cases where a contract validates smart-contract-wallet signatures with a low-level call to isValidSignature and the success flag may be discarded.

### Does Erc1271 revert data check produce confirmed vulnerabilities?

No. It emits leads that must go through a separate verification process, including a runnable proof of concept and a negative control, before being treated as findings.

### How do I install Erc1271 revert data check in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/erc1271-revert-data-check to use it in all your projects, or to .claude/skills/erc1271-revert-data-check in one project.

### Does Erc1271 revert data check 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 Erc1271 revert data check?

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 Erc1271 revert data check?

The closest alternatives to Erc1271 revert data check are Signature validation audit, Defi invariant check, Read only reentrancy check, Defi amm security and Evm audit flow.

## Where this comes from

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

## Alternatives

- [Signature validation audit](https://ai-powered.com/skills/signature-validation-audit): Signature validation audit is an open-source agent skill for security.
- [Defi invariant check](https://ai-powered.com/skills/defi-invariant-check): Defi invariant check is an open-source agent skill for security.
- [Read only reentrancy check](https://ai-powered.com/skills/read-only-reentrancy-check): Read only reentrancy check is an open-source agent skill for security.
- [Defi amm security](https://ai-powered.com/skills/defi-amm-security): Defi amm security is an open-source agent skill for security.
- [Evm audit flow](https://ai-powered.com/skills/evm-audit-flow): Evm audit flow is an open-source agent skill for security.
- [Cross chain bridge audit](https://ai-powered.com/skills/cross-chain-bridge-audit): Cross chain bridge audit is an open-source agent skill for security.
- [Chain construct smart contract](https://ai-powered.com/skills/chain-construct-smart-contract): Chain construct smart contract is an open-source agent skill for security.
- [Token integration analyzer](https://ai-powered.com/skills/token-integration-analyzer): Token integration analyzer is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/erc1271-revert-data-check
