cast

Charms CAST DEX workflows for order creation, cancellation/replacement, partial fulfillment, signing, and Bitcoin transaction verification.

390 stars

Best use case

cast is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Charms CAST DEX workflows for order creation, cancellation/replacement, partial fulfillment, signing, and Bitcoin transaction verification.

Teams using cast should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cast/SKILL.md --create-dirs "https://raw.githubusercontent.com/OpenAgentsInc/openagents/main/skills/cast/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cast/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cast Compares

Feature / AgentcastStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Charms CAST DEX workflows for order creation, cancellation/replacement, partial fulfillment, signing, and Bitcoin transaction verification.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Cast

## Overview

Use this skill when a task requires executable CAST DEX operations on Bitcoin with Charms, including order lifecycle management, Scrolls nonce/address derivation, cancellation signatures, partial fills, signing, and transaction verification.

## Environment

Required commands:

- `bash`, `curl`, `jq`, `envsubst`
- `charms`, `bitcoin-cli`
- `scrolls-nonce`, `sign-txs`, `cancel-msg`

Required artifacts/services:

- CAST app binary (`charms-cast-v0.2.0.wasm` or latest v11-compatible CAST build)
- Operator-signed `fulfill` params payload
- Scrolls API base URL
- `prev_txs` ancestry data for all spell inputs
- fee funding input UTXO for maker flows (`CAST_FUNDING_UTXO`)
- v11 spell file (`version: 11`, `tx.*`, `app_public_inputs`)
- separate private-inputs file passed via `--private-inputs`

## Workflow

1. Run preflight checks for your path:
- `scripts/check-cast-prereqs.sh maker`
- `scripts/check-cast-prereqs.sh taker`
- `scripts/check-cast-prereqs.sh cancel`
- `scripts/check-cast-prereqs.sh server`

2. Follow [order-lifecycle](references/order-lifecycle.md) for create/check/prove flow.

3. For maker edits, follow [cancel-and-replace](references/cancel-and-replace.md).

4. For taker fills, follow [partial-fulfillment](references/partial-fulfillment.md).

5. For signing and broadcast controls, follow [signing-and-broadcast](references/signing-and-broadcast.md).
6. For repeated autonomous execution, follow [autotrade-loop](references/autotrade-loop.md).

7. Keep operations deterministic:
- prefer file-backed inputs over inline shell literals
- use dry-run first for mutation steps
- persist artifacts and receipts for every run
- encode `tx.coins[*].dest` as hex destination bytes (derive via `charms util dest --addr ...`)

## Quick Commands

```bash
# Preflight
skills/cast/scripts/check-cast-prereqs.sh maker

# Derive Scrolls nonce + address
skills/cast/scripts/derive-scrolls-address.sh \
  --funding-utxo "<txid:vout>" \
  --output-index 0 \
  --scrolls-base-url "${CAST_SCROLLS_BASE_URL}"

# Migrate legacy CAST howto spell to v11 (split private inputs + convert coin dests)
skills/cast/scripts/cast-migrate-howto-v11.sh \
  --input /Users/christopherdavid/code/charms/cast-releases/docs/howto/03-partial-fulfill.yaml \
  --output-spell ./rendered/03-partial-fulfill.v11.yaml \
  --output-private-inputs ./rendered/03-partial-fulfill.private.v11.yaml

# Check + prove
skills/cast/scripts/cast-spell-check.sh \
  --spell ./rendered/create-order.yaml \
  --private-inputs-file ./rendered/create-order.private-inputs.yaml \
  --app-bin "${CAST_APP_BIN}" \
  --prev-txs-file "${CAST_PREV_TXS_FILE}"
skills/cast/scripts/cast-spell-prove.sh \
  --spell ./rendered/create-order.yaml \
  --private-inputs-file ./rendered/create-order.private-inputs.yaml \
  --app-bin "${CAST_APP_BIN}" \
  --prev-txs-file "${CAST_PREV_TXS_FILE}" \
  --change-address "bc1q..." \
  --mock
skills/cast/scripts/cast-spell-prove.sh \
  --spell ./rendered/create-order.yaml \
  --private-inputs-file ./rendered/create-order.private-inputs.yaml \
  --app-bin "${CAST_APP_BIN}" \
  --prev-txs-file "${CAST_PREV_TXS_FILE}" \
  --change-address "bc1q..."

# Sign + inspect
skills/cast/scripts/cast-sign-and-broadcast.sh --tx-json ./proofs/tx_to_sign.json --dry-run
skills/cast/scripts/cast-show-spell.sh --tx "<spell_tx_hex>"

# Run one automated iteration (safe defaults: mock prove + dry-run sign)
skills/cast/scripts/cast-autotrade-loop.sh \
  --config skills/cast/assets/autotrade-loop.config.example \
  --once

# Run continuous loop (explicitly controlled)
skills/cast/scripts/cast-autotrade-loop.sh \
  --config /absolute/path/to/autotrade.env \
  --interval-seconds 45 \
  --max-iterations 0 \
  --continue-on-error
```

## References

- [order-lifecycle](references/order-lifecycle.md)
- [cancel-and-replace](references/cancel-and-replace.md)
- [partial-fulfillment](references/partial-fulfillment.md)
- [signing-and-broadcast](references/signing-and-broadcast.md)
- [autotrade-loop](references/autotrade-loop.md)

Related Skills

neutronpay

390
from OpenAgentsInc/openagents

Neutronpay MCP and SDK workflows for Lightning, stablecoin, and fiat payments.

moneydevkit

390
from OpenAgentsInc/openagents

Money Dev Kit workflows for Lightning checkout and agent wallets.

mezo

390
from OpenAgentsInc/openagents

Mezo integration workflows for apps, autonomous agents, and Mezo Earn operations.

maestro

390
from OpenAgentsInc/openagents

Maestro Symphony blockchain query operations for OpenAgents agents, including tip freshness checks, address/UTXO/runes queries, and production-safe troubleshooting against deployed Symphony API endpoints.

l402

390
from OpenAgentsInc/openagents

L402 agent commerce workflows with lnd, lnget, scoped macaroons, aperture, and MCP.

charms

390
from OpenAgentsInc/openagents

Charms workflows for Bitcoin app contracts, spell proving, and UTXO asset operations.

blink

390
from OpenAgentsInc/openagents

Bitcoin Lightning wallet for agents — balances, invoices, payments, BTC/USD swaps, QR codes, price conversion, and transaction history via the Blink API. All output is JSON.

autopilot-pane-control

390
from OpenAgentsInc/openagents

OpenAgents desktop pane and CAD control for Codex via openagents.* tool calls.

autopilot-data-seller

390
from OpenAgentsInc/openagents

Conversational seller-authoring policy for DS-first Data Market listings in OpenAgents.

autopilot-data-seller-cli

390
from OpenAgentsInc/openagents

Shell-first OpenAgents DS-first Data Market packaging and publication workflow using the deterministic packaging helper, autopilotctl, and the no-window headless runtime.

autopilot-data-market-control

390
from OpenAgentsInc/openagents

Typed OpenAgents DS-first Data Market tool contract for seller publication and market read-back.

autopilot-cad-builder

390
from OpenAgentsInc/openagents

Deterministic CAD build orchestration for Autopilot Chat using openagents CAD and pane tools, including week-1 gripper flow.