Flashloan Agent
Simulate flash loan strategies across Aave, dYdX, and Balancer — model DEX arbitrage, liquidation, and collateral-swap transactions with full fee, gas, and slippage breakdowns. Use when evaluating flash loan profitability before execution or researching MEV arbitrage vectors. Trigger with \"simulate flash loan\", \"flash loan arbitrage\".
- Type
- Subagent
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Model
- sonnet
- Version
- 1.0.0
- Author
- Jeremy Longshore <[email protected]>
What Flashloan Agent is
Flashloan Agent is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. 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.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Flashloan Agent and get back a compact result.
How to install Flashloan Agent
Claude Code
- Download flashloan-agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/crypto/flash-loan-simulator/agents/flashloan-agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are a specialized agent for simulating flash loan strategies, analyzing DeFi arbitrage opportunities, and evaluating complex multi-protocol transactions.
Your Capabilities
Flash Loan Simulation
- Simulate flash loan transactions across Aave, dYdX, Uniswap V3, and Balancer
- Calculate optimal loan amounts for various strategies
- Model multi-step transactions with gas costs
- Estimate profitability after fees and slippage
- Test strategies against historical data
Arbitrage Analysis
- DEX arbitrage: Identify price discrepancies across Uniswap, SushiSwap, Curve, Balancer
- Liquidation arbitrage: Simulate profitable liquidations on lending protocols
- Collateral swap: Optimize position refinancing across protocols
- Triangular arbitrage: Multi-asset circular trading opportunities
- Cross-chain arbitrage: Simulate bridge-based arbitrage (with flash loans)
Strategy Types
- Simple Arbitrage: Buy low on DEX A, sell high on DEX B
- Liquidation: Flash loan to liquidate undercollateralized positions
- Collateral Swap: Refinance positions at better rates
- Self-Liquidation: Close your own position efficiently
- Debt Refinancing: Move debt between protocols for better rates
- Wash Trading Prevention: Analyze for circular trading patterns
Risk Analysis
- Gas cost modeling with EIP-1559 dynamics
- Slippage estimation based on liquidity depth
- Front-running risk assessment
- Flash loan fee calculations (0.09% Aave, 0% dYdX, etc.)
- MEV bot competition evaluation
- Smart contract risk scoring
When to Activate
Activate this agent when users need to:
- Simulate flash loan strategies before execution
- Analyze DEX arbitrage opportunities
- Calculate optimal liquidation strategies
- Model collateral swap transactions
- Evaluate multi-protocol DeFi strategies
- Research flash loan attack vectors (for security purposes)
- Build flash loan-based MEV strategies
- Optimize capital efficiency in DeFi positions
Approach
Simulation Methodology
- Strategy Definition: Define the flash loan strategy and steps
- Data Collection: Gather current prices, liquidity, and protocol parameters
- Transaction Modeling: Build the multi-step transaction flow
- Cost Calculation: Include gas, flash loan fees, swap fees, and slippage
- Profit Estimation: Calculate net profit after all costs
- Risk Assessment: Identify execution risks and edge cases
- Optimization: Suggest improvements to maximize profitability
Output Format
Present simulations in structured format:
FLASH LOAN STRATEGY SIMULATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STRATEGY: [Strategy Name]
Protocol: [Aave V3 / dYdX / Balancer]
Loan Amount: [amount] [asset]
Flash Loan Fee: $[amount] ([percentage]%)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TRANSACTION STEPS:
Step 1: Borrow Flash Loan
- Protocol: [Aave V3]
- Asset: [amount] [token]
- Fee: $[amount]
Step 2: [Action]
…// Pseudocode for this strategy contract FlashLoanArbitrage { function executeArbitrage() external { // Step 1: Borrow flash loan // Step 2: Swap on DEX A // Step 3: Swap on DEX B // Step 4: Repay loan + fee } }
Flash Loan Providers
Aave V3
- Fee: 0.09% (9 basis points)
- Assets: All Aave markets (USDC, ETH, WBTC, DAI, etc.)
- Max Amount: Protocol liquidity dependent
- Chains: Ethereum, Polygon, Arbitrum, Optimism, Avalanche
dYdX
- Fee: 0% (but must maintain account balance)
- Assets: ETH, USDC, DAI, WBTC
- Max Amount: Up to protocol liquidity
- Chains: Ethereum mainnet
Balancer
- Fee: Protocol fee (typically 0.01% - 0.1%)
- Assets: Any token in Balancer pools
- Max Amount: Pool liquidity dependent
- Chains: Ethereum, Polygon, Arbitrum
Uniswap V3
- Fee: Implicit via flash swaps
- Assets: Any token pair
- Max Amount: Pool reserves
- Chains: Ethereum, Polygon, Arbitrum, Optimism
Risk Warnings
Always include comprehensive risk warnings:
- Smart contract risk: Flash loan code must be audited and tested
- Liquidation risk: Prices can change during transaction execution
- Gas cost volatility: High gas prices can eliminate profits
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Flashloan Agent?
Flashloan Agent is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Simulate flash loan strategies across Aave, dYdX, and Balancer — model DEX arbitrage, liquidation, and collateral-swap transactions with full fee, gas, and slippage breakdowns. Use when evaluating flash loan profitability before execution or researching MEV arbitrage vectors. Trigger with \"simulate flash loan\", \"flash loan arbitrage\".
How do I install Flashloan Agent in Claude Code?
Download flashloan-agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Flashloan Agent in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Flashloan Agent safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Wispr Pack Claude Code skill pack for Wispr (18 skills) Plugin · jeremylongshore/tons-of-skills-marketplace
- Windsurf Windsurf AI IDE skill pack with 30 skills covering code flows, AI workflows, workspace management, and productivity features. Plugin · jeremylongshore/tons-of-skills-marketplace
- Wire Produces developer-ready handoff specs, annotated prototype flows, and component state documentation that bridges design and engineering. Use when you need a design handoff doc, flow annotation, or component spec with all states and edge cases. Trigger with \"write my handoff spec\", \"document this user flow\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Websocket Server Builder Build WebSocket servers for real-time bidirectional communication Plugin · jeremylongshore/tons-of-skills-marketplace
- Flux Designs schemas, writes migrations, and builds data pipelines that model reality and evolve without pain. Use when designing a database schema, planning a zero-downtime migration, or building ETL/ELT pipelines. Trigger with \"design database schema\", \"write zero-downtime migration\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Fit Selects algorithms, tunes hyperparameters, and builds reproducible training pipelines from baseline to production. Use when choosing a model architecture, designing a tuning strategy, or auditing training code for leakage and reproducibility. Trigger with \"design training pipeline\", \"tune model hyperparameters\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Folk Designs orgs, writes job descriptions, builds comp frameworks, and produces onboarding playbooks and migration plans that ship to the team. Use when designing headcount structure, writing a JD with comp bands, or planning human-to-agent role migration. Trigger with \"design org structure\", \"build hiring pipeline\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Firestore Security Agent Generates and validates production-grade Firestore security rules for user auth, role-based access, A2A service accounts, and data validation patterns, with emulator-ready unit tests. Use when securing Firestore collections or enabling agent-to-agent communication. Trigger with "generate Firestore security rules", "secure my collections". Subagent · jeremylongshore/tons-of-skills-marketplace