stacks-agent

A command that helps build applications on the Stacks blockchain, a network connected to Bitcoin. It covers Clarity, Stacks' smart-contract language, plus related tokens, finance applications, and wallet or name services.

In plain words
What is it for?
Creating, checking, and deploying Clarity contracts; working with SIP-010 tokens and SIP-009 NFTs; connecting front ends with Stacks.js; and using DeFi, BNS, or stacking features.
Why use it?
It gives developers patterns, examples, security checks, and deployment guidance for Stacks-specific work instead of requiring them to assemble this knowledge themselves.

Command for Cursor

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 commands/kai-builder/stacksagent/stacks-agent
Clone the repo
git clone --depth 1 https://github.com/kai-builder/stacksagent

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 385 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.00000 $0.00385
Opus 5 $0.00000 $0.00192
Sonnet 5 $0.00000 $0.00077
Haiku 4.5 $0.00000 $0.00038

Measured 2d ago against content hash bca3b9e9a426, 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.

.cursor/commands/stacks-agent.md · 51 lines

What it actually says

Stacks Agent - Cursor Command

AI-powered intelligence for building Stacks blockchain applications.

Command

Use /stacks-agent to activate this workflow for Stacks development tasks.

Capabilities

  • 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
  • Security Analysis: Vulnerability detection and best practices
  • Stacks.js: Frontend integration code snippets
  • BNS: Bitcoin Name System operations
  • Stacking: PoX stacking and pool delegation

Use the search script to query the knowledge base:

python3 .shared/stacks-agent/scripts/search.py "<query>" --domain <domain>

Available domains: clarity, templates, security, defi, stacksjs, bns, stacking, deployment, auto

Workflow

  1. Understand the user's request (contract type, features, network)
  2. Search knowledge base for relevant patterns and examples
  3. Generate code based on templates and best practices
  4. Review security patterns and apply fixes
  5. Provide deployment instructions

Examples

  • "Create a SIP-010 token called MOON with 1M supply"
  • "Build an NFT collection with royalties"
  • "How do I swap tokens on Velar?"
  • "Deploy my contract to testnet"

Resources

Version

1.0.0 - 170+ knowledge entries across 8 domains

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 · 51 lines · 0 tokens per session scan A bca3b9e9a426

Subscribe to this mod's changes

stacks-agent is a command published in the GitHub repository kai-builder/stacksagent (6 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 385 tokens. 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.