Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By franalgaba
Author structured spells in a DeFi DSL using Grimoire CLI to fetch real-time market data from Aave V3, Uniswap, Morpho Blue, Pendle, Polymarket, Hyperliquid, and Across, then compile, validate, simulate, and cast them for deterministic agentic execution with explicit AI boundaries.
npx claudepluginhub franalgaba/grimoire --plugin grimoire-vmFetches Aave V3 public market data using the Grimoire venue CLI. Use when you need Aave health checks, chain listings, market metadata, or reserve info.
Fetches Across Protocol bridge quotes, routes, and deposit status using the Grimoire venue CLI. Use when you need bridge quotes, route availability, or cross-chain deposit tracking.
Queries Hyperliquid market data using the Grimoire venue CLI. Use when you need mids, books, metadata, open orders, or a withdrawal call.
Fetches Morpho Blue public deployment metadata using the Grimoire venue CLI. Use when you need contract addresses or adapter info.
Fetches Pendle Hosted SDK metadata using the Grimoire venue CLI. Use when you need supported chains, aggregators, markets, assets, or market token details.
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Optimize DeFi yield farming strategies across protocols with APY tracking and risk assessment
Expert agents for cryptocurrency trading, DeFi strategies, and market analysis
Blockchain development with Solidity security, DeFi protocols, NFT standards, and Web3 testing
Agent Skills for crypto trading and DeFi operations by AureHub
Ethereum development skills — corrects LLM blind spots on gas costs, L2s, DeFi protocols, security, and the current tool landscape.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
"Verba Volant, Scripta Manent."
Grimoire is a language for agents to express financial intent with readable syntax and deterministic execution. Spells compile to an intermediate representation (IR) and run through protocol adapters, so you can swap venues by changing aliases and configuration instead of rewriting strategy logic.
Grimoire has one runtime semantics: preview first, then commit for irreversible actions. The same behavior applies across CLI and library entry points.
For a single onboarding flow for both users and agents, start with:
docs/tutorials/quickstart-users-and-agents.mdgrimoire)Use this for reproducible simulation and onchain execution with adapters and state persistence.
npm i -g @grimoirelabs/cli
grimoire setup
grimoire simulate spells/compute-only.spell --chain 1
grimoire cast spells/uniswap-swap-execute.spell \
--dry-run \
--key-env PRIVATE_KEY \
--rpc-url <rpc>
grimoire setup notes:
venue doctor by default.grimoire/setup.env (can disable with --no-save-password-env).grimoire/setup.env on startup and does not override already-set env varsGRIMOIRE_SETUP_ENV_FILE to point to an explicit env file when running outside the project tree.grimoire/setup.env contains plaintext secrets; keep it local-only and rotate/delete when not neededsimulate also supports --rpc-url <rpc> with resolution order:
--rpc-url -> RPC_URL_<chainId> -> RPC_URL.
When you are ready to execute live:
grimoire cast spells/uniswap-swap-execute.spell --key-env PRIVATE_KEY --rpc-url <rpc>
Want live snapshot params for strategy inputs?
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell
grimoire venue pendle chains
Before running venue actions in a new environment, validate adapter/env/RPC readiness:
grimoire venue doctor --chain 1 --adapter uniswap --rpc-url <rpc> --json
If this command errors with Unknown venue adapter "doctor", your installed CLI is outdated.
Use one of:
npm i -g @grimoirelabs/cli@latestnpx -y @grimoirelabs/cli@latest venue doctor --chain 1 --adapter uniswap --rpc-url <rpc> --jsonbun run packages/cli/src/index.ts venue doctor --chain 1 --adapter uniswap --rpc-url <rpc> --jsonAdvisory steps (advise) call Pi when a model is configured (spell model, CLI model/provider, or Pi defaults). If no model is available, the runtime uses the spell’s fallback. Record advisory outputs with simulate (or cast --dry-run), then replay deterministically with --advisory-replay for live execution.
Advisory docs:
docs/how-to/use-advisory-decisions.mddocs/explanation/advisory-decision-flow.mddocs/reference/spell-syntax.md#advisory-syntaxProtocol comparison docs:
docs/how-to/compare-protocol-metrics.mddocs/reference/venues.md#metric-surfacesSee grimoire --help for all CLI commands.
@grimoirelabs/core)Use this when embedding Grimoire into an app/agent process. The library shares the same compiler/interpreter semantics and preview/commit model as the CLI.
See docs/reference/compiler-runtime.md for compile, preview, commit, execute, and session APIs.
Use skills in skills/ so agents can work immediately with Grimoire:
npx skills add https://github.com/franalgaba/grimoireskills/grimoire/ for install, CLI usage, syntax starter, and runbookskills/grimoire-aave/, skills/grimoire-uniswap/, skills/grimoire-morpho-blue/, skills/grimoire-across/, skills/grimoire-hyperliquid/, skills/grimoire-pendle/, skills/grimoire-polymarket/)For Claude Code, run the same install command in the Claude Code terminal and start a new session to load the skills.
spell YieldOptimizer {
assets: [USDC, DAI]
advisors: {
risk: {
model: "anthropic:haiku"
}
}
venues: {
aave_v3: @aave_v3
morpho_blue: @morpho_blue
}
params: {
amount: 100000
}
on hourly: {
decision = advise risk: "Do gas costs justify rebalancing now?" {
output: {
type: boolean
}
timeout: 10
fallback: true
}