build-smart-contracts

Generate Algorand smart contracts in Algorand TypeScript or Python compiled by Puya.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Rudhrakoushik10/RootNode --skill build-smart-contracts-rudhrakoushik10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-smart-contracts
Source: https://github.com/Rudhrakoushik10/RootNode/tree/main/projects/.opencode/skill/build-smart-contracts
Command: npx skills add https://github.com/Rudhrakoushik10/RootNode --skill build-smart-contracts-rudhrakoushik10

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing Algorand smart contracts requires knowing modern Puya-based languages, correct storage and transaction patterns, and avoiding deprecated tools like PyTEAL and Beaker. This Skill guides contract creation by searching official documentation, retrieving canonical examples, and generating tested, compilable code. ## Core Features & Use Cases - Contract Generation: Create new Algorand smart contracts in Algorand TypeScript (PuyaTs) by default, or Algorand Python (PuyaPy) when explicitly requested. - Pattern Guidance: Provides reference material for ARC-4 methods, decorators, GlobalState/LocalState/Box storage, inner transactions, and AVM types. - Build and Test Workflow: Integrates with AlgoKit commands to compile contracts and run integration tests using generated clients. - Use Case: Ask for a voting contract or an NFT contract, and receive code adapted from official Algorand Foundation example repositories with corresponding tests, ready to build with algokit project run build. ## Quick Start Create an Algorand smart contract for a voting application with methods to register voters and cast votes, then build and test it with AlgoKit.

Frequently Asked Questions about build-smart-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Algorand smart contract in TypeScript?

Write the contract in Algorand TypeScript (PuyaTs), a statically-typed subset compiled to TEAL by the Puya compiler. Adapt canonical examples from algorandfoundation/devportal-code-examples or puya-ts, then compile with algokit project run build.

Should I use Algorand TypeScript or Algorand Python for smart contracts?

Algorand TypeScript is the default choice for new contracts. Use Algorand Python (PuyaPy) only when explicitly preferred, referencing the algopy decorators, storage, transactions, and types documentation for Python-specific patterns.

Can I still use PyTEAL or Beaker for Algorand contracts?

No. PyTEAL and Beaker are legacy frameworks superseded by the Puya compiler. New contracts should be written in Algorand TypeScript or Algorand Python, and raw TEAL should never be written by hand.

How do I store per-user data in an Algorand smart contract?

Use LocalState when users opt in and pay their own MBR, or BoxMap when the app account pays and no opt-in is required. Box storage supports up to 32KB per box and requires funding the app account for MBR before creation.

Why must inner transaction fees be set to zero in Algorand contracts?

Setting fee=0 makes the caller cover fees through fee pooling. If inner transactions specify non-zero fees, malicious callers can repeatedly invoke methods and drain the application account balance.