# Agent skill: x402 testing

> A free Agent Skill that teaches a coding agent to test x402 clients against hostile sellers, check x402 endpoints and debug x402 errors.

A skill is a short instruction file a coding agent loads when a task matches. This one tells the agent how to use the test endpoints, the checker, the error reference and the decoder on this site, so it tests x402 code properly without being told how.

## Install

Claude Code, for one project:

```bash
mkdir -p .claude/skills/x402-testing
curl -s https://x402testendpoint.com/skill.md -o .claude/skills/x402-testing/SKILL.md
```

To use it in every project, put it under the `.claude/skills` folder in your home directory instead. Other agents that read `SKILL.md` files work the same way.

## What the agent will do with it

- Run a payment client against the baseline endpoint, then against 6 hostile sellers it must refuse to pay, on Base Sepolia or Solana Devnet.
- Turn those scenarios into assertions in your test suite.
- Check a paid endpoint you are building and fix what the checker flags.
- Look up x402 error codes and decode headers while debugging.

## Read it first

The skill is plain Markdown at [/skill.md](https://x402testendpoint.com/skill.md). Read any skill before installing it; this one only describes HTTP calls to this site.

Prefer tools to instructions? The [MCP server](https://x402testendpoint.com/tools/mcp) exposes the same functions.

Source: https://x402testendpoint.com/tools/skill
