agentleFS
algorand-devrelalgorand-devrel/algorand-agent-skills/setups/AGENTS.md

algorand-agent-skills / setups

AGENTS.md33 starsChanged 10 months agoMITView on GitHub

This project develops Algorand blockchain applications including smart contracts, frontend interfaces and x402 applications. When working here, always leverage the available skills and MCP tools before writing code—they provide canonical syntax, examples, and documentation that prevent errors and save time. Before initializing any AlgoKit project: Before writing any smart contract, understand what the AVM actually is — a stack machine with two types (uint64, bytes) and hard resource limits. LLMs default to TEAL/PyTeal and treat contract code like normal TypeScript/Python.…

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. algorandfoundation/algorand-agent-skills★ 34100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before initializing any AlgoKit project:

    line 9
  2. Very specific:

    Load the skill: Use algorand-project-setup skill

    line 11
  3. Very specific:

    Before writing any smart contract, understand what the AVM actually is — a stack machine with two types (uint64, bytes) and hard resource …

    line 16
  4. Very specific:

    Load the core skill: Use algorand-core for AVM mental model, execution model, and resource limits

    line 18
  5. Distinctive:

    Before writing ANY Algorand contract code:

    line 23
  6. Very specific:

    Understand AVM constraints: Use algorand-core skill for the foundational mental model

    line 25
  7. Very specific:

    Load the skill first: Use algorand-typescript (or algorand-python for Python)

    line 26
  8. Very specific:

    Search docs: Call kapa_search_algorand_knowledge_sources for concepts

    line 27
  9. Very specific:

    Get examples: Use github_get_file_contents from:

    line 28
  10. Distinctive:

    Use the CLI and generated typed clients for deployment and interaction.

    line 36
  11. Very specific:

    Load the skill: Use algorand-typescript or algorand-python — deployment/interaction references are included

    line 40
  12. Distinctive:

    After deployment, interact with contracts using the generated typed client:

    line 49
  13. Distinctive:

    Before building a React frontend that interacts with Algorand contracts:

    line 59
  14. Very specific:

    Create typed client with defaultSender: activeAddress

    line 69
  15. Distinctive:

    If MCP tools aren't available, use these fallbacks:

    line 113
  16. Very specific:

    Check config exists: Look for .mcp.json (Claude Code), opencode.json (OpenCode), or .cursor/mcp.json (Cursor)

    line 123
  17. Distinctive:

    If localnet commands fail with "network unreachable" or connection errors:

    line 135

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Overview

This project develops Algorand blockchain applications including smart contracts, frontend interfaces and x402 applications. When working here, always leverage the available skills and MCP tools before writing code—they provide canonical syntax, examples, and documentation that prevent errors and save time.

Creating New Projects

Before initializing any AlgoKit project:

  1. Load the skill: Use algorand-project-setup skill
  2. Run: algokit init -n <name> -t typescript --answer preset_name production --defaults

Understanding AVM Constraints

Before writing any smart contract, understand what the AVM actually is — a stack machine with two types (uint64, bytes) and hard resource limits. LLMs default to TEAL/PyTeal and treat contract code like normal TypeScript/Python. The algorand-core skill resets this mental model.

  1. Load the core skill: Use algorand-core for AVM mental model, execution model, and resource limits
  2. Then proceed to the language-specific skill for syntax and patterns

Writing Smart Contracts

Before writing ANY Algorand contract code:

  1. Understand AVM constraints: Use algorand-core skill for the foundational mental model
  2. Load the skill first: Use algorand-typescript (or algorand-python for Python)
  3. Search docs: Call kapa_search_algorand_knowledge_sources for concepts
  4. Get examples: Use github_get_file_contents from:
    • algorandfoundation/devportal-code-examples
    • algorandfoundation/puya-ts (TypeScript) or algorandfoundation/puya (Python)
  5. Write code following skill guidance
  6. Build/test: algokit project run build && algokit project run test

Deploying & Calling Contracts

Use the CLI and generated typed clients for deployment and interaction.

Workflow

  1. Load the skill: Use algorand-typescript or algorand-python — deployment/interaction references are included
  2. Start localnet: algokit localnet start
  3. Build contracts: algokit project run build
  4. Deploy to localnet: algokit project deploy localnet
    • Handles idempotent deployment (safe to re-run)
    • Note the App ID from the deployment output

Contract Interaction

After deployment, interact with contracts using the generated typed client:

  1. Write interaction scripts using the typed client
  2. Use the typed client generated from the ARC-56 app spec
  3. Run scripts: npx tsx scripts/call-contract.ts (TS) or python scripts/call_contract.py (Python)

See the deploy-interaction.md reference in your language skill for detailed patterns.

Building React Frontends

Before building a React frontend that interacts with Algorand contracts:

  1. Load the skill: Use algorand-frontend skill
  2. Prerequisites: Deployed contract with known App ID, ARC-56 app spec
  3. Generate typed client: algokit generate client MyContract.arc56.json --output src/contracts/MyContractClient.ts
  4. Install deps: npm install @algorandfoundation/algokit-utils @txnlab/use-wallet-react algosdk
  5. Follow the "signer handoff" pattern:
    • Set up WalletProvider with @txnlab/use-wallet-react
    • Get transactionSigner from useWallet() hook
    • Register signer: algorand.setSigner(activeAddress, transactionSigner)
    • Create typed client with defaultSender: activeAddress

Available Skills

TaskSkill
AVM mental model, limitsalgorand-core
Initialize projects, CLIalgorand-project-setup
TypeScript developmentalgorand-typescript
Python developmentalgorand-python
React frontendsalgorand-frontend
TypeScript x402 paymentsalgorand-x402-typescript
Python x402 paymentsalgorand-x402-python

Each language skill covers the full lifecycle: syntax, building, testing, deployment, AlgoKit Utils, ARC standards, and troubleshooting.

MCP Tools

Important: These tools are provided by MCP servers. If a tool isn't available when you try to use it, the MCP server may not be configured. Check for a .mcp.json (Claude Code) or opencode.json (OpenCode) file in the project root. If the config exists but tools still aren't available, restart your coding agent.

Note: MCP tool names may have different prefixes depending on your coding agent. For example:

  • Claude Code: mcp__kapa__search_algorand_knowledge_sources
  • Other agents may use: kapa_search_algorand_knowledge_sources

The tool functionality is the same regardless of prefix.

Documentation Search (Kapa)

ToolPurpose
kapa_search_algorand_knowledge_sourcesSearch official Algorand docs

GitHub (Code Examples)

ToolPurpose
github_get_file_contentsRetrieve example code from repos
github_search_codeFind code patterns across repos
github_search_repositoriesDiscover repos by topic/name

Troubleshooting

MCP Tools Not Available

If MCP tools aren't available, use these fallbacks:

Missing ToolFallback
kapa_search_algorand_knowledge_sourcesUse web search for "site:dev.algorand.co {query}"
github_get_file_contentsUse web search or browse GitHub directly
github_search_codeUse web search for "site:github.com algorandfoundation {query}"

To fix MCP configuration:

  1. Check config exists: Look for .mcp.json (Claude Code), opencode.json (OpenCode), or .cursor/mcp.json (Cursor)
  2. Verify server entries: Config should include kapa and github MCP servers
  3. Restart the agent: MCP tools load at startup; restart after config changes

Note: You can always proceed without MCPs by:

  • Using web search for documentation (dev.algorand.co)
  • Browsing GitHub repos directly (algorandfoundation/puya-ts, algorandfoundation/devportal-code-examples)
  • Using CLI commands for all deployment and testing

Localnet Connection Errors

If localnet commands fail with "network unreachable" or connection errors:

  1. Start localnet: algokit localnet start
  2. Verify it's running: algokit localnet status
  3. Reset if needed: algokit localnet reset

Plan Mode

  • Make the plan extremely concise. Sacrifice grammar for the sake of concision.
  • At the end of each plan, give me a list of unresolved questions to answer, if any.

X402 Development

x402 is an HTTP-native payment protocol built on the HTTP 402 "Payment Required" status code. Three components work together: Client requests a protected resource, Server responds with 402 and structured payment requirements, and Facilitator verifies and settles the payment on-chain. The client signs a transaction, retries the request with a PAYMENT-SIGNATURE header, and the server forwards it to the facilitator for verification and settlement before granting access.

Payment Flow

Client                  Resource Server           Facilitator           Algorand
  |                          |                        |                    |
  | 1. GET /api/data         |                        |                    |
  |------------------------->|                        |                    |
  | 2. 402 + requirements    |                        |                    |
  |<-------------------------|                        |                    |
  | 3. Build + sign txn      |                        |                    |
  | 4. GET + PAYMENT-SIGNATURE|                      |                    |
  |------------------------->| 5. verify(payload)     |                    |
  |                          |----------------------->| 6. simulate_group  |
  |                          |                        |------------------->|
  |                          |                        |<-------------------|
  |                          |<-----------------------| {isValid: true}    |
  |                          | 7. settle(payload)     |                    |
  |                          |----------------------->| 8. sign + send     |
  |                          |                        |------------------->|
  |                          |                        |<-------------------| txId
  |                          |<-----------------------|                    |
  | 9. 200 + data            |                        |                    |
  |<-------------------------|                        |                    |

Building X402 Applications

  1. Pick language: TypeScript or Python
  2. Load the skill: algorand-x402-typescript or algorand-x402-python
  3. Choose components: Client, server, facilitator, paywall — or a subset
  4. Follow the skill's SKILL.md router to find reference files for your component

The skills contain everything needed: CAIP-2 network identifiers, package lists, signer protocols, environment variables, common errors, and complete code examples.

Public facilitator URL: https://facilitator.goplausible.xyz

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.