agent-credit
БесплатноБез исполняемых скриптовНе проверенBorrow from Aave via credit delegation. Agent self-funds by borrowing against delegator collateral. Supports borrow, repay, health checks. Works on Aave V2/V3.
от lxyeternal★ 68 звёзд на GitHubОб этом скилле
Aave Credit Delegation
Borrow funds from Aave using delegated credit. Your main wallet supplies collateral and delegates borrowing power to the agent's wallet. The agent can then autonomously borrow tokens when needed — the debt accrues against the delegator's position.
Protocol: Works on Aave V3 and Aave V2 — the function signatures for credit delegation (
borrow,repay,approveDelegation,borrowAllowance) are identical across both versions. Just swap in the V2 LendingPool and ProtocolDataProvider addresses. The only cosmetic difference: V3 returns collateral/debt in USD (8 decimals), V2 in ETH (18 decimals). The health factor safety check works correctly on both.
Compatible With
- OpenClaw — Install as a skill, the agent borrows autonomously
- Claude Code — Run scripts directly from a Claude Code session
- Any agent framework — Plain bash + Foundry's
cast, works anywhere with a shell
Combines with Bankr skills for borrow-then-swap flows: borrow USDC via delegation, then use Bankr to swap, bridge, or deploy it.
How Credit Delegation Works
Credit delegation in Aave V3 separates two things: borrowing power and delegation approval.
Borrowing power is holistic. It comes from your entire collateral position across all assets. If you deposit $10k worth of ETH at 80% LTV, you have $8k of borrowing power — period. That borrowing power isn't locked to any specific asset.
Delegation approval is isolated per debt token. You control which assets the agent can borrow and how much of each by calling approveDelegation() on individual VariableDebtTokens. Each asset has its own debt token contract, and each approval is independent.
This means you can, for example:
- Deposit ETH as collateral (gives you broad borrowing power)
- Approve the agent to borrow up to 500 USDC (via the USDC VariableDebtToken)
- Approve the agent to borrow up to 0.1 WETH (via the WETH VariableDebtToken)
- Leave cbETH unapproved (agent cannot borrow it at all)
The agent can only borrow assets you've explicitly approved, up to the amounts you've set — but the capacity to borrow comes from your total collateral, not from any single deposit.
Your Collateral (holistic) Delegation Approvals (isolated)
┌─────────────────────────┐ ┌──────────────────────────────┐
│ $5k ETH │ │ USDC DebtToken → agent: 500 │
│ $3k USDC │ ───LTV───▶ │ WETH DebtToken → agent: 0.1 │
│ $2k cbETH │ = $8k │ cbETH DebtToken → agent: 0 │
│ Total: $10k @ 80% LTV │ capacity └──────────────────────────────┘
└─────────────────────────┘
Flow
Delegator (your wallet) Agent Wallet (delegatee)
│ │
│ 1. supply collateral to Aave │
│ 2. approveDelegation(agent, amount) │
│ on the VariableDebtToken │
│ │
│ ┌─── 3. borrow(asset, │
│ │ amount, onBehalfOf │
│ │ = delegator) │
│ │ │
│ [debt on YOUR position] [tokens in agent wallet]
│ │ │
│ └─── 4. repay(asset, │
│ amount, onBehalfOf │
│ = delegator) │
Quick Start
Prerequisites
Foundry must be installed (
castCLI):curl -L https://foundry.paradigm.xyz | bash && foundryupDelegator setup (done ONCE by the user, NOT the agent):
- Supply collateral to Aave V3 (via app.aave.com or contract)
- Call
approveDelegation(agentAddress, maxAmount)on the VariableDebtToken of the asset you want the agent to borrow - The VariableDebtToken address can be found via:
cast call $DATA_PROVIDER "getReserveTokensAddresses(address)(address,address,address)" $ASSET --rpc-url $RPC
Configure the skill:
mkdir -p ~/.openclaw/skills/aave-delegation cat > ~/.openclaw/skills/aave-delegation/config.json << 'EOF' { "chain": "base", "rpcUrl": "https://mainnet.base.org", "agentPrivateKey": "0xYOUR_AGENT_PRIVATE_KEY", "delegatorAddress": "0xYOUR_MAIN_WALLET", "poolAddress": "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", "dataProviderAddress": "0x2d8A3C5677189723C4cB8873CfC9C8976FDF38Ac", "assets": { "USDC": { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "decimals": 6 }, "WETH": { "address": "0x4200000000000000000000000000000000000006", "decimals": 18 } }, "safety": { "minHealthFactor": "1.5", "maxBorrowPerTx": "1000", "maxBorrowPerTxUnit": "USDC" } } EOF
Установить agent-credit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл agent-credit?
Borrow from Aave via credit delegation. Agent self-funds by borrowing against delegator collateral. Supports borrow, repay, health checks. Works on Aave V2/V3.
Как установить скилл agent-credit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-credit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic