⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v0.1.0

revertwtf-agent-api

mrtdlgc@mrtdlgc⭐ 4 stars· last commit 4mo ago· 2 open issues

Use revert.wtf safely from agents, tools, browsers, or integrations through bounded HTTP APIs, MCP tools, and lightweight package subpaths without downloading the full catalog into client bundles.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐ 4 on GitHubGitHub ↗

New / niche

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

revert.wtf

EVM errors should not be this vague.

Paste a revert, RPC error, ethers/viem exception, simulation/debug trace, or ERC-4337 failure. revert.wtf explains what it likely means, why it happened, and what to check next.

The project includes a reusable error catalog for protocols and products, a CLI, a website, an MCP server for agents, and repo-local OpenClaw skill files for agents working on the catalog or integration code.

Monorepo

apps/web                  Next.js website (paste-box, encyclopedia, tools, docs)
packages/core             Shared types and result models
packages/catalog          Curated error catalog (JSON)
packages/parser           Normalizer, revert-data extractor, decoder, explain()
packages/selectors        Built-in selector / signature lookup
packages/aa               ERC-4337 AA code + EntryPoint FailedOp decoder
packages/client           Tiny fetch SDK for browser-safe hosted API calls
packages/search           SQLite FTS catalog index for server-side search
packages/cli              Local command-line decoder
packages/mcp              Read-only MCP server for agents
skills/*                  OpenClaw workspace skills for repo-specific agents

Every package can be imported standalone. The website is just one consumer.

Quickstart

Requires Node.js 20.10+ and pnpm 9.

pnpm install
pnpm build
pnpm dev          # apps/web on http://localhost:3000
pnpm test
pnpm validate:catalog
pnpm catalog:duplicates

Use the packages directly

import { explain } from "@revertwtf/parser/explain";

const result = explain({
  code: -32603,
  message: "Internal JSON-RPC error",
  data: { code: 3, data: "0x08c379a0..." }
});

explain() also accepts structured simulator/debugger payloads. If the object contains a failed call frame under paths like trace, calls, or stack, the parser surfaces the failing frame before the generic wrapper error.

Browser bundle note

The full catalog-backed explainer intentionally ships a large dataset. In browser apps, call @revertwtf/parser/explain from your server/API layer rather than importing it into client bundles. For smaller browser-safe helpers, use subpath imports such as:

import { describePanic } from "@revertwtf/catalog/panic";
import { decodeRevertData } from "@revertwtf/parser/decode";
import { listKnownAACodes } from "@revertwtf/aa/parse";
import { createRevertClient } from "@revertwtf/client";

@revertwtf/catalog and @revertwtf/parser/explain are the full-data surfaces; the subpaths above are meant to keep accidental client payloads small.

See docs/package-imports.md for the package import guide.

CLI

revertwtf decode 0x4e487b71...
revertwtf explain ./error.json
revertwtf aa "AA23 reverted or OOG"

MCP Server

pnpm --filter @revertwtf/mcp build
pnpm --filter @revertwtf/mcp start

The MCP server gives agents a focused place to look up EVM, RPC, provider, wallet, ERC-4337, Blockscout, and x402 payment/facilitator errors instead of doing a broad web search.

OpenClaw Skills

Repo-local OpenClaw skills live under skills/<skill>/SKILL.md. They cover catalog work, ecosystem research, parser/decoder changes, MCP maintenance, frontend product UI, and release-readiness checks.

The skills are instruction-only and can be submitted to OpenClaw/ClawHub once the GitHub repository is public.

Deploy via Coolify

The repository ships a multi-stage Dockerfile that builds every package and the standalone Next.js output. Point a Coolify Dockerfile resource at this repo. Default port: 3000. The image includes the generated SQLite catalog search DB and uses /data/revertwtf/ratelimit.sqlite for hosted API rate limits.

License

MIT. Contribute catalog entries via PR.

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/revertwtf-agent-api/SKILL.md3.1 KBupstream ↗
    ---
    name: revertwtf-agent-api
    description: Use revert.wtf safely from agents, tools, browsers, or integrations through bounded HTTP APIs, MCP tools, and lightweight package subpaths without downloading the full catalog into client bundles.
    version: 0.1.0
    ---
    
    # revert.wtf Agent API Skill
    
    Use this skill when an agent needs to explain an EVM/RPC/provider/wallet/AA/x402 error, resolve a selector, search the catalog, or integrate revert.wtf into a product.
    
    ## Default Choice
    
    - Prefer MCP when the agent runtime supports MCP.
    - Prefer the website HTTP API when calling the hosted service from an agent or app backend.
    - Prefer package subpaths for local code.
    - Never import the full catalog-backed parser into browser/client bundles for one-off searches.
    
    ## MCP Tools
    
    Use bounded tools:
    
    - `explain_error` for raw errors, traces, JSON strings, revert bytes, and x402 payloads.
    - `search_catalog` for catalog discovery. It returns summaries with `limit`, `offset`, `totalMatches`, and `hasMore`.
    - `get_error` only after `search_catalog` returns a specific id.
    - `lookup_selector` for 4-byte selectors.
    - `decode_revert_data` for raw revert bytes.
    - `explain_aa_error` for AAxx and EntryPoint failures.
    - `search_blockscout_chains` and `get_blockscout_chain` for Blockscout registry checks.
    
    Do not request or construct an all-catalog dump. Page through summaries only when the user explicitly needs breadth.
    
    ## Hosted HTTP API
    
    POST JSON to the public web API from a server/agent context:
    
    ```bash
    curl -s https://revert.wtf/api/explain \
      -H "content-type: application/json" \
      -d '{"raw":"{\"code\":-32000,\"message\":\"nonce too low\"}"}'
    ```
    
    Useful endpoints:
    
    - `POST /api/explain` with `{ "raw": "..." }`
    - `POST /api/revert-decode` with `{ "data": "0x...", "abiText": "[...]" }`
    - `POST /api/aa-decode` with `{ "raw": "AA23 reverted or OOG" }`
    - `POST /api/selector` with `{ "selector": "0x08c379a0" }`
    - `POST /api/search` with `{ "query": "AA23", "limit": 20, "offset": 0 }`
    
    Inputs are capped for parsing. Do not paste private keys, seed phrases, access tokens, unreleased exploit details, or personal data.
    
    Use `/api/search` for discovery and `/api/explain` for a specific raw failure.
    Search returns summaries; fetch or explain the selected item instead of asking
    for broad payloads.
    
    ## Package Imports
    
    Use precise subpaths:
    
    ```ts
    import { explain } from "@revertwtf/parser/explain"; // server/API path
    import { decodeRevertData } from "@revertwtf/parser/decode";
    import { describePanic } from "@revertwtf/catalog/panic";
    import { listKnownAACodes } from "@revertwtf/aa/parse";
    import { searchCatalog } from "@revertwtf/search"; // server-side SQLite FTS
    ```
    
    Browser/client bundles should use small helpers or call an API route. Full-data surfaces such as `@revertwtf/catalog`, `@revertwtf/parser/explain`, and `@revertwtf/aa/explain` belong on a server/API boundary.
    
    For browser apps, prefer the lightweight SDK:
    
    ```ts
    import { createRevertClient } from "@revertwtf/client";
    
    const revert = createRevertClient();
    const result = await revert.searchCatalog({ query: "x402 payment required", limit: 5 });
    ```
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/mrtdlgc-revertwtf-skills-revertwtf-agent-api.md

// REPO STATS

4 stars
2 open issues
Last commit: 4mo ago