Bankr x402 SDK - Client Patterns

Bankr x402 SDK - Client Patterns is a skill for Claude Code from BankrBot/claude-plugins. It costs 88 tokens per session (2,187 once invoked), scanned A, original, MIT.

A set of reusable TypeScript patterns for creating a Bankr SDK client. The examples show project setup, environment-variable validation, and sending requests such as token swaps or balance checks.

In plain words
What is it for?
Use it when starting a Bankr SDK project, creating a shared client module, configuring TypeScript files, or executing SDK requests from code.
Why use it?
It removes repetitive setup work and documents the expected client structure. It also makes the required payment wallet configuration explicit.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the bankr-x402-sdk-dev plugin — 8 skills, 1 agent shipped together

Good fit Use it when starting a Bankr SDK project, creating a shared client module, configuring TypeScript files, or executing SDK requests from code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bankrbot/claude-plugins/x402-client-patterns
Install

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.

Any agent
npx skills add BankrBot/claude-plugins --skill x402-client-patterns
Clone the repo
git clone --depth 1 https://github.com/BankrBot/claude-plugins

Made for: Claude Code.

Or install bankr-x402-sdk-dev, the plugin that ships this one along with the rest of its 8 skills, 1 agent.

Wrote 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.

agentmods badge for Bankr x402 SDK - Client Patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/bankrbot/claude-plugins/x402-client-patterns/github.svg)](https://agentmods.dev/skills/bankrbot/claude-plugins/x402-client-patterns)
Your own site
<a href="https://agentmods.dev/skills/bankrbot/claude-plugins/x402-client-patterns"><img src="https://agentmods.dev/badge/skills/bankrbot/claude-plugins/x402-client-patterns/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.

agentmods 80×15 button for Bankr x402 SDK - Client Patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/bankrbot/claude-plugins/x402-client-patterns"><img src="https://agentmods.dev/badge/skills/bankrbot/claude-plugins/x402-client-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,187 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.02187
Opus 5.5 $0.00035 $0.00875
Sonnet 5.5 $0.00018 $0.00437
Haiku 4.5 $0.00009 $0.00219

Measured 1mo ago against content hash 5e0e2f2cb936, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Bankr x402 SDK - Client Patterns 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 1mo 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.

x402-sdk-dev/skills/x402-client-patterns/SKILL.md · 403 lines

How it starts

The opening of the file, as written. The whole thing — 403 lines — stays where its author put it; the contents beside it link to each section on GitHub.

x402 SDK Client Patterns

Reusable client code and common files for Bankr SDK projects.

bankr-client.ts

The core SDK client module for all Bankr SDK projects:

import "dotenv/config";
import { BankrClient } from "@bankr/sdk";

// ============================================
// Validation
// ============================================

if (!process.env.BANKR_PRIVATE_KEY) {
  throw new Error(
    "BANKR_PRIVATE_KEY environment variable is required. " +
      "This wallet pays $0.01 USDC per request (needs USDC on Base)."
  );
}

// ============================================
// Client Setup
// ============================================

/**
 * Bankr SDK Client
 *
 * Provides AI-powered Web3 operations with x402 micropayments.
 * Each API request costs $0.01 USDC (paid from payment wallet on Base).
 *
 * @example
 * ```typescript
 * import { bankrClient } from "./bankr-client";
 *
 * // Token swap
 * const swap = await bankrClient.promptAndWait({
 *   prompt: "Swap 0.1 ETH to USDC on Base",
 * });
 *
 * // Check balances
 * const balances = await bankrClient.promptAndWait({
 *   prompt: "What are my token balances?",
 * });
 * ```
 *
 * @see https://www.npmjs.com/package/@bankr/sdk
 */
export const bankrClient = new BankrClient({
  // Required: Payment wallet private key
  // This wallet pays $0.01 USDC per API request (must have USDC on Base)
  privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,

  // Optional: Override receiving wallet address
  // If not set, tokens are sent to the payment wallet address
  walletAddress: process.env.BANKR_WALLET_ADDRESS,

  // Optional: API endpoint (defaults to production)
  ...(process.env.BANKR_API_URL && { baseUrl: process.env.BANKR_API_URL }),
});

// Export the wallet address for reference
export const walletAddress = bankrClient.getWalletAddress();

// ============================================
// Types (re-exported from SDK)
// ============================================

export type { JobStatusResponse, Transaction } from "@bankr/sdk";

Read the full file on GitHub · 403 lines

Changes

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.

  1. 1mo ago First seen · 403 lines · 88 tokens per session scan A 5e0e2f2cb936

Subscribe to this mod's changes

Bankr x402 SDK - Client Patterns is a skill published in the GitHub repository BankrBot/claude-plugins (86 stars, last pushed 7mo ago), licensed MIT. It adds 88 tokens to every session and 2,187 once invoked, about $0.0004 per session on Opus 5.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-30.

Related

Other skills, from other repositories

starknet-js

Use when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions…

starknet-io/starknet.js · 79 tokens

adding-personhog-rpc

Guide for adding a new RPC to personhog-replica and personhog-router. Covers eligibility checks, proto definition, code generation for Python and Node.js clients, Rust implementation (storage trait, postgres queries, service handler, router wiring), and index compatibility validation. Use when adding a new gRPC…

PostHog/posthog · 88 tokens

bnb-chain-toolkit-guide

Guide to the BNB Chain Toolkit — a modular TypeScript toolkit for building, deploying, and interacting with smart contracts on BNB Chain. Includes BEP-20 token utilities, DeFi integrations, wallet management, and cross-chain bridging. Built for BNB Chain Hackathon by the Sperax team.

nirholas/three.ws · 67 tokens

solana-toolkit-guide

Guide to the Solana Wallet Toolkit — vanity address generation with multi-threaded search, official Solana Labs libraries, Rust and TypeScript implementations. Includes wallet generation, custom address prefixes, and OG names on the blockchain.

nirholas/three.ws · 50 tokens

viem-integration

Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.

Uniswap/uniswap-ai · 69 tokens

wallet-cli

Operate the TypeScript TRON wallet CLI for accounts, transfers, staking, governance, contracts, signing, chain queries, SunSwap swaps and liquidity, SunPump bonding-curve trading and token launches, and password input with wallet-cli 4.15.0. Refuse wallet passwords in argv and require the supported stdin channel. For…

BofAI/skills · 92 tokens