Borrow from Aave via credit delegation. Agent self-funds by borrowing against delegator collateral. Supports borrow, repay, health checks. Works on Aave V2/V3.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install agent-credit或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install agent-credit⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/agent-credit/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: agent-credit description: Borrow from Aave via credit delegation. Agent self-funds by borrowing against delegator collateral. Supports borrow, repay, health checks. Works on Aave V2/V3. ---
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.
cast, works anywhere with a shellCombines with Bankr skills for borrow-then-swap flows: borrow USDC via delegation, then use Bankr to swap, bridge, or deploy it.
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:
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 └──────────────────────────────┘
└─────────────────────────┘
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) │
cast CLI):```bash curl -L https://foundry.paradigm.xyz | bash && foundryup ```
- 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
```bash 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 ```
```bash scripts/aave-setup.sh ```
# Full status report
scripts/aave-status.sh
# Check specific asset delegation
scripts/aave-status.sh USDC
# Just health factor
scripts/aave-status.sh --health-only
# Borrow 100 USDC
scripts/aave-borrow.sh USDC 100
# Borrow 0.5 WETH
scripts/aave-borrow.sh WETH 0.5
The borrow script automatically:
# Repay 100 USDC
scripts/aave-repay.sh USDC 100
# Repay all USDC debt
scripts/aave-repay.sh USDC max
The repay script automatically:
Every borrow operation runs these checks BEFORE executing:
minHealthFactor (default 1.5) AFTER this borrow?maxBorrowPerTx?If ANY check fails, the borrow is aborted with a clear error message.
⚠️ The agent must NEVER bypass safety checks. If the user asks the agent to borrow and the health factor is too low, the agent should refuse and explain why.
| Chain | Pool Address | Gas Cost | |-----------|----------------------------------------------|-----------| | Base | 0xA238Dd80C259a72e81d7e4664a9801593F98d1c5 | Very Low | | Ethereum | 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 | High | | Polygon | 0x794a61358D6845594F94dc1DB02A252b5b4814aD | Very Low | | Arbitrum | 0x794a61358D6845594F94dc1DB02A252b5b4814aD | Low |
See deployments.md for full address list including debt tokens.
...
安装 Agent Credit 后,可以对 AI 说这些话来触发它
Help me get started with Agent Credit
Explains what Agent Credit does, walks through the setup, and runs a quick demo based on your current project
Use Agent Credit to borrow from Aave via credit delegation
Invokes Agent Credit with the right parameters and returns the result directly in the conversation
What can I do with Agent Credit in my finance & investment workflow?
Lists the top use cases for Agent Credit, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/agent-credit/ 目录(个人级,所有项目可用),或 .claude/skills/agent-credit/(项目级)。重启 AI 客户端后,用 /agent-credit 主动调用,或让 AI 根据上下文自动发现并使用。
Agent Credit 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
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 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Agent Credit
Identifies repetitive steps in your workflow and sets up Agent Credit to handle them automatically