DeFi skills for AI agents — supply, borrow, stake, and manage positions across protocols using the Agentic Wallet.
Each skill provides CLI scripts, ABI encoding patterns, permission templates, and workflow guidance that agents follow step-by-step.
- Language: TypeScript (ESM — imports use
.jsextensions) - Runtime: Node.js (TypeScript compiled to JS via
tsc) - Package manager: npm
- Key dependency: viem for EVM interaction (encoding, contract reads, clients)
- Supported networks: Ethereum, Arbitrum, Optimism, Base, Polygon
.claude-plugin/ # Claude Code plugin metadata
plugin.json # Plugin manifest
marketplace.json # Marketplace registration
commands/ # Slash commands
aave.md # /aave command definition
hooks/ # Plugin hooks
hooks.json # Hook configuration
check-mcp # SessionStart hook — checks MCP server config
skills/<protocol>/
SKILL.md # Agent-readable skill documentation (read before any task)
<cli>.ts # CLI entry point
shared/ # Reusable utilities (ABIs, addresses, clients)
scripts/ # One file per operation
As a plugin (paths are resolved automatically via ${CLAUDE_PLUGIN_DATA}):
node ${CLAUDE_PLUGIN_DATA}/dist/skills/aave-agentic-wallet/aave.js <subcommand> [options] # Run Aave CLI
node ${CLAUDE_PLUGIN_DATA}/dist/skills/spark-agentic-wallet/spark.js <subcommand> [options] # Run SparkLend CLIAs a standalone skill (run from the repository root):
npm install # Install dependencies
npm run build # Compile TypeScript to dist/
node dist/skills/aave-agentic-wallet/aave.js <subcommand> [options] # Run Aave CLI
node dist/skills/spark-agentic-wallet/spark.js <subcommand> [options] # Run SparkLend CLIThere are no test or lint scripts configured.
- Filenames and CLI args: kebab-case (
grant-permissions,check-position) - Constants: UPPER_CASE (
POOL,RAY,CHAIN_IDS) - Functions/variables: camelCase
- Address types:
0x${string} - ABIs: defined with
as const - Calldata encoding: always via viem's
encodeFunctionData() - Contract reads: always via viem's
readContract() - Error handling:
Promise.allSettledfor parallel operations
- Interest rate mode is always
2(variable) — mode1(stable) is deprecated - ERC-20 operations require prior
approveto the Pool contract - Use
execute_batch_txfor atomic approve+action pairs - Health factor units:
1e18(1.0 is the liquidation threshold) - APY rates from Aave are in Ray units (
1e27); convert:rate / 1e27 * 100
This project expects two MCP servers configured (see .mcp.example.json):
- agentic-wallet (stdio) — Transaction signing and submission via Agentic Wallet
- lifi (HTTP) — Bridge aggregation at
https://mcp.li.quest/mcp
The following project-specific skills are available. Read the relevant SKILL.md before starting any task involving that protocol:
- Aave V3 →
skills/aave-agentic-wallet/SKILL.md - SparkLend →
skills/spark-agentic-wallet/SKILL.md - Merkl →
skills/merkl-agentic-wallet/SKILL.md
- Create
skills/<protocol>/with aSKILL.mdand CLI entry point - Include: protocol overview, CLI scripts, contract addresses per network, ABI encoding examples, permission templates, common mistakes
- Register the skill in this file under the Skills section