Coding Agents
Grimoire is designed as a language for AI agents to write and execute. Spells have a structured, deterministic syntax that agents can author reliably — and skills give them the context they need to do it well.
Install Skills
Skills give your coding agent (Claude Code, Cursor, Windsurf, etc.) full knowledge of Grimoire syntax, CLI commands, and venue adapters.
Install all skills with one command:
npx skills add https://github.com/franalgaba/grimoireThis installs:
| Skill | Purpose |
|---|---|
grimoire | Spell authoring, CLI usage, validation, simulation, execution |
grimoire-aave | Aave V3 market snapshots and reserve data |
grimoire-uniswap | Uniswap V3/V4 router and pool metadata |
grimoire-morpho-blue | Morpho Blue vault discovery |
grimoire-hyperliquid | Hyperliquid mid prices and order books |
grimoire-pendle | Pendle yield markets and assets |
grimoire-polymarket | Polymarket CLOB order books and market data |
How Agents Use Skills
The agent workflow follows the same safety pipeline as manual usage, but skills automate the research and authoring steps:
Prompt → Venue snapshot → Write spell → Validate → Simulate → Dry-run → Cast- You describe what you want in natural language
- The agent fetches live data using venue skills (token addresses, pool info, rates)
- The agent writes a
.spellfile using the syntax reference - Validate and simulate to verify correctness
- Dry-run before live execution for safety
Venue Snapshots with --format spell
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spellparams: {
vault_address: "0x..."
asset: "USDC"
tvl: 12500000
}Agents use this to populate spells with live, accurate protocol data instead of hardcoding addresses.
Preflight Checks
Before running venue actions, agents should verify adapter readiness:
grimoire venue doctor --adapter uniswap --chain 1 --rpc-url <rpc> --json
grimoire venue doctor --adapter aave --chain 1 --rpc-url <rpc> --jsonThis checks adapter registration, required environment variables, chain support, and RPC connectivity.
Safe Execution for Agents
Agents must always follow the safe execution path — especially for spells that move value:
Validate syntax and structure
grimoire validate spells/my-strategy.spellPreview against live data
grimoire simulate spells/my-strategy.spell --chain 1Dry-run the full pipeline without submitting
grimoire cast spells/my-strategy.spell --dry-run --chain 1 --key-env PRIVATE_KEY --rpc-url <rpc>Live execution (only after user confirmation)
grimoire cast spells/my-strategy.spell --chain 1 --key-env PRIVATE_KEY --rpc-url <rpc>