stacks-agent

A development guide for building applications on Stacks, a blockchain network whose smart contracts use Bitcoin as their settlement layer. It includes examples and guidance for Clarity contracts, tokens, DeFi, security, Stacks.js, naming, staking, and deployment.

In plain words
What is it for?
Use it to create, audit, debug, or deploy Stacks smart contracts and connected web applications, including fungible tokens, NFTs, DeFi features, and Bitcoin-related operations.
Why use it?
It gives coding agents current example patterns and troubleshooting guidance for Stacks development. This helps avoid deprecated APIs and common transaction or security mistakes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kai-builder/stacksagent/stacks-agent
Any agent
npx skills add kai-builder/stacksagent --skill stacks-agent
Clone the repo
git clone --depth 1 https://github.com/kai-builder/stacksagent

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.02530
Opus 5 $0.00010 $0.01265
Sonnet 5 $0.00004 $0.00506
Haiku 4.5 $0.00002 $0.00253

Measured 2d ago against content hash c8c3a5bc7cc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

stacks-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/stacks-agent/SKILL.md · 274 lines

How it starts

The opening of the file, as written. The whole thing — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stacks Agent Skill

AI-powered development intelligence for building on Stacks blockchain - Bitcoin's most powerful smart contract layer.

Capabilities

Core Features

  • Clarity Contracts: Generate, audit, and deploy smart contracts
  • Token Standards: SIP-010 (fungible) and SIP-009 (NFT) templates
  • DeFi Integration: Alex, Velar, Bitflow, Zest, Boost, Faktory protocol patterns
  • Security Analysis: Vulnerability detection and best practices
  • Stacks.js: Frontend integration with modern @stacks/connect v7+ API
  • BNS: Bitcoin Name System operations
  • Stacking: PoX stacking and pool delegation
  • Deployment: Testnet and mainnet deployment guides

New in v2.0 🎉

  • 🎯 40 Production Code Examples: Complete working code from live dApps (sbtc-market, stacksagent, STX City)
  • 🕸️ 100 Knowledge Relationships: Connected concepts showing dependencies and prerequisites
  • 🚫 Zero Deprecated Code: All examples use modern API patterns (no openContractCall, showConnect, or Gaia)
  • 🔒 Security-First: All examples include post-conditions, error handling, and common pitfalls
  • 🐛 Debugging Examples: Real-world troubleshooting for failed transactions

Knowledge Base

Code Snippets (495+ entries)

  • 61 Clarity functions - Complete language reference
  • 14 Contract templates - FT, NFT, DAO, Vault, Marketplace, Stacking
  • 15 Security patterns - Common vulnerabilities and fixes
  • 25 DeFi protocols - Alex, Velar, Bitflow, Zest, StackingDAO, Boost, Faktory
  • 76 Stacks.js snippets - Modern @stacks/connect v7+ patterns (wallet, transactions, post-conditions)
  • 21 BNS operations - Name registration and resolution (Clarity + JS + API)
  • 25 Stacking guides - PoX stacking and delegation (Clarity + JS + API)
  • 30 Oracle integration - Pyth Network price feeds with VAA handling (Clarity + JS + API)
  • 25 Deployment steps - Testnet, mainnet, and devnet

Production Examples (40 examples - NEW in v2.0)

  • 10 DeFi examples - Swaps, liquidity, oracles, stacking, bonding curves, debugging
  • 10 NFT examples - Minting, marketplace, royalties, metadata, batch operations, debugging
  • 8 Token examples - SIP-010, vesting, allowances, burns, multi-token swaps
  • 7 Security examples - Reentrancy, overflow, access control, rate limiting
  • 5 Auth examples - Wallet connect, JWT, sessions, NFT gating (No Gaia - deprecated)

Read the full file on GitHub · 274 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 274 lines · 19 tokens per session scan A c8c3a5bc7cc3

Subscribe to this mod's changes

stacks-agent is a skill published in the GitHub repository kai-builder/stacksagent (6 stars, last pushed 7mo ago), licensed MIT. It adds 19 tokens to every session and 2,530 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.