/galleon-defi-lending-skills:galleon-aave-positionfrom galleon-defi-lending-skills
Produces borrow/repay decisions for Aave V3 positions by reading on-chain health factors, eMode, and per-reserve constraints. Use when checking health, sizing a borrow, or planning repay/collateral withdrawal.
Ships in galleon-defi-lending-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Produce a borrow/repay decision for one EVM Aave V3 pool. First identify chain, PoolAddressesProvider, Pool, account, requested debt asset and action. V4 hubs/spokes and Aptos require their own interfaces; stop this recipe if the deployment is not V3.
For official MCP use, load current MCP procedure first. Its human-unit amounts differ from the raw contract calls below.
getPool() and getPriceOracle(). Pin reads to one block and record its timestamp. Do not reuse another chain's deployment or assume USD base units.getUserAccountData(account) and getUserEMode(account). Account data includes collateral/debt in the oracle base currency, weighted liquidation threshold/LTV in basis points, and health factor in 1e18 units. Read the oracle base unit and asset prices before converting values.getUserAccountData. Stop sizing if the discrepancy cannot be explained by accrual, rounding, eMode or different blocks. Do not infer available liquidity from supply caps.Build current, requested-post-state and stressed-post-state rows. Health factor is liquidation-threshold-weighted collateral value divided by debt value. Apply collateral and debt price shocks separately; include interest over the requested holding period. Changing eMode or collateral composition invalidates the old weighted threshold. Zero debt means no finite liquidation health factor, not a divide-by-zero error.
Use a user-selected minimum health factor, never a universal safe threshold. Report the protocol's maximum separately from that user's budget. A collateral withdrawal can reduce health faster than its unweighted value suggests. Borrowing at the limit leaves no allowance for debt accrual or oracle moves.
For a requested borrow, prepare borrow(asset, amount, 2, 0, onBehalfOf) only after reserve checks. Borrowing for another account requires credit delegation, not ERC20 approval. A repay uses the debt asset, and a subsequent withdrawal must be simulated against the repaid state. Exact full repayment needs an accrual buffer or the documented full-repay mode for the actual caller; never assume a displayed debt amount clears it.
Return the requested decision, exact deployment and chain, block/time, raw-unit observations, calculation assumptions, and the next missing read. Distinguish an indexed estimate, an onchain read, a simulated call and a confirmed transaction. Research ends with an actionable decision record; it does not require connecting a wallet.
For a requested write, prepare the complete unsigned sequence and simulate with the actual sender, amount, recipient and allowance state. Preserve authorization already supplied; research does not grant debt, spending or signing authority. Never request keys. After an authorized transaction, verify its receipt and the relevant balance or position change. On an ambiguous timeout, reconcile its hash and nonce before retrying.
Read protocol references and worked record only for the selected operation. Documentation checked 2026-10-08; refresh deployments and current parameters at use time. This directory is independently installable.
ATTRIBUTION.md (opens in a new tab)LICENSE (opens in a new tab)agents/openai.yaml (opens in a new tab)references/mcp.md (opens in a new tab)references/recipe.md (opens in a new tab)scripts/scenario.example.json (opens in a new tab)scripts/stress.test.ts (opens in a new tab)scripts/stress.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub galleonlabs/crypto-defi-skills --plugin galleon-defi-lending-skills9 skills in this plugin
/galleon-aave-v4Use when inspecting an Aave V4 Hub/Spoke position, sizing supply or borrowing, preparing repay/withdraw calls, or reconciling a V4 execution plan through official Aave MCP or AaveKit. V3 Pools, eMode and Aptos require their own interfaces./galleon-compound-borrowUse when planning a Compound III Comet base-asset borrow, repayment or collateral withdrawal and checking baseBorrowMin and collateral factors./galleon-defi-lendingUse when researching lending markets, planning supply, borrow, repay or withdrawals, or monitoring liquidation risk across Aave, Morpho, Compound, Euler, Spark, Kamino and Save.