スキル一覧に戻る
gabrielkuettel

algorand-typescript

by gabrielkuettel

A 100% vibe coded NFT gallery

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: algorand-typescript description: 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. Strong triggers include "Puya compiler error", "How do I use uint64?", "What is clone() for?", "BoxMap not working", "AVM type error", "GlobalState not updating".

Algorand TypeScript Rules

Critical syntax rules for Algorand TypeScript (PuyaTs) that prevent compiler errors and runtime failures.

File Extension: Contract files must use .algo.ts extension (e.g., Counter.algo.ts).

Overview / Core Workflow

  1. Identify the syntax issue or pattern needed
  2. Apply the correct AVM-compatible pattern
  3. Use clone() for complex types
  4. Verify no union types or JavaScript number

How to proceed

  1. Check the most critical rules below
  2. Consult detailed reference files for specific topics
  3. Apply the correct pattern with proper AVM types
  4. Build to verify: algokit project run build

Important Rules / Guidelines

Numbers: No JavaScript number

// CORRECT
const amount: uint64 = Uint64(20)
const total: uint64 = amount + Uint64(100)

// INCORRECT - Compiler error
const amount = 20

Numeric limits: Algorand TypeScript supports integers up to 2^512. Use biguint for values exceeding uint64 (2^64 - 1).

Value Semantics: Always clone()

import { clone } from '@algorandfoundation/algorand-typescript'

const state = clone(this.appState.value)     // Read: clone
const updated = clone(state)                  // Modify: clone
this.appState.value = clone(updated)          // Write: clone

No Union Types

// CORRECT - Use boolean flags
let found = false
let foundItem: Item = { /* defaults */ }

// INCORRECT - Compiler error
let foundItem: Item | null = null

Arrays: Clone Before Iterating

// CORRECT
for (const item of clone(array)) { }

Common Variations / Edge Cases

TopicRule
NumbersUse uint64 + Uint64(), never number
StringsNo .length; use text !== '' for empty check
StorageClone on read AND write for complex types
ArraysClone before iterating; indices must be uint64
ClassesNo class properties; use module-level constants
MethodsPublic = ABI method; private = subroutine

References / Further Reading

Detailed rules by topic:

スコア

総合スコア

40/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です