Skip to content
Skill

Defi amm security

Checklist and hardened patterns for auditing or writing Solidity AMM and swap code

Defi amm security is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
66
Last commit
License
MIT
Listing updated

Similar skills

About Defi amm security

This skill gives the agent a security review checklist for Solidity automated market makers, liquidity pool vaults and swap functions. It walks through the main vulnerability classes, including reentrancy, checks-effects-interactions ordering, donation and inflation attacks on share math, spot-price oracle manipulation, slippage and deadline checks, overflow-prone reserve arithmetic and privileged admin functions, and pairs each with a vulnerable and a safer code pattern.

When reviewing code, the agent is directed to check each user entrypoint against these categories and to prefer established libraries such as OpenZeppelin guards and SafeERC20 over hand-written variants. The skill also includes a closing checklist covering access control, emergency pause and testing coverage.

The skill expects Solidity contracts as input and refers to tools such as Slither, Echidna and Foundry's forge fuzzing. Its shell commands are presented as local audit examples, and the skill tells the agent to run them only in a trusted checkout or sandbox and to ask before installing tools or starting long jobs.

When your agent uses it

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. Use when auditing or writing Solidity AMM, liquidity pool, or swap code.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (6 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath

Or copy only this skill to ~/.claude/skills/defi-amm-security:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/defi-amm-security &&
cp -R "$tmp/.agents/skills/defi-amm-security" ~/.claude/skills/defi-amm-security &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/defi-amm-security inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/defi-amm-security to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/defi-amm-security &&
cp -R "$tmp/.agents/skills/defi-amm-security" ~/.agents/skills/defi-amm-security &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/defi-amm-security inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/defi-amm-security to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/defi-amm-security &&
cp -R "$tmp/.agents/skills/defi-amm-security" ~/.cursor/skills/defi-amm-security &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/defi-amm-security inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/defi-amm-security

Or copy the folder to ~/.gemini/skills/defi-amm-security yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/defi-amm-security:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/defi-amm-security &&
cp -R "$tmp/.agents/skills/defi-amm-security" ~/.copilot/skills/defi-amm-security &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/defi-amm-security inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git

Then copy REA_Skill/.agents/skills/defi-amm-security into your agent's skills folder as defi-amm-security. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Reentrancy and CEI ordering
Checks that external calls follow checks-effects-interactions and that risky entrypoints use a reentrancy guard.
Donation and inflation defenses
Covers share math that relies on raw token balances and recommends tracking internal accounting.
Oracle manipulation checks
Explains why spot prices are manipulable and shows reading a Uniswap V3 TWAP instead.
Slippage and deadline guards
Requires caller-provided minimum output and a deadline on every swap path.
Safe reserve math
Points to overflow-resistant multiplication and division such as mulDiv for large reserve calculations.
Admin control review
Covers access control on privileged functions, two-step ownership transfer and emergency pause.
Audit tool commands
Lists example commands for Slither, Echidna and Foundry fuzzing to run against a contract.

Good for

  • Audit a Solidity liquidity pool for reentrancy and CEI ordering issues
  • Review a swap function for missing slippage limits and deadlines
  • Check a vault's share calculation for donation or inflation attack exposure
  • Replace spot price reads in an AMM with a TWAP oracle
  • Write a deposit and withdraw flow that uses SafeERC20 and a reentrancy guard

Defi amm security FAQ

What does Defi amm security need to run?

It is a checklist and pattern library for Solidity code. Its audit commands use Slither, Echidna and Foundry, and it says to run them only in a trusted checkout or sandbox and to ask before installing tools or starting long jobs.

When does the agent use Defi amm security?

It applies when auditing or writing Solidity AMM, liquidity pool or swap code.

Does Defi amm security change any files or contracts?

The skill itself only provides instructions and code examples. It does not include scripts.

Which vulnerability categories does Defi amm security cover?

Reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls and integer math.

How do I install Defi amm security in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/defi-amm-security to use it in all your projects, or to .claude/skills/defi-amm-security in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

Does Defi amm security run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Defi amm security?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Defi amm security?

The closest alternatives to Defi amm security are Secure workflow guide, Token integration analyzer, Entry point analyzer, Solana vulnerability scanner and Agent security hardening.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from smartworldarafath/REA_Skill

  1. Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android

    • Open source
    • 66 GitHub stars
    • Developer tools
  2. Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity

    • Open source
    • 66 GitHub stars
    • Developer tools
  3. Compare coding agents head-to-head on your own tasks by pass rate, cost and time

    • Open source
    • 66 GitHub stars
    • Developer tools
  4. Guides an agent to design tool sets, observations and error recovery for better completion

    • Open source
    • 66 GitHub stars
    • Developer tools
  5. Lets an AI agent make x402 payments within per-task budgets and spending policies

    • Open source
    • 66 GitHub stars
    • Finance and payments