algorand-typescript

Guide Algorand TypeScript PuyaTs contract syntax, AVM types, and storage patterns.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/gabrielkuettel/vibegallery --skill algorand-typescript-gabrielkuettel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: algorand-typescript
Source: https://github.com/gabrielkuettel/vibegallery/tree/main/.claude/skills/algorand-typescript
Command: npx skills add https://github.com/gabrielkuettel/vibegallery --skill algorand-typescript-gabrielkuettel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Syntax rules and patterns for Algorand TypeScript (PuyaTs) smart contracts. Use when writing TypeScript contract code, encountering Puya compiler errors, asking about AVM types or value semantics, needing guidance on storage patterns (GlobalState, BoxMap), or asking about clone(), arrays, or inner transactions.

Core Features & Use Cases

  • AVM type rules and value-semantics guidance, including proper Uint64 usage and avoiding JavaScript numbers.
  • Storage guidance across GlobalState, LocalState, and BoxMap, with examples for read/write cloning and MBR considerations.
  • Patterns for arrays, clone semantics, union avoidance, and ABI method conventions to reduce common compiler errors.

Quick Start

Start by applying the Puya TS syntax rules to your first contract file and consult the references for AVM types and storage examples.

Frequently Asked Questions about algorand-typescript

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

FAQPage Schema
How do I fix Puya compiler errors when writing Algorand TypeScript contracts?

To fix Puya compiler errors in Algorand TypeScript, enforce AVM-compliant patterns by using explicit uint64 or Uint64 types, avoiding JavaScript numbers, and applying clone() for complex values. Proper ABI method conventions and careful array handling also prevent common compilation failures.

When do I need to use clone() for complex values in Algorand TypeScript?

You need to use clone() for complex values in Algorand TypeScript when handling arrays or interacting with storage patterns like GlobalState and BoxMap. Cloning ensures correct value semantics and prevents unintended reference mutations within the AVM architecture.

What are the AVM type rules for using Uint64 in PuyaTs smart contracts?

AVM type rules for PuyaTs smart contracts require explicit use of uint64 or Uint64 for numerical values. You must strictly avoid JavaScript numbers to ensure value semantics remain AVM-compliant and to prevent unexpected runtime behavior during contract execution.

How do I implement storage patterns like GlobalState and BoxMap in PuyaTs?

To implement storage patterns like GlobalState and BoxMap in PuyaTs, follow explicit storage access rules that include read and write cloning for complex values. You must also account for MBR considerations when managing contract state to ensure transactions succeed.

Can I use standard JavaScript numbers in Algorand TypeScript smart contracts?

No, you cannot use standard JavaScript numbers in Algorand TypeScript smart contracts. The PuyaTs syntax enforces AVM-compliant patterns by requiring explicit uint64 or Uint64 types to maintain strict value semantics and prevent compiler errors.

Why does my Algorand TypeScript contract fail with union type errors?

Your Algorand TypeScript contract fails with union type errors because PuyaTs enforces strict value semantics and union avoidance. To resolve this, ensure explicit AVM type usage and apply clone() semantics to complex values before storage access or array manipulation.