algorand-python
Skill34 starsChanged 10 months agoMITView on GitHub
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.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- setups/AGENTS.mdAGENTS.md
- skill-creatorSkill
- algokit-utils-pySkill
- algokit-utils-tsSkill
- algorand-coreSkill
- algorand-ecosystemSkill
- algorand-frontendSkill
- algorand-project-setupSkill
- algorand-typescriptSkill
- algorand-x402-pythonSkill
- algorand-x402-typescriptSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write, test, deploy, and troubleshoot Algorand Python smart contracts.
- Distinctive: line 36
Read the specific reference file for your task.
- Distinctive: line 59
Search these repositories for real-world code examples:
- Very specific: line 68
New to Algorand?: Read algorand-core skill first for AVM mental model
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 # DeployCritical Rules
- Understand AVM constraints first — see
algorand-coreskill for the foundational mental model - NEVER use PyTEAL or Beaker — use Algorand Python (PuyaPy) with
algopyimports - Use
@arc4.abimethodfor public ABI methods,@arc4.baremethodfor 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,ARC4ContractvsContract - syntax-transactions.md — Inner transactions (
itxn), group transactions, fee pooling
Testing
- testing.md — Pytest patterns,
AlgorandClientsetup, typed client testing, box funding, multi-user tests
Deployment and Client Interaction
- deploy-interaction.md — CLI commands, typed client factory, method calls, state reading,
AlgorandClientAPI, 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 inprojects/python-examples/smart_contracts/(HelloWorld, BoxStorage, etc.)algorandfoundation/puya— Compiler examples inexamples/(hello_world_arc4, voting, amm)algorandfoundation/algokit-python-template— AlgoKit project templatealgorandfoundation/algokit-utils-py— AlgoKit Utils Python SDK
Cross-References
- New to Algorand? Read
algorand-coreskill first for AVM mental model - Project scaffolding and CLI: See
algorand-project-setupskill - React frontends: See
algorand-frontendskill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

