Learn-skills.dev pillar
Pillar smart wallet operations in two modes — browser-handoff (pillar.ts) opens the Pillar frontend for user signing, and agent-signed direct (pillar-direct.ts) signs locally with a secp256k1 keypair and submits directly to the Pillar API (no browser required, gas sponsored). Supports sBTC send/supply/boost/unwind, DCA programs, stacking, key management, wallet creation, and position queries.
git clone https://github.com/NeverSight/learn-skills.dev
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/aibtcdev/skills/pillar" ~/.claude/skills/neversight-learn-skills-dev-pillar && rm -rf "$T"
data/skills-md/aibtcdev/skills/pillar/SKILL.mdPillar Skill
Provides Pillar smart wallet operations in two modes:
- pillar.ts — Browser-handoff mode. Creates an operation on the Pillar backend, opens the Pillar frontend in the user's browser for signing, then polls for the result. Requires the user to be logged in at pillarbtc.com.
- pillar-direct.ts — Agent-signed direct mode. Generates and manages a local secp256k1 signing keypair. Signs SIP-018 structured data locally, submits directly to the Pillar backend API. No browser needed; gas is sponsored by the backend.
pillar.ts — Browser-Handoff Mode
Usage
bun run pillar/pillar.ts <subcommand> [options]
Subcommands
connect
Connect to your Pillar smart wallet. Opens the Pillar website; if logged in, automatically connects and saves the wallet address locally.
bun run pillar/pillar.ts connect
disconnect
Disconnect from Pillar. Clears the locally stored wallet session.
bun run pillar/pillar.ts disconnect
status
Check if connected to Pillar and get the current wallet address.
bun run pillar/pillar.ts status
send
Send sBTC from your Pillar smart wallet. Opens the frontend for signing, then waits for confirmation.
bun run pillar/pillar.ts send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
Options:
(required) — Recipient: BNS name, Pillar wallet name, or Stacks address--to
(required) — Amount in satoshis--amount
(optional) —--recipient-type
(default),bns
, orwalletaddress
fund
Fund your Pillar smart wallet via exchange deposit, BTC wallet, or sBTC wallet.
bun run pillar/pillar.ts fund --method exchange|btc|sbtc [--amount <sats>]
Options:
(required) —--method
,exchange
, orbtcsbtc
(optional) — Amount in satoshis--amount
add-admin
Add a backup admin address to your Pillar smart wallet for recovery.
bun run pillar/pillar.ts add-admin [--admin-address <SP...>]
Options:
(optional) — Stacks address to add as backup admin--admin-address
supply
Earn yield by supplying sBTC to Zest Protocol. No leverage, no liquidation risk.
bun run pillar/pillar.ts supply [--amount <sats>]
Options:
(optional) — Amount in satoshis--amount
auto-compound
Configure auto-compound for your Pillar wallet.
bun run pillar/pillar.ts auto-compound [--min-sbtc <sats>] [--trigger <sats>]
Options:
(optional) — Minimum sBTC to keep in wallet (sats)--min-sbtc
(optional) — Amount above minimum that triggers auto-compound (sats)--trigger
unwind
Close or reduce your leveraged sBTC position.
bun run pillar/pillar.ts unwind [--percentage <1-100>]
Options:
(optional) — Percentage of position to unwind (1-100)--percentage
boost
Create or increase a leveraged sBTC position (up to 1.5x).
bun run pillar/pillar.ts boost [--amount <sats>]
Options:
(optional) — Amount in satoshis to boost--amount
position
View your Pillar wallet balance and Zest position. Opens the position page in the browser.
bun run pillar/pillar.ts position
create-wallet
Create a new Pillar smart wallet. Opens the Pillar website to complete registration.
bun run pillar/pillar.ts create-wallet [--referral <wallet-address>]
Options:
(optional) — Referral wallet address--referral
invite
Get your Pillar referral link to invite friends.
bun run pillar/pillar.ts invite
dca-invite
Invite a DCA partner by email or wallet address.
bun run pillar/pillar.ts dca-invite --partner <email-or-address>
Options:
(required) — Partner's email address or Stacks wallet address--partner
dca-partners
View your DCA partners and weekly status.
bun run pillar/pillar.ts dca-partners
dca-leaderboard
View the DCA streak leaderboard.
bun run pillar/pillar.ts dca-leaderboard
dca-status
Check your DCA schedule status.
bun run pillar/pillar.ts dca-status
pillar-direct.ts — Agent-Signed Direct Mode
Usage
bun run pillar/pillar-direct.ts <subcommand> [options]
All direct operations are mainnet-only. Gas is sponsored by the Pillar backend.
Key Management Subcommands
key-generate
Generate a new secp256k1 signing keypair. Returns the compressed public key.
bun run pillar/pillar-direct.ts key-generate [--smart-wallet <contract-id>]
Options:
(optional) — Smart wallet contract ID (default: "pending")--smart-wallet
key-unlock
Unlock a signing key using the auto-derived password.
bun run pillar/pillar-direct.ts key-unlock [--key-id <id>]
Options:
(optional) — Key ID to unlock (unlocks first stored key if omitted)--key-id
key-lock
Lock the signing key, clearing sensitive data from memory.
bun run pillar/pillar-direct.ts key-lock
key-info
Show signing key info: pubkey, smart wallet, lock status, and all stored keys.
bun run pillar/pillar-direct.ts key-info
Direct Operation Subcommands
direct-boost
Create or increase a leveraged sBTC position (up to 1.5x). Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-boost --sbtc-amount <sats> --aeusdc-to-borrow <amount> --min-sbtc-from-swap <sats>
Options:
(required) — sBTC amount in sats to supply as collateral--sbtc-amount
(required) — aeUSDC amount to borrow (6 decimals)--aeusdc-to-borrow
(required) — Min sBTC from swap in sats (slippage protection)--min-sbtc-from-swap
direct-unwind
Close or reduce your leveraged sBTC position. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-unwind --sbtc-to-swap <sats> --sbtc-to-withdraw <sats> --min-aeusdc-from-swap <amount>
Options:
(required) — sBTC to swap to aeUSDC for repayment (sats)--sbtc-to-swap
(required) — sBTC to withdraw after repayment (sats)--sbtc-to-withdraw
(required) — Min aeUSDC from swap (6 decimals, slippage protection)--min-aeusdc-from-swap
direct-supply
Earn yield by supplying sBTC to Zest. No leverage, no liquidation risk. Agent-signed.
bun run pillar/pillar-direct.ts direct-supply --sbtc-amount <sats>
Options:
(required) — sBTC amount in sats to supply--sbtc-amount
direct-send
Send sBTC from your Pillar smart wallet. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
Options:
(required) — Recipient: BNS name, Pillar wallet name, or Stacks address--to
(required) — Amount in satoshis--amount
(optional) —--recipient-type
(default),bns
, orwalletaddress
direct-auto-compound
Configure auto-compound. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-auto-compound --enabled true|false --min-sbtc <sats> --trigger <sats>
Options:
(required) — Enable (--enabled
) or disable (true
) auto-compoundfalse
(required) — Minimum sBTC to keep in wallet (sats)--min-sbtc
(required) — Amount above minimum that triggers auto-compound (sats)--trigger
direct-position
View your Pillar smart wallet balances and Zest position. No signing needed.
bun run pillar/pillar-direct.ts direct-position
direct-withdraw-collateral
Withdraw sBTC collateral from Zest. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-withdraw-collateral --sbtc-amount <sats>
Options:
(required) — sBTC amount in sats to withdraw--sbtc-amount
direct-add-admin
Add a backup admin address. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-add-admin --new-admin <SP...>
Options:
(required) — Stacks address to add as backup admin--new-admin
direct-create-wallet
Create a new Pillar smart wallet for agent direct operations. Generates keypair, unlocks it, and deploys.
bun run pillar/pillar-direct.ts direct-create-wallet --wallet-name <name> [--referred-by <contract-id>]
Options:
(required) — Wallet name (3-20 chars, lowercase letters, numbers, hyphens)--wallet-name
(optional) — Contract address of referring wallet--referred-by
DCA Subcommands
direct-dca-invite
Invite a DCA partner. Uses wallet address from signing key session.
bun run pillar/pillar-direct.ts direct-dca-invite --partner <email-or-address>
Options:
(required) — Partner's email or Stacks wallet address--partner
direct-dca-partners
View your DCA partners and weekly status.
bun run pillar/pillar-direct.ts direct-dca-partners
direct-dca-leaderboard
View the DCA streak leaderboard.
bun run pillar/pillar-direct.ts direct-dca-leaderboard
direct-dca-status
Check your DCA schedule status.
bun run pillar/pillar-direct.ts direct-dca-status
Utility Subcommands
direct-quote
Get a boost quote (leverage, LTV, swap details) before executing.
bun run pillar/pillar-direct.ts direct-quote --sbtc-amount <sats>
Options:
(required) — sBTC amount in sats to boost--sbtc-amount
direct-resolve-recipient
Resolve a recipient (BNS name, wallet name, or address) before sending.
bun run pillar/pillar-direct.ts direct-resolve-recipient --to <recipient> [--recipient-type bns|wallet|address]
Options:
(required) — Recipient to resolve--to
(optional) —--recipient-type
(default),bns
, orwalletaddress
Stacking Subcommands
direct-stack-stx
Stack STX via Fast Pool or Stacking DAO. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-stack-stx --stx-amount <microStx> --pool fast-pool|stacking-dao
Options:
(required) — Amount of STX in micro-STX (1 STX = 1,000,000)--stx-amount
(required) —--pool
orfast-poolstacking-dao
direct-revoke-fast-pool
Revoke Fast Pool STX delegation. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-revoke-fast-pool
direct-stacking-status
Check stacking status. No signing needed — reads on-chain data.
bun run pillar/pillar-direct.ts direct-stacking-status
Notes
- Browser-handoff mode requires being connected via
firstpillar.ts connect - Direct mode requires a signing key; use
to create one ordirect-create-wallet
for an existing walletkey-generate - Direct mode operations are mainnet-only
- Pillar backend sponsors gas for all direct mode transactions
- Poll timeout for browser-handoff is 5 minutes by default (override with
env var)PILLAR_POLL_TIMEOUT_MS - Session stored at
; signing keys at~/.aibtc/pillar-session.json~/.aibtc/signing-keys/