All skills

Guide for writing Python code with AlgoKit Utils (`algokit-utils`). Use this skill whenever the user is building on Algorand with Python — client setup, account management, payments, ASA operations, atomic transaction groups, smart contract deployment and interaction (AppFactory, AppClient, ARC-56/ARC-32 specs), raw app calls, TEAL compilation, key registration, network management, error handling, and the low-level crypto primitives in `algokit_crypto` (Ed25519 keygen/signing/verification, Peikert xHD BIP44 wallets, wrapped-secret patterns) and `algokit_common` (`sha512_256`). Trigger on imports from `algokit_utils` or `algokit_crypto`, references to `AlgorandClient`, `AppFactory`, `AppClient`, `AlgoAmount`, `ed25519_generator`, `peikert_hd_wallet_generator`, `sha512_256`, `WrappedEd25519Seed`, or `RawEd25519Signer`, or any Python code that builds on Algorand.

Use this Skill: https://skilld.dev/gh/algorand-devrel/algorand-agent-skills/algokit-utils-py

This session only. Nothing lands on disk.

referencescompile-teal.md

≈359 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Compile TEAL

Compile TEAL source to bytecode

Compile TEAL source code into bytecode via the algod node.

teal_source = "#pragma version 10\nint 1\nreturn"

compiled = algorand.app.compile_teal(teal_source)

compiled.compiled                  # str — base64-encoded compiled program
compiled.compiled_base64_to_bytes  # bytes — raw compiled bytecode
compiled.compiled_hash             # str — program hash (SHA-512/256 address)
compiled.source_map                # ProgramSourceMap | None — source mapping

What just happened: algorand.app.compile_teal() sent the TEAL source to the algod node for compilation and returned a CompiledTeal object. Results are cached — compiling the same source again returns the cached result without hitting algod. The compiled_hash is the program address, useful for logic signature accounts.

Compile with template variable substitution

Replace TEAL template placeholders before compilation.

teal_template = "#pragma version 10\nint TMPL_THRESHOLD\nreturn"

compiled = algorand.app.compile_teal_template(
    teal_template,
    template_params={"THRESHOLD": 100},
)

What just happened: The SDK replaced TMPL_THRESHOLD with 100 in the TEAL source before compiling. Dict keys can omit the TMPL_ prefix — the SDK auto-prepends it. Value type mapping: int → string literal, str → 0x + UTF-8 hex, bytes → 0x + hex.

Source: SKILL.md on GitHub

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill is a technical reference guide for the Algorand Python SDK (AlgoKit Utils). It promotes secure coding practices, including environment-based secret management and memory-safe cryptographic patterns for handling private keys. No malicious patterns or security risks were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 2 issues

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

Last checked against GitHub 3 weeks ago.

Activeupdated 6 months ago

README badge

README badge for algorand-devrel/algorand-agent-skills/algokit-utils-py