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.
npx skills add Dexter-DAO/opendexter-ide --skill x402-servergit clone --depth 1 https://github.com/Dexter-DAO/opendexter-ideWrote 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.
[](https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-server)<a href="https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-server"><img src="https://agentmods.dev/badge/skills/dexter-dao/opendexter-ide/x402-server/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.
<a href="https://agentmods.dev/skills/dexter-dao/opendexter-ide/x402-server"><img src="https://agentmods.dev/badge/skills/dexter-dao/opendexter-ide/x402-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00066 | $0.03066 |
| Opus 5 | $0.00033 | $0.01533 |
| Sonnet 5 | $0.00013 | $0.00613 |
| Haiku 4.5 | $0.00007 | $0.00307 |
Grade A, and why
x402-server 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.
@dexterai/x402 Server SDK
Protect any API endpoint with x402 payments. One-liner Express middleware or manual verify/settle control.
npm install @dexterai/x402
Express Middleware (Recommended)
One line to paywall any endpoint:
import express from 'express';
import { x402Middleware } from '@dexterai/x402/server';
const app = express();
app.get('/api/data',
x402Middleware({
payTo: 'YourSolanaAddress...',
amount: '0.01', // $0.01 USD per request
}),
(req, res) => {
// Only runs after successful payment
res.json({ data: 'premium content', payer: req.x402?.payer });
}
);
Multi-chain accept
Accept payments on multiple chains simultaneously:
app.get('/api/data',
x402Middleware({
payTo: {
'solana:*': 'SolanaAddress...',
'eip155:*': '0xEvmAddress...',
},
amount: '0.05',
network: ['eip155:8453', 'eip155:137', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp'],
}),
handler
);
Full X402MiddlewareConfig
| Option | Type | Default | Description |
|---|---|---|---|
payTo |
string / PayToProvider / Record | required | Recipient address, Stripe provider, or per-network map |
amount |
string | required | USD amount (e.g., "0.01" for 1 cent) |
network |
string / string[] | Solana mainnet | CAIP-2 network(s) to accept payments on |
asset |
{ address, decimals } | USDC | Token to accept |
facilitatorUrl |
string | https://x402.dexter.cash |
Facilitator for verify/settle |
description |
string | Human-readable resource description | |
resourceUrl |
string | request URL | Override resource URL |
mimeType |
string | Response MIME type | |
timeoutSeconds |
number | 120 | Payment timeout |
verbose |
boolean | false | Debug logging |
getAmount |
(req) => string | Dynamic amount per request | |
getDescription |
(req) => string | Dynamic description per request | |
getResourceUrl |
(req) => string | Dynamic resource URL per request | |
sponsoredAccess |
boolean / object | false | Enable ad injection into response body |
onSettlement |
(info) => void | Called after successful settlement | |
onVerifyFailed |
(info) => void | Called when verification fails |
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.
- 10d ago First seen · 333 lines · 66 tokens per session scan A 27704fdd2549
x402-server is a skill published in the GitHub repository Dexter-DAO/opendexter-ide (2 stars, last pushed 5d ago), licensed MIT. It adds 66 tokens to every session and 3,066 once invoked, about $0.0003 per session on Opus 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-08-31.
Other skills, from other repositories
architecture-patterns
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or…
defi-protocol-templates
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and flash loans. Use when building decentralized finance applications or smart contract protocols.
nft-standards
Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.
web3-testing
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.
saga-orchestration
Implement saga patterns for distributed transactions and cross-aggregate workflows. Use this skill when implementing distributed transactions across microservices where 2PC is unavailable, designing compensating actions for failed order workflows that span inventory, payment, and shipping services, building…
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.