Tsp Csharp
querylenshq/ef-querylens
Comprehensive C and .NET development skill for TSP projects.
Accept HTTP 402 cryptocurrency payments using Nethereum (.NET/C).
$ npx skills add Nethereum/Nethereum --skill x402-payments -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Nethereum/Nethereum x402-payments --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/nethereum-skills/skills/x402-payments .claude/skills/x402-payments && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "x402-payments" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-payments into .claude/skills/x402-payments/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "x402-payments", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-paymentsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Nethereum/Nethereum --skill x402-payments -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Nethereum/Nethereum x402-payments --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/nethereum-skills/skills/x402-payments .agents/skills/x402-payments && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "x402-payments" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-payments into .agents/skills/x402-payments/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "x402-payments", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Nethereum/Nethereum --skill x402-payments -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Nethereum/Nethereum x402-payments --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/nethereum-skills/skills/x402-payments .cursor/skills/x402-payments && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "x402-payments" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-payments into .cursor/skills/x402-payments/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "x402-payments", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Nethereum/Nethereum.git --path plugins/nethereum-skills/skills/x402-payments--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Nethereum/Nethereum --skill x402-payments -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Nethereum/Nethereum x402-payments --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/nethereum-skills/skills/x402-payments .gemini/skills/x402-payments && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "x402-payments" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-payments into .gemini/skills/x402-payments/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "x402-payments", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Nethereum/Nethereum x402-paymentsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Nethereum/Nethereum --skill x402-payments -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/nethereum-skills/skills/x402-payments .github/skills/x402-payments && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "x402-payments" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-payments into .github/skills/x402-payments/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "x402-payments", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Nethereum/Nethereum --skill x402-payments -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Nethereum/Nethereum x402-payments --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Nethereum/Nethereum.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/nethereum-skills/skills/x402-payments .opencode/skills/x402-payments && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "x402-payments" agent skill from https://github.com/Nethereum/Nethereum/tree/master/plugins/nethereum-skills/skills/x402-payments into .opencode/skills/x402-payments/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "x402-payments", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
x402-paymentsAccept HTTP 402 cryptocurrency payments using Nethereum (.NET/C).
X402 Payments is an agent skill from Nethereum/Nethereum. Accept HTTP 402 cryptocurrency payments using Nethereum (.NET/C). Use this skill whenever the user asks about x402 protocol (version 2), HTTP 402 payments, pay-per-request APIs, EIP-3009 transfer authorization, Permit2 payments, USDC payments, crypto API monetization, payment middleware, or accepting cryptocurrency payments in ASP.NET with C or .NET.
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Crypto and DeFi analysis and Authorization and RBAC. It works with x402, C#, .NET and ASP.NET Core. The repository describes itself as: Ethereum .Net cross platform integration library. The licence is MIT.
Read from SKILL.md and the folder at commit 229f278. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
facilitator.x402.orgmainnet.base.orgAlso links to:
docs.nethereum.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
X402 Payments loads about 2.2k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 479 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Nethereum/Nethereum at commit 229f278, republished under its MIT licence (© Nethereum). 479 words, ~2,189 tokens.
.claude/skills/x402-payments/SKILL.md (or your agent's skills folder).The x402 protocol implements HTTP 402 (Payment Required) for pay-per-request APIs. A client pays with a signed authorization — off-chain (no gas) — and the server or a facilitator settles on-chain. Nethereum's Nethereum.X402 package provides X402HttpClient for automatic payments and X402Middleware for ASP.NET Core endpoint protection.
This library targets x402 version 2: payments carry x402Version = 2, the chosen requirement is echoed in the payload's accepted field, and networks use CAIP-2 identifiers (eip155:<chainId>, e.g. eip155:8453 for Base). The "exact" scheme supports two EVM asset-transfer methods: EIP-3009 (default) and Permit2.
NuGet: Nethereum.X402
dotnet add package Nethereum.X402The v2 wire uses three base64 headers: PAYMENT-REQUIRED (402 response), PAYMENT-SIGNATURE (request), PAYMENT-RESPONSE (200 response).
X402HttpClient handles the full 402 flow — detect requirement, select one, sign it, retry with the payment header. The signing domain (token, chain id, name/version) is derived from the server's PaymentRequirements, so the client is not pre-configured with a token:
using Nethereum.X402.Client;
var options = new X402HttpClientOptions
{
MaxAmount = "100000", // Safety limit per request (USDC)
PreferredNetwork = "eip155:8453", // CAIP-2 (Base)
PreferredScheme = "exact"
};
var x402Client = new X402HttpClient(httpClient, privateKey, options);
var response = await x402Client.GetAsync("https://api.example.com/premium/content");
// Check payment result from the PAYMENT-RESPONSE header
if (response.HasPaymentResponse())
{
var txHash = response.GetTransactionHash();
var payer = response.GetPayerAddress();
var success = response.IsPaymentSuccessful();
}Supports GetAsync, PostAsync, PutAsync, DeleteAsync, SendAsync. Throws X402PaymentExceedsMaximumException if the requested amount exceeds MaxAmount. The client automatically produces the right payload for the selected requirement's method (EIP-3009, or Permit2 when extra.assetTransferMethod == "permit2").
Construct with just the payer key and pass explicit PaymentRequirements:
var x402Client = new X402HttpClient(httpClient, privateKey);
var requirements = new PaymentRequirements
{
Scheme = "exact",
Network = "eip155:84532", // Base Sepolia
Amount = "1000000", // $1.00 USDC (6 decimals), atomic units
Asset = usdcAddress,
PayTo = receiverAddress,
MaxTimeoutSeconds = 60,
Extra = new ExactSchemeExtra { Name = "USDC", Version = "2" }
};
var response = await x402Client.GetAsync("https://api.example.com/premium", requirements);Register a facilitator client, then add route-based middleware:
using Nethereum.X402.AspNetCore;
using Nethereum.X402.Server;
using Nethereum.X402.Models;
builder.Services.AddX402Services("https://facilitator.x402.org");
app.UseX402(options =>
{
options.Routes.Add(new RoutePaymentConfig("/api/premium/*", new PaymentRequirements
{
Scheme = "exact",
Network = "eip155:8453",
Amount = "1000000",
Asset = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
PayTo = "0xYourAddress",
MaxTimeoutSeconds = 60,
Extra = new ExactSchemeExtra { AssetTransferMethod = "eip3009", Name = "USDC", Version = "2" }
}));
});Settle on-chain directly. Only an RPC endpoint per chain id is configured (token/chain/domain come from each requirement):
using Nethereum.X402.Extensions;
var rpcByChainId = new Dictionary<int, string> { [8453] = "https://mainnet.base.org" };
// EIP-3009 only (facilitator pays gas):
builder.Services.AddX402TransferProcessor(facilitatorPrivateKey, rpcByChainId);
// EIP-3009 AND Permit2 (routes by payload shape) — recommended:
builder.Services.AddX402ExactProcessor(facilitatorPrivateKey, rpcByChainId);
// Receiver-submitted model (receiver pays gas):
builder.Services.AddX402ReceiveProcessor(receiverPrivateKey, rpcByChainId);Each overload also accepts an IAccount (external signers/KMS) or an IServiceProvider factory.
| Method | Processor | On-chain call |
|---|---|---|
| EIP-3009 (default) | X402TransferWithAuthorisation3009Service | transferWithAuthorization |
| EIP-3009 (receiver) | X402ReceiveWithAuthorisation3009Service | receiveWithAuthorization |
| Permit2 | X402ExactPermit2Service | x402ExactPermit2Proxy.settle |
| dispatcher | X402ExactSchemeProcessor | routes by payload shape |
All implement IX402PaymentProcessor (VerifyPaymentAsync, SettlePaymentAsync, GetSupportedAsync). A blockchain processor is constructed with a facilitator key (or IAccount) and a Dictionary<int, IClient> keyed by chain id.
Permit2 works with any ERC-20 the payer has approved to the canonical Permit2 contract (no EIP-3009 support needed). A route opts in with extra.assetTransferMethod = "permit2"; the client signs a Permit2 PermitWitnessTransferFrom (spender = the x402ExactPermit2Proxy, witness = the recipient) and the facilitator settles via proxy.settle, which enforces that funds go only to that recipient:
options.Routes.Add(new RoutePaymentConfig("/api/premium-permit2", new PaymentRequirements
{
Scheme = "exact",
Network = "eip155:84532",
Amount = "10000",
Asset = usdcAddress,
PayTo = receiverAddress,
MaxTimeoutSeconds = 60,
Extra = new ExactSchemeExtra { AssetTransferMethod = "permit2" }
}));
// Facilitator: X402ExactPermit2Service (or AddX402ExactProcessor to serve both methods)The Permit2/proxy addresses are canonical constants (X402Permit2Addresses), the same on every EVM chain. The underlying Permit2 signing lives in Nethereum.Signer.EIP712/Nethereum.ABI, and the contract in Nethereum.Contracts (web3.Eth.GetPermit2Service()).
For custom flows:
using Nethereum.X402.Signers;
var builder = new TransferWithAuthorisationBuilder();
var signer = new TransferWithAuthorisationSigner();
var authorization = builder.BuildFromPaymentRequirements(requirements, payerAddress);
// Default window: validAfter = 10 min ago, validBefore = 1 hour from now
var signature = await signer.SignWithPrivateKeyAsync(
authorization, "USD Coin", "2", chainId, usdcAddress, payerPrivateKey);
// Or sign with a Web3 account (hardware wallets, KMS)
var signature = await signer.SignWithWeb3Async(
authorization, "USD Coin", "2", chainId, usdcAddress, web3, signerAddress);X402ErrorCodes)| Code | Meaning |
|---|---|
invalid_exact_evm_insufficient_balance | Payer doesn't have enough tokens |
invalid_exact_evm_signature | EIP-3009 signature verification failed |
invalid_exact_evm_authorization_value | Amount below the requirement |
invalid_exact_evm_recipient_mismatch | Receiver mismatch |
invalid_exact_evm_nonce_already_used | Nonce already used |
invalid_network / unsupported_payload_type | Network/scheme not supported |
invalid_permit2_recipient_mismatch | Permit2 witness recipient ≠ PayTo |
permit2_amount_mismatch / permit2_token_mismatch | Permit2 amount/token mismatch |
permit2_allowance_required | Payer hasn't approved Permit2 for the asset |
invalid_permit2_signature | Permit2 signature verification failed |
Any EIP-3009 token (for the eip3009 method) or any ERC-20 approved to Permit2 (for the permit2 method). Common USDC addresses:
| Token | Network | Address |
|---|---|---|
| USDC | Ethereum | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| USDC | Base | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| USDC | Base Sepolia | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
| USDC | Polygon | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 |
| USDC | Arbitrum | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 |
| USDC | Optimism | 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 |
For full documentation, see: https://docs.nethereum.com/docs/defi/guide-x402-payments
© Nethereum, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/nethereum-skills/skills/x402-payments of Nethereum/Nethereum.
Open the folder on GitHubat commit 229f278
X402 Payments next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| X402 Payments this skillNethereum/Nethereum | 2.3k | — | ~2.2k | Automated safety check: Pass | MIT | |
| Tsp Csharpquerylenshq/ef-querylens | 225 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Alchemy Agentic Gatewaymoonpay/skills | 113 | — | ~2.1k | Automated safety check: Notes | MIT | |
| Using Dotnetnovotnyllc/dotnet-artisan | 233 | — | ~2.3k | Automated safety check: Warn | MIT | |
| Dotnet Webapidotnet/skills | 5.6k | 2 repos | ~5.5k | Automated safety check: Pass | MIT | |
| C# and .NET DeveloperJeffallan/claude-skills | 12k | — | ~1.3k | Automated safety check: Pass | MIT |
querylenshq/ef-querylens
Comprehensive C and .NET development skill for TSP projects.
moonpay/skills
A skill your agent uses when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features.
novotnyllc/dotnet-artisan
Detects .NET intent for any C, ASP.NET Core, EF Core, Blazor, MAUI, Uno Platform, WPF, WinUI, SignalR, gRPC, xUnit, NuGet, or MSBuild request from prompt keywords and repository signals (.sln…
dotnet/skills
Guides creation and modification of ASP.NET Core Web API endpoints with correct HTTP semantics, OpenAPI metadata, and error handling.
Jeffallan/claude-skills
Guides C# work on .NET 8+: ASP.NET Core APIs, Entity Framework Core data access, Blazor apps and CQRS with MediatR, following a five-step build workflow.
aiskillstore/marketplace
Expert .NET backend architect specializing in C, ASP.NET Core, Entity Framework, Dapper, and enterprise application patterns.
Nethereum/Nethereum
Help users batch multiple calls into a single UserOperation and sponsor gas with paymasters using Nethereum Account Abstraction.
Nethereum/Nethereum
Help users run an ERC-4337 bundler using Nethereum — set up in-process or standalone bundlers with mempool, validation, reputation, and JSON-RPC server.
Nethereum/Nethereum
Encode and decode Ethereum ABI data with Nethereum. An agent skill from Nethereum/Nethereum.
Nethereum/Nethereum
Fetch contract ABIs from Sourcify, Etherscan, and 4Byte Directory using the composite ABIInfoStorage pattern (.NET/C).
Nethereum/Nethereum
Help users implement ERC-4337 Account Abstraction with Nethereum — send UserOperations, use smart accounts, route contract calls through a bundler, enable gasless transactions, or work with AA in…
Nethereum/Nethereum
Validate and format Ethereum addresses with Nethereum. An agent skill from Nethereum/Nethereum.
Works with
Categories
Accept HTTP 402 cryptocurrency payments using Nethereum (.NET/C). X402 Payments is an agent skill from Nethereum/Nethereum.NET/C).
X402 Payments fits situations like: the user asks about x402 protocol (version 2); HTTP 402 payments; pay-per-request APIs; EIP-3009 transfer authorization.
Run `npx skills add Nethereum/Nethereum --skill x402-payments -a claude-code`. Or copy the skill folder (plugins/nethereum-skills/skills/x402-payments in Nethereum/Nethereum) into .claude/skills/x402-payments in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Nethereum/Nethereum --skill x402-payments -a codex`. Or copy the skill folder (plugins/nethereum-skills/skills/x402-payments in Nethereum/Nethereum) into .agents/skills/x402-payments in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Nethereum/Nethereum --skill x402-payments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/x402-payments, .gemini/skills/x402-payments, .github/skills/x402-payments and .opencode/skills/x402-payments in your project.
Going by SKILL.md and its folder, X402 Payments needs the command-line tools its instructions call (dotnet).
SKILL.md names 3 domains. In commands or code: facilitator.x402.org and mainnet.base.org; the agent is likely to contact these when it follows the instructions. As links in the text: docs.nethereum.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
X402 Payments is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with X402 Payments: Tsp Csharp (querylenshq/ef-querylens, 225 stars), Alchemy Agentic Gateway (moonpay/skills, 113 stars), Using Dotnet (novotnyllc/dotnet-artisan, 233 stars) and Dotnet Webapi (dotnet/skills, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Nethereum (a GitHub organization) maintains it in Nethereum/Nethereum, which has 2,260 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on October 5, 2026.
Source: Nethereum/Nethereum on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.