agentleFS
mrtdlgcmrtdlgc/revertwtf/skills/revertwtf-agent-api/SKILL.md

revertwtf-agent-api

Skill4 starsChanged 6 months agoMITView on GitHub

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.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when an agent needs to explain an EVM/RPC/provider/wallet/AA/x402 error, resolve a selector, search the catalog, or …

    line 9
  2. Distinctive:

    Prefer MCP when the agent runtime supports MCP.

    line 13
  3. Distinctive:

    Prefer the website HTTP API when calling the hosted service from an agent or app backend.

    line 14
  4. Distinctive:

    Prefer package subpaths for local code.

    line 15
  5. Distinctive:

    Never import the full catalog-backed parser into browser/client bundles for one-off searches.

    line 16
  6. Distinctive:

    Do not request or construct an all-catalog dump.

    line 30
  7. Very specific:

    Use /api/search for discovery and /api/explain for a specific raw failure.

    line 52
  8. Distinctive:

    Search returns summaries; fetch or explain the selected item instead of asking for broad payloads.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

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:

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:

import { createRevertClient } from "@revertwtf/client";

const revert = createRevertClient();
const result = await revert.searchCatalog({ query: "x402 payment required", limit: 5 });

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.