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.
npx skills add ccashwell/evm-cortex --skill flash-loan-usagegit clone --depth 1 https://github.com/ccashwell/evm-cortexWrote 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.
[](https://agentmods.dev/skills/ccashwell/evm-cortex/flash-loan-usage)<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/flash-loan-usage"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/flash-loan-usage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/flash-loan-usage"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/flash-loan-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.01629 |
| Opus 5.5 | $0.00018 | $0.00652 |
| Sonnet 5.5 | $0.00009 | $0.00326 |
| Haiku 4.5 | $0.00005 | $0.00163 |
Grade A, and why
flash-loan-usage 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flash Loan Patterns
Flash Loan Providers
| Provider | Fee | Multi-Asset | Notes |
|---|---|---|---|
| Aave V3 | 0.05% | Yes (flashLoan) |
Most popular, widest asset support |
| Uniswap V2/V3 | 0.3% / pool fee | Yes (flash swap) | Built into swap, repay with other token |
| Uniswap V4 | 0% | Yes (flash accounting) | Enabled by PoolManager's delta-tracking which will always settle cleanly as long as the full delta is repaid within the unlock context. |
| Balancer V2 | 0% | Yes | Free, limited to Balancer vault assets |
| dYdX | 0% | Limited | Solo margin flash loans |
Aave V3 Flash Loan Receiver
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {FlashLoanSimpleReceiverBase} from
"@aave/v3-core/contracts/flashloan/base/FlashLoanSimpleReceiverBase.sol";
import {IPoolAddressesProvider} from
"@aave/v3-core/contracts/interfaces/IPoolAddressesProvider.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract AaveFlashLoan is FlashLoanSimpleReceiverBase {
address public immutable owner;
constructor(IPoolAddressesProvider provider)
FlashLoanSimpleReceiverBase(provider)
{
owner = msg.sender;
}
function executeOperation(
address asset,
uint256 amount,
uint256 premium,
address initiator,
bytes calldata params
) external override returns (bool) {
require(msg.sender == address(POOL), "caller must be pool");
require(initiator == address(this), "untrusted initiator");
(uint8 action) = abi.decode(params, (uint8));
if (action == 1) _arbitrage(asset, amount);
else if (action == 2) _liquidate(asset, amount, params);
else if (action == 3) _collateralSwap(asset, amount, params);
uint256 repayment = amount + premium;
IERC20(asset).approve(address(POOL), repayment);
return true;
}
function execute(address asset, uint256 amount, bytes calldata params) external {
require(msg.sender == owner, "only owner");
POOL.flashLoanSimple(address(this), asset, amount, params, 0);
}
function _arbitrage(address asset, uint256 amount) internal {
// Buy low on DEX A, sell high on DEX B
// Profit must exceed the 0.05% premium
}
function _liquidate(address asset, uint256 amount, bytes calldata params) internal {
// Use borrowed funds to liquidate an underwater position
// Receive collateral at a discount, swap back to repay
}
function _collateralSwap(address asset, uint256 amount, bytes calldata params) internal {
// Repay existing debt, withdraw old collateral
// Swap to new collateral, deposit, re-borrow
}
}
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.
- 1mo ago First seen · 199 lines · 45 tokens per session scan A 706ca7f3f8b6
flash-loan-usage is a skill published in the GitHub repository ccashwell/evm-cortex (131 stars, last pushed 17d ago), licensed MIT. It adds 45 tokens to every session and 1,629 once invoked, about $0.0002 per session on Opus 5.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-09-03.
Other skills, from other repositories
mpp-agent
Pay HTTP 402 APIs via Machine Payments Protocol (MPP).
bridge
Cross-chain token transfers using Wormhole and CCTP.
hyperliquid
Hyperliquid L1 perps DEX (69% market share).
marginfi
MarginFi — Solana lending and borrowing.
token-pick
One token recommendation and one prediction market pick - scored, quantified, with a skip branch when signals are weak.
crypto-market-rank
Crypto market rankings and leaderboards. Query trending tokens, top searched tokens, Binance Alpha tokens, tokenized stocks, social hype sentiment ranks, smart money inflow token rankings, top meme token rankings from Pulse launchpad, and top trader PnL leaderboards. Use this skill when users ask about token rankings…