stx/SKILL.md
Stacks L2 STX token operations — check balances, transfer STX, broadcast pre-signed transactions, call Clarity contracts, deploy contracts, and check transaction status. Transfer and contract operations require an unlocked wallet.
npx skillsauth add aibtcdev/skills stxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides Stacks L2 STX token and contract operations using the Hiro API. Transfer and contract write operations require an unlocked wallet (use bun run wallet/wallet.ts unlock first). Balance and status queries work with just an address.
bun run stx/stx.ts <subcommand> [options]
Get the STX balance for a Stacks address. Returns balance in both micro-STX and STX.
bun run stx/stx.ts get-balance [--address <addr>]
Options:
--address (optional) — Stacks address to check (uses active wallet if omitted)Output:
{
"address": "SP2...",
"network": "mainnet",
"balance": {
"microStx": "1000000",
"stx": "1 STX"
},
"locked": {
"microStx": "0",
"stx": "0 STX"
},
"explorerUrl": "https://explorer.hiro.so/address/SP2...?chain=mainnet"
}
Transfer STX to a recipient. Requires an unlocked wallet.
1 STX = 1,000,000 micro-STX. Specify --amount in micro-STX.
bun run stx/stx.ts transfer --recipient <addr> --amount <microStx> [--memo <text>] [--fee low|medium|high|<microStx>]
Options:
--recipient (required) — Stacks address to send to (starts with SP or ST)--amount (required) — Amount in micro-STX (e.g., "2000000" for 2 STX)--memo (optional) — Memo message to include with the transfer--fee (optional) — Fee preset (low|medium|high) or micro-STX amount; auto-estimated if omittedOutput:
{
"success": true,
"txid": "abc123...",
"from": "SP2...",
"recipient": "SP3...",
"amount": "2 STX",
"amountMicroStx": "2000000",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
Broadcast a pre-signed Stacks transaction to the network.
bun run stx/stx.ts broadcast-transaction --signed-tx <hex>
Options:
--signed-tx (required) — The signed transaction as a hex stringOutput:
{
"success": true,
"txid": "abc123...",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
Call a function on a Stacks smart contract. Signs and broadcasts the transaction. Requires an unlocked wallet.
bun run stx/stx.ts call-contract --contract-address <addr> --contract-name <name> --function-name <fn> [--args <json>] [--post-condition-mode allow|deny] [--post-conditions <json>] [--fee low|medium|high|<microStx>]
Options:
--contract-address (required) — Contract deployer's address (e.g., SP2...)--contract-name (required) — Contract name (e.g., my-token)--function-name (required) — Function to call--args (optional) — Function arguments as JSON array (default: "[]"). For typed args: [{"type":"uint","value":100}]--post-condition-mode (optional) — deny (default) blocks unexpected transfers; allow permits any--post-conditions (optional) — Post conditions as JSON array. See SKILL.md for format.--fee (optional) — Fee preset or micro-STX; auto-estimated if omittedPost condition format:
{"type":"stx","principal":"SP...","conditionCode":"eq","amount":"1000000"}{"type":"ft","principal":"SP...","asset":"SP...contract","assetName":"token-name","conditionCode":"eq","amount":"1000"}{"type":"nft","principal":"SP...","asset":"SP...contract","assetName":"nft-name","tokenId":"1"}Output:
{
"success": true,
"txid": "abc123...",
"contract": "SP2....my-token",
"function": "transfer",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
Deploy a Clarity smart contract to the Stacks blockchain. Requires an unlocked wallet.
bun run stx/stx.ts deploy-contract --contract-name <name> --code-body <clarity-source> [--fee low|medium|high|<microStx>]
Options:
--contract-name (required) — Unique name for the contract (lowercase, hyphens allowed)--code-body (required) — The complete Clarity source code--fee (optional) — Fee preset or micro-STX; auto-estimated if omittedOutput:
{
"success": true,
"txid": "abc123...",
"contractId": "SP2....my-contract",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
Check the status of a Stacks transaction by its txid.
bun run stx/stx.ts get-transaction-status --txid <txid>
Options:
--txid (required) — The transaction ID (64 character hex string)Output:
{
"txid": "abc123...",
"status": "success",
"block_height": 150000,
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
bun run wallet/wallet.ts unlock first)--fee is omitted; use presets (low|medium|high) or exact micro-STX amountsdeny (default) prevents unintended asset movements; use allow only when necessarydevelopment
Web of Trust operations for Nostr pubkeys — trust scoring, sybil detection, trust path analysis, neighbor discovery, follow recommendations, and network health. Free tier (wot.klabo.world, 50 req/day) with paid fallback (maximumsats.com, 100 sats via L402). Covers 52K+ pubkeys and 2.4M+ zap-weighted trust edges. Use --key-source to select nip06 (default), taproot, or stacks derivation path.
data-ai
BTC ordinals marketplace operations via Magic Eden — browse active listings, list inscriptions for sale via PSBT flow, submit signed listings, buy inscriptions, and cancel active listings. BTC ordinals only (not Solana). Mainnet-only.
testing
Pay-per-call access to LunarCrush social and market intelligence (Galaxy Score, AltRank, market cap rank, price, 24h change) via x402 on Stacks. USD-pegged pricing recomputed hourly from live STX/USD. Mainnet endpoint live; testnet supported.
devops
Detects HODLMM LP inventory drift (token-ratio imbalance from one-sided swap flow) and restores the target ratio via a corrective Bitflow swap plus a hodlmm-move-liquidity redeploy, gated by the 4h per-pool cooldown.