defi-security

defi-security is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 63 tokens per session (1,428 once invoked), scanned A, original, MIT.

A pre-deployment checklist for decentralised finance projects, such as exchanges, lending apps, staking systems, and yield products. It covers threats including manipulation, re-entrancy, flash loans, and unsafe approvals.

In plain words
What is it for?
Use it to review a DeFi project before mainnet deployment, checking transaction limits, pricing safeguards, permission handling, and protections against common attacks.
Why use it?
It helps identify security protections that may be missing before a DeFi project is released on a blockchain network.

Skill for Claude CodeCodex

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

Good fit Use it to review a DeFi project before mainnet deployment, checking transaction limits, pricing safeguards, permission handling, and protections against common attacks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/defi-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 ComeOnOliver/skillshub --skill defi-security
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

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 defi-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/defi-security.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/defi-security)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/defi-security"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/defi-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 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.
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.00063 $0.01428
Opus 5 $0.00032 $0.00714
Sonnet 5 $0.00013 $0.00286
Haiku 4.5 $0.00006 $0.00143

Measured 8d ago against content hash b6c2d1289985, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

defi-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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/0xlayerghost/solidity-agent-kit/defi-security/SKILL.md · 88 lines

How it starts

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

DeFi Security Principles

Language Rule

  • Always respond in the same language the user is using. If the user asks in Chinese, respond in Chinese. If in English, respond in English.

Scope: Only applicable to DeFi projects (DEX, lending, staking, LP, yield). Non-DeFi projects can ignore this skill.

Protection Decision Rules

Threat Required Protection
Whale manipulation Daily transaction caps + per-tx amount limits + cooldown window
MEV / sandwich attack EOA-only checks (msg.sender == tx.origin), or use commit-reveal pattern
Arbitrage Referral binding + liquidity distribution + fixed yield model + lock period
Reentrancy ReentrancyGuard on all external-call functions (see solidity-security skill)
Flash loan attack Check block.number change between operations, or use TWAP pricing
Price manipulation Chainlink oracle or TWAP — never rely on spot AMM reserves for pricing
Approval exploit Use safeIncreaseAllowance / safeDecreaseAllowance, never raw approve for user flows
Governance attack Voting requires snapshot + minimum token holding period; timelock ≥ 48h on proposal execution
ERC4626 inflation attack First deposit must enforce minimum amount or use virtual shares to prevent share dilution via rounding
Cross-vault trust bypass Router/Registry relay must verify vault authorization; never trust caller identity inside flash loan callbacks — EVMbench/noya H-08
Collateral ownership exploit Liquidation/staking operations must verify actual NFT/collateral ownership — EVMbench/benddao
Bonding curve manipulation ID/pricing params in create operations must be fully determined before external calls — EVMbench/phi H-06
DEX pair _transfer TOCTOU Never distinguish operation type by balance/reserve checks in _transfer — both directions are exploitable: buy vs removeLiquidity (pair→user) and sell vs addLiquidity (user→pair); use address whitelist only; new projects prefer Uniswap V4 Hook

Read the full file on GitHub · 88 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. 8d ago First seen · 88 lines · 63 tokens per session scan A b6c2d1289985

Subscribe to this mod's changes

defi-security is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 1,428 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-08-30.

Related

Other skills, from other repositories

defi-amm-security

Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math.

majiang213/OpenClaw-MAS · 48 tokens

agent-payment-x402

Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.

majiang213/OpenClaw-MAS · 47 tokens

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

cymbal

Tree-sitter indexed code navigator. Use the cymbal CLI — not Read, Grep, Glob, or Bash — for finding where symbols are defined, tracing callers and callees, locating interface implementations, understanding the impact of a change, and mapping imports across an existing codebase. Returns precise, token-efficient…

1broseidon/cymbal · 89 tokens

tmux-lane-orchestrator

Manage one tmux agent lane from its matching ops pane, inspect live pane state and Codex logs on cold start, and produce concise manager summaries for OpenClaw and adjacent project work.

vincentkoc/dotskills · 46 tokens

opik-optimizer

Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.

vincentkoc/dotskills · 41 tokens