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

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:

Terminal
npx skills add https://github.com/franalgaba/grimoire

This installs:

SkillPurpose
grimoireSpell authoring, CLI usage, validation, simulation, execution
grimoire-aaveAave V3 market snapshots and reserve data
grimoire-uniswapUniswap V3/V4 router and pool metadata
grimoire-morpho-blueMorpho Blue vault discovery
grimoire-hyperliquidHyperliquid mid prices and order books
grimoire-pendlePendle yield markets and assets
grimoire-polymarketPolymarket 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
  1. You describe what you want in natural language
  2. The agent fetches live data using venue skills (token addresses, pool info, rates)
  3. The agent writes a .spell file using the syntax reference
  4. Validate and simulate to verify correctness
  5. Dry-run before live execution for safety

Venue Snapshots with --format spell

Terminal
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell
Output
params: {
  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:

Terminal
grimoire venue doctor --adapter uniswap --chain 1 --rpc-url <rpc> --json
grimoire venue doctor --adapter aave --chain 1 --rpc-url <rpc> --json

This 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

Terminal
grimoire validate spells/my-strategy.spell

Preview against live data

Terminal
grimoire simulate spells/my-strategy.spell --chain 1

Dry-run the full pipeline without submitting

Terminal
grimoire cast spells/my-strategy.spell --dry-run --chain 1 --key-env PRIVATE_KEY --rpc-url <rpc>

Live execution (only after user confirmation)

Terminal
grimoire cast spells/my-strategy.spell --chain 1 --key-env PRIVATE_KEY --rpc-url <rpc>