algorand-python

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

A guide to writing Algorand smart contracts in Python with PuyaPy, the compiler and framework used to turn supported Python code into Algorand programs. It covers contract code, storage, testing, standards, deployment, and troubleshooting.

In plain words
What is it for?
Use it to create and test contracts with pytest, define public methods and storage, work with boxes and ABI standards, deploy with AlgoKit, and diagnose contract errors.
Why use it?
It explains the restrictions of Algorand's virtual machine and the required Python patterns, helping avoid code that cannot compile or run on the network.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/algorand-devrel/algorand-agent-skills/algorand-python
Any agent
npx skills add algorand-devrel/algorand-agent-skills --skill algorand-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-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/algorand-devrel/algorand-agent-skills/algorand-python.svg)](https://agentmods.dev/skills/algorand-devrel/algorand-agent-skills/algorand-python)
Your own site
<a href="https://agentmods.dev/skills/algorand-devrel/algorand-agent-skills/algorand-python"><img src="https://agentmods.dev/badge/skills/algorand-devrel/algorand-agent-skills/algorand-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 925 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00103 $0.00925
Opus 5 $0.00051 $0.00463
Sonnet 5 $0.00021 $0.00185
Haiku 4.5 $0.00010 $0.00093

Measured 4d ago against content hash e002084239a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

algorand-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 4d 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-python/SKILL.md · 71 lines

How it starts

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

Algorand Python

Write, test, deploy, and troubleshoot Algorand Python smart contracts.

Quick Start

# Create Python project
algokit init -n my-project -t python --answer preset_name production --defaults

# Development cycle
cd my-project
algokit project run build    # Compile contracts with PuyaPy
algokit project run test     # Run pytest tests
algokit localnet start       # Start local network
algokit project deploy localnet  # Deploy

Critical Rules

  • Understand AVM constraints first — see algorand-core skill for the foundational mental model
  • NEVER use PyTEAL or Beaker — use Algorand Python (PuyaPy) with algopy imports
  • Use @arc4.abimethod for public ABI methods, @arc4.baremethod for bare calls
  • Always search docs first — use Kapa MCP or web search before writing contract code
  • Always include tests — use pytest with AlgoKit Utils
  • Fund app account before box operations — box storage requires MBR funding
  • Always .copy() mutable values — call .copy() when appending to or storing mutable types: ARC-4 (arc4.Struct, arc4.DynamicArray) and native (algopy.Array, algopy.FixedArray, algopy.Struct)

Reference Guide

Read the specific reference file for your task. Each file is self-contained.

Contract Syntax

  • syntax-types.md — AVM types (arc4.UInt64, arc4.String, Bytes, UInt64), ARC-4 encoding, native vs ARC-4 conversions
  • syntax-storage.mdGlobalState, LocalState, Box, BoxMap, BoxRef, MBR funding patterns
  • syntax-methods.md@arc4.abimethod, @arc4.baremethod, @subroutine, lifecycle methods, visibility, ARC4Contract vs Contract
  • syntax-transactions.md — Inner transactions (itxn), group transactions, fee pooling

Testing

  • testing.md — Pytest patterns, AlgorandClient setup, typed client testing, box funding, multi-user tests

Read the full file on GitHub · 71 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 71 lines · 103 tokens per session scan A e002084239a4

Subscribe to this mod's changes

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

runtime-behavior-probe

Plan and, after explicit approval, execute runtime-behavior probes for local or live integrations. Use only when explicitly invoked to verify behavior that code review and normal tests cannot settle; define a controlled validation matrix and report observed evidence.

openai/openai-agents-python · 53 tokens

building-pydantic-ai-agents

Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydanticai, or asks to build an AI agent, add tools/capabilities, defer capability loading, stream output, define agents…

pydantic/pydantic-ai · 85 tokens

e2e-cucumber-playwright

Use when writing, changing, or reviewing Cucumber and Playwright tests under e2e/, including feature files, step definitions, support code, scenario tags, locators, and assertions. Do not use for Vitest, React Testing Library, backend tests, or generic browser automation outside the E2E suite.

langgenius/dify · 73 tokens

adopting-generated-api-types

Use when migrating frontend code from manual API client calls (api.get, api.create, api.surveys.get, api.dashboards.list, new ApiRequest()) and handwritten TypeScript interfaces to generated API functions and types. Triggers on files importing from lib/api, files with api.get . , manual interface definitions that…

PostHog/posthog · 131 tokens

implementing-mcp-tools

Guide for exposing PostHog product endpoints as MCP tools. Use when creating new or updating API endpoints, adding MCP tool definitions, scaffolding YAML configs, or writing serializers with good descriptions. Covers the full pipeline from Django serializer to generated TypeScript tool handler.

PostHog/posthog · 58 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