Agent skill

Curve Integration

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when integrating with Curve Finance for stablecoin swaps, liquidity provision, or gauge-based reward systems.

MITAuto-check passedBusiness, Finance & HR

Install Curve Integration

skills CLI
$ npx skills add ccashwell/evm-cortex --skill curve-integration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex curve-integration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/curve-integration .claude/skills/curve-integration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
curve-integration
GitHub stars
131
Token cost
~1.3k tokens
SKILL.md length
222 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when integrating with Curve Finance for stablecoin swaps, liquidity provision, or gauge-based reward systems.

  • Integrating with Curve Finance for stablecoin swaps
  • SKILL.md covers Pool Types, StableSwap Amplification…, Core Swap Interface and Safe Swap Pattern, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Liquidity provision

What it does

Curve Integration is an agent skill from ccashwell/evm-cortex. Use when integrating with Curve Finance for stablecoin swaps, liquidity provision, or gauge-based reward systems. Covers StableSwap math, crypto pools, meta-pools, gauge voting, and safe swap patterns.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Crypto and DeFi analysis. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Integrating with Curve Finance for stablecoin swaps
  • Liquidity provision
  • Gauge-based reward systems

Example prompts

  • “/curve-integration”

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Curve Integration loads about 1.3k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 222 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 222 words, ~1,301 tokens.

Download SKILL.mdSave it as .claude/skills/curve-integration/SKILL.md (or your agent's skills folder).
name
curve-integration
description
Use when integrating with Curve Finance for stablecoin swaps, liquidity provision, or gauge-based reward systems. Covers StableSwap math, crypto pools, meta-pools, gauge voting, and safe swap patterns.

Curve Finance Integration

Pool Types

Pool TypeUse CaseMath
StableSwapPegged assets (USDC/USDT/DAI)Hybrid constant-sum/constant-product
CryptoSwapVolatile pairs (ETH/CRV)Dynamic peg with internal oracle
Meta-poolPairs against 3pool LP (fraxBP)Nested pool composition
TricryptoThree volatile assetsGeneralized crypto invariant

StableSwap Amplification Parameter (A)

The invariant is a blend of constant-sum (A = infinity) and constant-product (A = 0):

A * n^n * sum(x_i) + D = A * D * n^n + D^(n+1) / (n^n * prod(x_i))
  • Higher A: tighter peg, lower slippage near peg, catastrophic slippage far from peg
  • Lower A: behaves more like Uniswap constant-product
  • Typical A: 100-2000 for stablecoin pools

Core Swap Interface

solidity
interface ICurvePool {
    // Exchange tokens within the pool
    // i = input token index, j = output token index
    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) external returns (uint256);

    // For ETH pools, send ETH as msg.value
    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy)
        external payable returns (uint256);

    // Get expected output (use for quoting, NOT as min_dy)
    function get_dy(int128 i, int128 j, uint256 dx) external view returns (uint256);

    // Liquidity operations
    function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external returns (uint256);
    function remove_liquidity(uint256 _amount, uint256[3] calldata min_amounts) external returns (uint256[3] memory);
    function remove_liquidity_one_coin(uint256 _amount, int128 i, uint256 min_amount) external returns (uint256);

    function get_virtual_price() external view returns (uint256);
    function A() external view returns (uint256);
    function balances(uint256 i) external view returns (uint256);
}

Safe Swap Pattern

solidity
contract CurveSwapper {
    ICurvePool public immutable pool;
    uint256 public constant MAX_SLIPPAGE_BPS = 50; // 0.5%

    constructor(address _pool) {
        pool = ICurvePool(_pool);
    }

    function swap(
        int128 tokenIn,
        int128 tokenOut,
        uint256 amountIn,
        address recipient
    ) external returns (uint256 amountOut) {
        IERC20(pool.coins(uint256(int256(tokenIn)))).transferFrom(
            msg.sender, address(this), amountIn
        );
        IERC20(pool.coins(uint256(int256(tokenIn)))).approve(address(pool), amountIn);

        uint256 expected = pool.get_dy(tokenIn, tokenOut, amountIn);
        uint256 minOut = expected * (10000 - MAX_SLIPPAGE_BPS) / 10000;

        amountOut = pool.exchange(tokenIn, tokenOut, amountIn, minOut);

        IERC20(pool.coins(uint256(int256(tokenOut)))).transfer(recipient, amountOut);
    }
}

stETH/ETH Pool Integration

solidity
// Curve stETH/ETH pool: 0xDC24316b9AE028F1497c275EB9192a3Ea0f67022
// Index 0 = ETH, Index 1 = stETH
ICurvePool stethPool = ICurvePool(0xDC24316b9AE028F1497c275EB9192a3Ea0f67022);

// Swap ETH -> stETH
uint256 minSteth = stethPool.get_dy(0, 1, msg.value) * 9950 / 10000;
uint256 received = stethPool.exchange{value: msg.value}(0, 1, msg.value, minSteth);

// Swap stETH -> ETH
IERC20(steth).approve(address(stethPool), amount);
uint256 ethReceived = stethPool.exchange(1, 0, amount, minEth);

Gauge Voting and CRV Rewards

solidity
interface ICurveGauge {
    function deposit(uint256 _value) external;
    function withdraw(uint256 _value) external;
    function claim_rewards() external;
    function claimable_reward(address _addr, address _token) external view returns (uint256);
    function balanceOf(address) external view returns (uint256);
}

// Deposit LP tokens into gauge to earn CRV
IERC20(lpToken).approve(address(gauge), amount);
gauge.deposit(amount);

// Claim CRV rewards
gauge.claim_rewards();

Virtual Price and LP Valuation

get_virtual_price() returns the value of 1 LP token in terms of the pool's unit of account. It should only increase (manipulation-resistant).

solidity
// LP value = lp_balance * virtual_price / 1e18
uint256 virtualPrice = pool.get_virtual_price();
uint256 lpValue = lpBalance * virtualPrice / 1e18;

Warning: Do NOT use get_virtual_price() as a price oracle for lending — it was exploitable via read-only reentrancy in older Vyper versions. Use Chainlink or Curve's dedicated oracle for that purpose.

Checklist

  • Use get_dy() for quoting but apply your own slippage tolerance for min_dy
  • Handle ETH pools via msg.value (index 0 is typically native ETH)
  • Verify token indices — they vary per pool deployment
  • Never use get_virtual_price() as a lending oracle without reentrancy guards
  • Deposit LP tokens into gauges for CRV emissions
  • Check pool A parameter — low A pools have higher slippage
  • Test against forked mainnet with real pool state

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/curve-integration of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Curve Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Curve Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Curve Integration this skillccashwell/evm-cortex131—~1.3kAutomated safety check: PassMIT
Technical Analysttradermonty/claude-trading-skills3k4 repos~4.6kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Longbridge Researchhelsome/folio2703 repos~2.1kAutomated safety check: PassMIT
Stock Analysis24mlight/StockClaw1012 repos~2kAutomated safety check: NotesMIT
Swapper Depositswapperfinance/swapper-toolkit852—~1.8kAutomated safety check: PassMIT

Similar skills

  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Longbridge Research

    helsome/folio

    Institution ratings, consensus price targets, EPS/revenue forecasts, finance calendar, shareholder data, fund holders, insider trades (SEC Form 4), short interest, industry rankings, peer group…

    270 GitHub starsUsed in 3 repos~2.1k tokens
    Business, Finance & HRAuto-check passed
  • Stock Analysis

    24mlight/StockClaw

    Analyze stocks and cryptocurrencies using Yahoo Finance data.

    101 GitHub starsUsed in 2 repos~2k tokens
    Business, Finance & HRAuto-check: notes
  • Swapper Deposit

    swapperfinance/swapper-toolkit

    Deposit and bridge funds into a wallet or protocol using Swapper Finance.

    852 GitHub stars~1.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Okx Cex Earn

    okx/agent-skills

    Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI.

    186 GitHub starsUsed in 2 repos~3.3k tokens
    Business, Finance & HRAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 9 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 9 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 9 days ago
    Auto-check passed

Questions about Curve Integration

What does Curve Integration do?

A skill your agent uses when integrating with Curve Finance for stablecoin swaps, liquidity provision, or gauge-based reward systems. Curve Integration is an agent skill from ccashwell/evm-cortex. Use when integrating with Curve Finance for stablecoin swaps, liquidity provision, or gauge-based reward systems.

When should I use Curve Integration?

Curve Integration fits situations like: integrating with Curve Finance for stablecoin swaps; liquidity provision; gauge-based reward systems.

How do I install Curve Integration in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill curve-integration -a claude-code`. Or copy the skill folder (skills/curve-integration in ccashwell/evm-cortex) into .claude/skills/curve-integration in your project. Claude Code loads it when a task matches its description.

How do I install Curve Integration in Codex?

Run `npx skills add ccashwell/evm-cortex --skill curve-integration -a codex`. Or copy the skill folder (skills/curve-integration in ccashwell/evm-cortex) into .agents/skills/curve-integration in your project. Codex loads it when a task matches its description.

Can I use Curve Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill curve-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/curve-integration, .gemini/skills/curve-integration, .github/skills/curve-integration and .opencode/skills/curve-integration in your project.

What does Curve Integration need to run?

SKILL.md names no scripts, command-line tools or credentials: Curve Integration is instructions for the agent only.

Does Curve Integration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Curve Integration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Curve Integration use?

Curve Integration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Curve Integration use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Curve Integration?

Skills that share tags, products or a category with Curve Integration: Technical Analyst (tradermonty/claude-trading-skills, 3k stars), Polyclaw (chainstacklabs/polyclaw, 359 stars), Longbridge Research (helsome/folio, 270 stars) and Stock Analysis (24mlight/StockClaw, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Curve Integration?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.