bitflow-zest-sbtc-leverage-cycle/SKILL.md
Composes Zest borrow, Bitflow swap, and Zest deposit primitives into one sBTC leverage cycle.
npx skillsauth add aibtcdev/skills bitflow-zest-sbtc-leverage-cycleInstall 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.
bitflow-zest-sbtc-leverage-cycle coordinates one forward sBTC leverage cycle by composing three primitive skills:
zest-borrow-asset-primitive,bitflow-swap-aggregator,zest-asset-deposit-primitive.This is a controller, not a primitive. It must not rebuild the borrow, swap, or deposit transactions internally. It calls the primitive skill CLIs, parses their JSON results, saves progress after each confirmed leg, and refuses to continue when a required primitive is missing or returns a blocked/error result.
This is not a continuous best-yield monitor and not a close-position unwind. Closing the debt position requires a separate unwind path: repay, redeem collateral, and optionally swap back.
Leveraged sBTC is a multi-leg operation. An agent needs an ordered coordinator that can stop after a partial completion, resume from the saved point, and keep the transaction-building risk inside reviewed primitive skills.
flowchart TD
A["Existing Zest sBTC collateral"] --> B["zest-borrow-asset-primitive: borrow STX"]
B --> C["checkpoint: borrow_confirmed"]
C --> D["bitflow-swap-aggregator: swap STX to sBTC"]
D --> E["checkpoint: swap_confirmed"]
E --> F["zest-asset-deposit-primitive: deposit sBTC collateral"]
F --> G["checkpoint: complete"]
run and write-capable resume require --confirm=CYCLE.zest-borrow-asset-primitive, bitflow-swap-aggregator, or zest-asset-deposit-primitive is not installed.BORROW, SWAP, and DEPOSIT.Checks dependency presence, saved-state status, and primitive readiness where the primitive CLIs are installed.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts doctor --wallet <stacks-address>
Reports dependency presence and saved cycle state. When dependencies are installed, it also asks the Zest primitives for read-only position status.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts status --wallet <stacks-address>
Builds an ordered plan by calling primitive plan commands without broadcasting.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts plan --wallet <stacks-address> --borrow-amount-ustx <uSTX>
Executes one composed cycle only after explicit confirmation.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts run --wallet <stacks-address> --borrow-amount-ustx <uSTX> --confirm=CYCLE
Continues only from a saved borrow_confirmed or swap_confirmed checkpoint after explicit confirmation.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts resume --wallet <stacks-address> --confirm=CYCLE
Marks an unresolved saved cycle as operator-cancelled.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts cancel --wallet <stacks-address>
Every command prints exactly one JSON object to stdout.
{
"status": "success|blocked|error",
"action": "doctor|status|plan|run|resume|cancel",
"data": {},
"error": null
}
Winner of AIBTC x Bitflow Skills Pay the Bills competition. Original author: @macbotmini-eng Competition PR: https://github.com/BitflowFinance/bff-skills/pull/578
development
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.