algorand-x402-python

algorand-x402-python is a skill for Claude Code, Codex from algorand-devrel/algorand-agent-skills. It costs 82 tokens per session (1,729 once invoked), scanned A, original, MIT.

A Python toolkit for adding x402 payments to Algorand-based web applications. x402 is a way for an HTTP request to trigger payment before an API returns its result.

In plain words
What is it for?
Use it to build payment-gated FastAPI or Flask services and httpx or Requests clients, create x402 facilitators, or add Bazaar service discovery on Algorand.
Why use it?
It supplies the payment clients, server middleware, facilitators, and discovery support needed for payment-based APIs in Python.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build payment-gated FastAPI or Flask services and httpx or Requests clients, create x402 facilitators, or add Bazaar service discovery on Algorand.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/algorand-devrel/algorand-agent-skills/algorand-x402-python
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 algorand-devrel/algorand-agent-skills --skill algorand-x402-python
Clone the repo
git clone --depth 1 https://github.com/algorand-devrel/algorand-agent-skills

Made for: Claude Code, Codex.

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 algorand-x402-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/algorand-devrel/algorand-agent-skills/algorand-x402-python.svg)](https://agentmods.dev/skills/algorand-devrel/algorand-agent-skills/algorand-x402-python)
Your own site
<a href="https://agentmods.dev/skills/algorand-devrel/algorand-agent-skills/algorand-x402-python"><img src="https://agentmods.dev/badge/skills/algorand-devrel/algorand-agent-skills/algorand-x402-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,729 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00082 $0.01729
Opus 5 $0.00041 $0.00864
Sonnet 5 $0.00016 $0.00346
Haiku 4.5 $0.00008 $0.00173

Measured 8d ago against content hash 66af0a9de460, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

algorand-x402-python 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 8d 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.

skills/algorand-x402-python/SKILL.md · 135 lines

How it starts

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

x402 on Algorand - Python

Build x402 HTTP-native payment applications on Algorand with Python. Use the reference files below for detailed guidance on each component.

Python Quick Start

The x402-avm package on PyPI bundles core protocol, AVM mechanism, HTTP clients, and server middleware. Pick the extras you need:

# AVM only (no HTTP client/server)
pip install "x402-avm[avm]"

# Server middleware (pick one)
pip install "x402-avm[fastapi,avm]"    # FastAPI async
pip install "x402-avm[flask,avm]"      # Flask sync

# HTTP clients (pick one)
pip install "x402-avm[httpx,avm]"      # Async with httpx
pip install "x402-avm[requests,avm]"   # Sync with requests

# Bazaar discovery extension
pip install "x402-avm[extensions,avm]"

# Everything
pip install "x402-avm[all]"

Distribution name is x402-avm but the import root is x402 (not x402_avm).

Register AVM Scheme

Every component registers the AVM exact scheme unconditionally — no environment variable guards:

# Client
from x402 import x402Client
from x402.mechanisms.avm.exact import ExactAvmScheme

client = x402Client()
client.register("algorand:*", ExactAvmScheme(signer=my_signer))

# Server
from x402.server import x402ResourceServer
from x402.mechanisms.avm.exact import ExactAvmServerScheme

server = x402ResourceServer()
server.register("algorand:*", ExactAvmServerScheme())

# Facilitator
from x402 import x402Facilitator
from x402.mechanisms.avm.exact import ExactAvmFacilitatorScheme

facilitator = x402Facilitator()
facilitator.register("algorand:*", ExactAvmFacilitatorScheme(signer=my_signer))

The register_exact_avm_client/server/facilitator helpers from x402.mechanisms.avm.exact are also valid.

Python algosdk Encoding

Python algosdk's msgpack_decode() expects base64 strings, msgpack_encode() returns base64 strings. Boundary conversion: msgpack_decode(base64.b64encode(raw_bytes).decode()) / base64.b64decode(msgpack_encode(obj)).

Reference Guide

Read the full file on GitHub · 135 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. 8d ago First seen · 135 lines · 82 tokens per session scan A 66af0a9de460

Subscribe to this mod's changes

algorand-x402-python is a skill published in the GitHub repository algorand-devrel/algorand-agent-skills (33 stars, last pushed 21d ago), licensed MIT. It adds 82 tokens to every session and 1,729 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…

browser-use/browser-use · 175 tokens

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

stripe-best-practices

Guides Stripe integration decisions across API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, tax and registrations (Stripe Tax, automatictax, product tax codes), Treasury financial accounts, integration options (Checkout, Payment…

stripe/ai · 134 tokens

pinme-uniwebpay

Use when generating, modifying, or reviewing PinMe Worker (Cloudflare Worker TypeScript) code that accepts payments through UniwebPay — payment links, products/prices, checkout sessions, payment status reads, refunds, subscriptions, or handling UniwebPay webhooks with @uniwebpay/sdk in a PinMe project.

glitternetwork/pinme · 71 tokens

erp-xpp

Finance and Operations X++ development lifecycle — scaffold models, author classes, custom services/APIs, and data entities, install matching SDKs, compile deployable packages, deploy packages, synchronize databases, and verify deployed artifacts. Use when the user wants to create, build, compile, package, deploy…

microsoft/Dataverse-skills · 84 tokens

kalshi-api

Kalshi exchange mechanics — RSA-PSS auth, order schema, YES/NO orderbook convention, WebSocket, and endpoint surface. Market-type-agnostic shared layer for all Kalshi skills.

agiprolabs/claude-trading-skills · 44 tokens