lending-protocol-security

lending-protocol-security is a skill for Claude Code, Codex from PlamenTSV/plamen. It costs 53 tokens per session (3,612 once invoked), scanned A, original, MIT.

A code-audit skill for lending protocols, which let users borrow assets against collateral. It examines the rules for borrowing, repayment, interest, collateral value, and liquidation—the forced sale of collateral when a loan becomes too risky.

In plain words
What is it for?
It is for reviewing health factors, loan-to-value limits, interest accrual, collateral updates, liquidations, bad-debt handling, pauses, and price-oracle use.
Why use it?
It helps find calculation and state errors that can let borrowers take too much, avoid liquidation, or leave the protocol with unpaid debt. It also checks dependencies such as price feeds.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for reviewing health factors, loan-to-value limits, interest accrual, collateral updates, liquidations, bad-debt handling, pauses, and price-oracle use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/plamentsv/plamen/lending-protocol-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PlamenTSV/plamen --skill lending-protocol-security
Clone the repo
git clone --depth 1 https://github.com/PlamenTSV/plamen

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lending-protocol-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/plamentsv/plamen/lending-protocol-security/github.svg)](https://agentmods.dev/skills/plamentsv/plamen/lending-protocol-security)
Your own site
<a href="https://agentmods.dev/skills/plamentsv/plamen/lending-protocol-security"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/lending-protocol-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lending-protocol-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/plamentsv/plamen/lending-protocol-security"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/lending-protocol-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.03612
Opus 5 $0.00026 $0.01806
Sonnet 5 $0.00011 $0.00722
Haiku 4.5 $0.00005 $0.00361

Measured 6d ago against content hash 18ec61a9ee20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

lending-protocol-security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/skills/injectable/lending-protocol-security/SKILL.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Injectable Skill: Lending Protocol Security

Protocol Type Trigger: lending (detected when recon finds: liquidate|borrow|repay|collateral|lend|loan|LTV|healthFactor|interestRate|debtToken) Inject Into: Breadth agents, depth-token-flow, depth-edge-case, depth-state-trace Language: Language-agnostic methodology Finding prefix: [LEND-N]

Orchestrator Decomposition Guide

When decomposing this skill into depth agent investigation questions, map sections to domains:

  • Sections 1, 4: depth-edge-case (health factor boundaries, first borrower)
  • Sections 2, 5: depth-state-trace (interest accrual, collateral state, pause mechanics)
  • Sections 3, 3b, 3c: depth-token-flow (liquidation flows, bad debt socialization)
  • Section 6: depth-external (oracle dependency for pricing)

When This Skill Activates

Recon classifies protocol as lending type based on indicators: liquidate, borrow, repay, collateral, lend, loan, LTV, healthFactor, interestRate, debtToken, reserve, utilizationRate, debtShare. This skill adds lending-specific checks that the general ECONOMIC_DESIGN_AUDIT does not cover.


1. Health Factor Boundary Analysis

1a. Health Factor Computation

Identify the health factor (HF) formula and trace each input:

  • What is the formula? (typically: HF = (collateralValue * liquidationThreshold) / debtValue)
  • How is collateralValue derived? (oracle price * collateral amount * collateral factor)
  • How is debtValue derived? (oracle price * borrow amount including accrued interest)
  • Is interest included in the HF check at the moment of the check, or from a stale snapshot?

Substitute boundary values into the formula:

State HF Value Expected Behavior Actual?
HF = 1.0 exactly Liquidation threshold - which side?
HF = 1.0 + 1 wei Should NOT be liquidatable
HF = 1.0 - 1 wei Should be liquidatable
HF after max interest accrual Worst case between check intervals
HF with dust collateral Liquidation gas > reward?

Read the full file on GitHub · 268 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 268 lines · 53 tokens per session scan A 18ec61a9ee20

Subscribe to this mod's changes

lending-protocol-security is a skill published in the GitHub repository PlamenTSV/plamen (295 stars, last pushed 2d ago), licensed MIT. It adds 53 tokens to every session and 3,612 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

perp-cli

Multi-DEX perpetual futures trading via the perp-cli command-line tool. Use when user asks to: trade perps, check funding rates, scan/execute arbitrage (perp-perp or spot-perp), run delta-neutral strategies, bridge USDC across chains, manage positions/orders/leverage, deposit/withdraw, hedge spot+perp, trade HIP-3…

hypurrquant/perp-cli · 152 tokens

buy-x402

Buy from any x402-gated endpoint. Start with go — it probes, detects the offer type, and runs the right flow. Expert flows underneath: pay for one-shot HTTP services (single authorization, no sidecar), pay-agent for one-shot streaming agent calls, and buy for long-running paid inference (pre-authorized batch via…

ObolNetwork/obol-stack · 132 tokens

ethereum-local-wallet

Execute Ethereum transactions NOW — send ETH, approve tokens, call contracts, sign messages. Uses the in-cluster remote-signer (agents never touch private keys). Use this skill whenever the user wants to DO something onchain, not just learn about wallets.

ObolNetwork/obol-stack · 55 tokens

gas

Current Ethereum gas prices, transaction costs, and the real economics of building on Ethereum today. Use when estimating costs, choosing between mainnet and L2s, or when a user asks about Ethereum being expensive. Counters the.

ObolNetwork/obol-stack · 47 tokens

swap

Swap tokens on the chains the Obol Stack supports — USDC, WETH/ETH, and OBOL on Base and Ethereum mainnet via Uniswap V3. Use when earnings need converting (USDC → ETH for gas, consolidating USDC/OBOL revenue, rebalancing the agent treasury) or the user says 'swap', 'convert', 'sell my USDC', 'get ETH for gas'. Quote…

ObolNetwork/obol-stack · 101 tokens

stablecoin-chain-explorer

Explore stablecoin TVL distribution and yield opportunities by blockchain. Query which chains have the most stablecoins, compare cross-chain yields, and find the best opportunities on Ethereum, BSC, Arbitrum, Base, Polygon, and more. Powered by Barker (https://barker.money) — Yield Primitive for the Agent Economy.

okx/plugin-store · 72 tokens