Index of every page on this site: llms.txt
All skills
Run it yourself

Develops Algorand smart contracts in Python using PuyaPy — covers syntax, decorators, storage, transactions, types, testing with pytest, deployment, AlgoKit Utils, ARC-4/ARC-56 standards, and error troubleshooting. Use when writing algopy contracts, using @arc4.abimethod decorators, working with GlobalState or BoxMap in Python, testing with AlgorandClient, deploying or calling contracts from Python, or diagnosing PuyaPy compiler and transaction errors.

  • 8 files
  • 98.1 KB
  • Updated 8 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/algorandfoundation/algorand-agent-skills/algorand-python

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈119 tokens for metadata: the name and description. ≈804 when used: this file. ≈24k more on demand in 7 files.

Description uses 5.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈474 characters, or 5.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.md — GlobalState, 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

Deployment and Client Interaction

  • deploy-interaction.md — CLI commands, typed client factory, method calls, state reading, AlgorandClient API, accounts, transactions, groups, amount helpers

Troubleshooting

  • errors.md — Contract errors (assert, opcode budget, box MBR, inner txn) + transaction errors (overspend, asset not opted in, account not found)

Canonical Example Repos

Search these repositories for real-world code examples:

  • algorandfoundation/devportal-code-examples — Primary examples in projects/python-examples/smart_contracts/ (HelloWorld, BoxStorage, etc.)
  • algorandfoundation/puya — Compiler examples in examples/ (hello_world_arc4, voting, amm)
  • algorandfoundation/algokit-python-template — AlgoKit project template
  • algorandfoundation/algokit-utils-py — AlgoKit Utils Python SDK

Cross-References

  • New to Algorand? Read algorand-core skill first for AVM mental model
  • Project scaffolding and CLI: See algorand-project-setup skill
  • React frontends: See algorand-frontend skill

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 12acef7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 8 months ago

README badge

README badge for algorandfoundation/algorand-agent-skills/algorand-python