Skip to content
Open Source · MIT License

Converting intent to unsigned
transactions

A deterministic engine that converts DeFi intents into raw, ABI-encoded transaction payloads. JSON playbooks define the protocols. Resolvers handle the rest. No guessing, no hallucinating.

$ pip install defi-skills
44 Actions
12 Protocols
32 Resolver functions
Input
Your intent
CLI command, API call, or chat message. Human-readable: token symbols, ENS names, decimal amounts.
$ defi-skills build \ --action aave_supply \ --args '{"asset":"USDC","amount":"500"}'
Engine
PlaybookEngine
Deterministic two-stage pipeline. build_payload resolves args, encode_tx produces calldata. Driven entirely by JSON playbooks.
USDC → 0xA0b8...eB48 500 → 100000000 (6 decimals) ABI → supply(address,uint256,address,uint16)
Output
Unsigned transaction
Raw {to, value, data} ready for any wallet or signer. Never signs, never broadcasts.
{ "to": "0x8787...4E2", "value": "0", "data": "0x617ba037..." }
>_
CLI
Open source · pip install

Install locally. Build transactions from the terminal. Ships as a skill for Claude Code, OpenClaw, and any agent with shell access.

# Deterministic build (no LLM)
defi-skills build --action lido_stake \
  --args '{"amount":"10"}' --json

# Interactive chat agent
defi-skills chat
  • Deterministic build command (zero LLM tokens)
  • Interactive chat with tool-calling agent
  • Agent skill files included (Claude Code, OpenClaw)
View on GitHub
{}
Hosted API
Managed service · REST + auth

Same engine, hosted for you. REST endpoints with Bearer auth, multi-turn agent sessions, and a browser playground to test live.

# Build via API
curl -X POST /v1/build \
  -H "Authorization: Bearer $KEY" \
  -d '{"action":"lido_stake",
       "arguments":{"amount":"10"},
       "from_address":"0x..."}'
  • GET /v1/actions — discover actions + schemas
  • POST /v1/build — deterministic transaction build
  • POST /v1/sessions — multi-turn agent chat
  • API key auth with rate limiting (free tier: 50/day)

Both the CLI and API run the same PlaybookEngine. Protocol knowledge lives in JSON files. The engine reads them, resolves human-readable parameters to on-chain values, and ABI-encodes the transaction. No protocol-specific code in the engine.

JSON
Playbooks
12 protocol files define actions, parameters, approvals, and ABI mappings. Adding a protocol = adding a JSON file.
fn()
Resolvers
Token addresses, decimal conversion, ENS names, swap quotes, fee tiers, balances. Composable and chainable.
ABI
Encoder
Maps resolved values to ABI parameters, coerces types, encodes calldata. Uses Etherscan-verified ABIs cached locally.
ERC20
Approvals
Auto-generates approve() transactions. Handles USDT's non-standard reset-to-zero pattern automatically.
!!!
Fail loud
Never guesses. If a token, address, or amount can't be resolved, it fails with a clear error. No silent defaults.
50
Tested
50 parametrized parity tests cover all actions. Run offline with mocked on-chain calls. No API keys needed.
Aave V3
supplywithdrawborrowrepayset_collateralclaim_rewards
Uniswap V3
swaplp_mintlp_collectlp_decreaselp_increase
Lido
stakewrap_stethunwrap_wstethunstakeclaim
EigenLayer
depositdelegateundelegatequeue_withdrawalscomplete
Compound V3
supplywithdrawborrowrepayclaim_rewards
Balancer V2
swapjoin_poolexit_pool
Curve
add_liquidityremove_liquiditygauge_depositgauge_withdrawmint_crv
MakerDAO DSR
depositredeem
Rocket Pool
stakeunstake
WETH
wrapunwrap
Transfers
nativeerc20erc721
+ Your protocol
add a JSON playbook

Open source. Add a protocol in 10 minutes.

Every protocol is a JSON file. No engine code changes needed. We ship an LLM-assisted playbook generator that drafts the JSON from a contract ABI. Review, drop it in, done.

GitHub Contributing Guide