Agent skill

Simulating Flash Loans

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer.

MITAuto-check passedBusiness, Finance & HR

Install Simulating Flash Loans

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill simulating-flash-loans -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace simulating-flash-loans --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/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/simulating-flash-loans .claude/skills/simulating-flash-loans && 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
simulating-flash-loans
GitHub stars
2.8k
Token cost
~1.1k tokens
SKILL.md length
290 words
Files
13 (incl. scripts, references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer.

  • Works in 4 steps: Install Python 3.9+ with web3, httpx,… → Configure RPC endpoint access (free… → Optionally add Etherscan API key for… → …
  • Simulating flash loans
  • SKILL.md covers Contents, Overview, Prerequisites and Instructions, plus 4 more sections
  • Runs Python scripts from its folder; calls python

What it does

Simulating Flash Loans is an agent skill from jeremylongshore/tons-of-skills-marketplace. Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer. Use when simulating flash loans, analyzing arbitrage profitability, evaluating liquidation opportunities, or comparing flash loan providers. Trigger with phrases like "simulate flash loan", "flash loan arbitrage", "liquidation profit", "compare Aave dYdX", "flash loan strategy", or "DeFi arbitrage simulation".

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including scripts and reference files (for example `ARD.md`, `PRD.md` and `config/settings.yaml`). Compatibility notes: Designed for Claude Code

It sits in Business, Finance & HR, covering Crypto and DeFi analysis. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Simulating flash loans
  • Analyzing arbitrage profitability
  • Evaluating liquidation opportunities
  • Comparing flash loan providers

Example prompts

  • “simulate flash loan”
  • “flash loan arbitrage”
  • “liquidation profit”
  • “/simulating-flash-loans”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(crypto:flashloan-*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Install Python 3.9+ with web3, httpx, and rich packages
  2. Configure RPC endpoint access (free public RPCs via https://chainlist.org work fine)
  3. Optionally add Etherscan API key for better gas estimates
  4. Set RPC in ${CLAUDE_SKILL_DIR}/config/settings.yaml or use ETH_RPC_URL env var

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(crypto:flashloan-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

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

  • Network

    Links to these hosts (documentation or services it may open):

    • chainlist.org
    • docs.aave.com
    • docs.flashbots.net

    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.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Simulating Flash Loans loads about 1.1k tokens when it runs, and up to ~7.4k if it reads all its reference files. Until then it costs about 113 tokens; SKILL.md has 290 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~113
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.4k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 290 words, ~1,144 tokens.

Download SKILL.mdSave it as .claude/skills/simulating-flash-loans/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
simulating-flash-loans
description
Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer. Use when simulating flash loans, analyzing arbitrage profitability, evaluating liquidation opportunities, or comparing flash loan providers. Trigger with phrases like "simulate flash loan", "flash loan arbitrage", "liquidation profit", "compare Aave dYdX", "flash loan strategy", or "DeFi arbitrage simulation".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(crypto:flashloan-*)
compatibility
Designed for Claude Code
version
1.30.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
crypto, simulating-flash

Simulating Flash Loans

Contents

Overview | Prerequisites | Instructions | Output | Error Handling | Examples | Resources

Overview

Simulate flash loan strategies across Aave V3, dYdX, and Balancer with profitability calculations, gas cost estimation, and risk assessment. Evaluate flash loan opportunities without executing real transactions.

Prerequisites

  1. Install Python 3.9+ with web3, httpx, and rich packages
  2. Configure RPC endpoint access (free public RPCs via https://chainlist.org work fine)
  3. Optionally add Etherscan API key for better gas estimates
  4. Set RPC in ${CLAUDE_SKILL_DIR}/config/settings.yaml or use ETH_RPC_URL env var

Instructions

  1. Simulate a two-DEX arbitrage with automatic fee and gas calculation:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py arbitrage ETH USDC 100 \
      --dex-buy uniswap --dex-sell sushiswap
  2. Compare flash loan providers to find the cheapest for your strategy:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py arbitrage ETH USDC 100 --compare-providers
  3. Analyze liquidation profitability on lending protocols:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py liquidation \
      --protocol aave --health-factor 0.95
  4. Simulate triangular arbitrage with multi-hop circular paths:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py triangular \
      ETH USDC WBTC ETH --amount 50
  5. Add risk assessment (MEV competition, execution, protocol, liquidity) to any simulation:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py arbitrage ETH USDC 100 --risk-analysis
  6. Run full analysis combining all features:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py arbitrage ETH USDC 100 \
      --full --output json > simulation.json

Output

  • Quick Mode: Net profit/loss, provider recommendation, Go/No-Go verdict
  • Breakdown Mode: Step-by-step transaction flow with individual cost components
  • Comparison Mode: All providers ranked by net profit with fee differences
  • Risk Analysis: Competition, execution, protocol, and liquidity scores (0-100) with viability grade (A-F)

See ${CLAUDE_SKILL_DIR}/references/implementation.md for detailed output examples and risk scoring methodology.

Error Handling

ErrorCauseSolution
RPC Rate LimitToo many requestsSwitch to backup endpoint or wait
Stale PricesData older than 30sAuto-refreshes with warning
No Profitable RouteAll routes lose after costsTry different pairs or amounts
Insufficient LiquidityTrade exceeds pool depthReduce amount or split across pools

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.

Examples

Basic arbitrage simulation:

bash
python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py arbitrage ETH USDC 100 \
  --dex-buy uniswap --dex-sell sushiswap

Find cheapest provider:

bash
python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py arbitrage ETH USDC 100 --compare-providers

Liquidation opportunity scan:

bash
python ${CLAUDE_SKILL_DIR}/scripts/flash_simulator.py liquidation --protocol aave --health-factor 0.95

See ${CLAUDE_SKILL_DIR}/references/examples.md for multi-provider comparison and backtesting examples.

Resources

  • ${CLAUDE_SKILL_DIR}/references/implementation.md - Provider comparison, strategy details, risk scoring, output modes
  • Aave V3 Flash Loans
  • dYdX Flash Loans
  • Balancer Flash Loans
  • Flashbots Protect

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

Files

SKILL.md and 12 other files (scripts, references) in skills/.curated/simulating-flash-loans of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • ARD.md
  • PRD.md
  • config/settings.yaml
  • references/errors.md
  • references/examples.md
  • references/implementation.md
  • scripts/flash_simulator.py
  • scripts/formatters.py
  • scripts/profit_calculator.py
  • scripts/protocol_adapters.py
  • scripts/risk_assessor.py
  • scripts/strategy_engine.py

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Simulating Flash Loans 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.

Simulating Flash Loans compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Simulating Flash Loans this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated 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 jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated yesterday
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Questions about Simulating Flash Loans

What does Simulating Flash Loans do?

Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer. Simulating Flash Loans is an agent skill from jeremylongshore/tons-of-skills-marketplace. Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer.

When should I use Simulating Flash Loans?

Simulating Flash Loans fits situations like: simulating flash loans; analyzing arbitrage profitability; evaluating liquidation opportunities; comparing flash loan providers.

How do I install Simulating Flash Loans in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill simulating-flash-loans -a claude-code`. Or copy the skill folder (skills/.curated/simulating-flash-loans in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/simulating-flash-loans in your project. Claude Code loads it when a task matches its description.

How do I install Simulating Flash Loans in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill simulating-flash-loans -a codex`. Or copy the skill folder (skills/.curated/simulating-flash-loans in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/simulating-flash-loans in your project. Codex loads it when a task matches its description.

Can I use Simulating Flash Loans 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 jeremylongshore/tons-of-skills-marketplace --skill simulating-flash-loans -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/simulating-flash-loans, .gemini/skills/simulating-flash-loans, .github/skills/simulating-flash-loans and .opencode/skills/simulating-flash-loans in your project.

What does Simulating Flash Loans need to run?

Going by SKILL.md and its folder, Simulating Flash Loans needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(crypto:flashloan-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Simulating Flash Loans access the network?

SKILL.md names 3 domains. As links in the text: chainlist.org, docs.aave.com and docs.flashbots.net. This is read from the text; nothing was executed.

Is Simulating Flash Loans 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Simulating Flash Loans use?

Simulating Flash Loans is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Simulating Flash Loans use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.3k tokens, read only when the agent opens those files.

What are the alternatives to Simulating Flash Loans?

Skills that share tags, products or a category with Simulating Flash Loans: 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 Simulating Flash Loans?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.