Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Prompt Examples

Real-world prompts you can give your coding agent to write and execute Grimoire spells.

Swap Tokens on Uniswap

Create a spell that swaps 1000 USDC to ETH on Uniswap V3 on Ethereum mainnet.

The agent will:

  1. Run grimoire venue uniswap tokens --chain 1 --symbol USDC --format spell to get token addresses
  2. Write a spell with the @uniswap_v3 adapter
  3. Validate and simulate it

Result:

spell SwapUsdcToEth {
  version: "0.1.0"
  description: "Swap 1000 USDC to ETH via Uniswap V3"

  venues: {
    uniswap: @uniswap_v3
  }

  params: {
    amount: 1000
  }

  on manual: {
    uniswap.swap(USDC, ETH, params.amount)
  }
}

Lend on Aave

Write a spell to lend 5000 USDC on Aave V3 on Ethereum. Add a guard so it only lends if the supply APY is above 3%.

The agent will:

  1. Run grimoire venue aave reserves --chain 1 --asset USDC --format spell to get current rates
  2. Write a spell with the @aave_v3 adapter and a conditional check
  3. Validate with --strict mode
Terminal
grimoire venue aave reserves --chain 1 --asset USDC --format spell

Yield Strategy Across Venues

Create a strategy that checks Morpho Blue vault yields on Base, and if any USDC vault has over 5M TVL with a better rate than Aave, moves funds there.

The agent will:

  1. Run grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell
  2. Run grimoire venue aave reserves --chain 8453 --asset USDC --format spell
  3. Write a spell that compares rates and conditionally moves funds
  4. Use an advise block if judgment is needed for the comparison
Terminal
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell
grimoire venue aave reserves --chain 8453 --asset USDC --format spell

Bridge and Swap

Bridge 500 USDC from Ethereum to Base using Across, then swap to ETH on Uniswap.

The agent will write a cross-chain spell using the @across bridge adapter and the @uniswap_v3 swap adapter with --destination-chain execution.

Place a Hyperliquid Order

Place a limit buy for 0.5 ETH at $2,000 on Hyperliquid.

The agent will:

  1. Run grimoire venue hyperliquid mids to check current prices
  2. Write a spell using the @hyperliquid offchain adapter
Terminal
grimoire venue hyperliquid mids