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:
- Run
grimoire venue uniswap tokens --chain 1 --symbol USDC --format spellto get token addresses - Write a spell with the
@uniswap_v3adapter - 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:
- Run
grimoire venue aave reserves --chain 1 --asset USDC --format spellto get current rates - Write a spell with the
@aave_v3adapter and a conditional check - Validate with
--strictmode
grimoire venue aave reserves --chain 1 --asset USDC --format spellYield 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:
- Run
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell - Run
grimoire venue aave reserves --chain 8453 --asset USDC --format spell - Write a spell that compares rates and conditionally moves funds
- Use an
adviseblock if judgment is needed for the comparison
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell
grimoire venue aave reserves --chain 8453 --asset USDC --format spellBridge 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:
- Run
grimoire venue hyperliquid midsto check current prices - Write a spell using the
@hyperliquidoffchain adapter
grimoire venue hyperliquid mids