Prism
irfndi/prism-liquidity-agent
Operate Prism, an autonomous Solana DLMM liquidity agent for Meteora pools.
MEV exposure assessment, sandwich attack detection, and protection strategies for Solana DEX trading
$ npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install agiprolabs/claude-trading-skills mev-analysis --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mev-analysis .claude/skills/mev-analysis && rm -rf skills-srcUse ~/.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/
Install the "mev-analysis" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysis into .claude/skills/mev-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mev-analysis", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysisType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install agiprolabs/claude-trading-skills mev-analysis --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/mev-analysis .agents/skills/mev-analysis && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mev-analysis" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysis into .agents/skills/mev-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mev-analysis", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install agiprolabs/claude-trading-skills mev-analysis --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/mev-analysis .cursor/skills/mev-analysis && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mev-analysis" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysis into .cursor/skills/mev-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mev-analysis", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/agiprolabs/claude-trading-skills.git --path skills/mev-analysis--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install agiprolabs/claude-trading-skills mev-analysis --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/mev-analysis .gemini/skills/mev-analysis && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mev-analysis" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysis into .gemini/skills/mev-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mev-analysis", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install agiprolabs/claude-trading-skills mev-analysisInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/mev-analysis .github/skills/mev-analysis && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mev-analysis" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysis into .github/skills/mev-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mev-analysis", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install agiprolabs/claude-trading-skills mev-analysis --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/mev-analysis .opencode/skills/mev-analysis && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mev-analysis" agent skill from https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/mev-analysis into .opencode/skills/mev-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mev-analysis", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mev-analysisMEV exposure assessment, sandwich attack detection, and protection strategies for Solana DEX trading
Mev Analysis is an agent skill from agiprolabs/claude-trading-skills. MEV exposure assessment, sandwich attack detection, and protection strategies for Solana DEX trading
Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/protection_strategies.md`, `references/solana_mev_mechanics.md` and `scripts/mev_risk_estimator.py`).
It sits in Business, Finance & HR, covering Trading and backtesting. It works with Solana. The repository describes itself as: 68 trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 981e1d7. It shows what the files ask for, not the result of running them.
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.
Ships 2 files in scripts/ (Python), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
mainnet.block-engine.jito.wtfFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mev Analysis loads about 3.1k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 895 words of instructions outside code blocks.
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.
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.
The full file from agiprolabs/claude-trading-skills at commit 981e1d7, republished under its MIT licence (© agiprolabs). 895 words, ~3,103 tokens.
.claude/skills/mev-analysis/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Maximal Extractable Value (MEV) is the profit that validators and searchers can extract by reordering, inserting, or censoring transactions within a block. On Solana DEXes, MEV primarily manifests as sandwich attacks against swaps, cross-DEX arbitrage, and liquidation extraction. This skill covers detection, estimation, and protection strategies.
MEV occurs when someone with transaction ordering power profits at other traders' expense. On Solana, the MEV supply chain works as follows:
| Aspect | Ethereum | Solana |
|---|---|---|
| Block time | 12 seconds | ~400ms slots |
| Mempool | Public mempool | No mempool (but tx visible in transit) |
| Ordering | Proposer-builder separation (PBS) | Jito block engine (~85%+ validators) |
| Bundle system | Flashbots bundles | Jito bundles with tips |
| MEV cost | Gas priority fees | Jito tips (SOL) |
| Latency pressure | Moderate | Extreme (sub-100ms decisions) |
Key Solana-specific factors:
The most common MEV attack against retail traders.
Mechanics:
1. Attacker sees your pending swap: Buy 10 SOL worth of TOKEN_X
2. Front-run: Attacker buys TOKEN_X first → price rises
3. Your swap: You buy TOKEN_X at higher price → worse execution
4. Back-run: Attacker sells TOKEN_X → profits the differenceYour loss = price impact from front-run + attacker's profit margin Attacker profit = your_loss - jito_tip - transaction_fees
Risk factors:
Searchers capture price discrepancies between DEXes.
Pool A: TOKEN_X = 1.00 USDC
Pool B: TOKEN_X = 1.02 USDC
→ Buy on A, sell on B, profit 0.02 USDC per token (minus fees)This is generally beneficial to the market — it equalizes prices across venues. However, your trade may trigger the arbitrage opportunity that the searcher captures.
When DeFi positions (Solend, Marginfi, Kamino) become undercollateralized, searchers race to liquidate them and claim the liquidation bonus (typically 5-10%).
Searchers add concentrated liquidity to a CLMM pool just before a large swap and remove it immediately after, earning swap fees without sustained impermanent loss exposure. This is a sophisticated MEV form that can actually improve execution for the swapper.
Trading immediately after a large swap that moved the price, capturing the reversion. Less harmful than sandwiching because it does not worsen your execution — it profits from the market response to your trade.
Estimate your MEV risk before executing a trade:
import httpx
def estimate_mev_risk(
trade_size_sol: float,
pool_liquidity_usd: float,
slippage_bps: int,
token_daily_volume_usd: float,
) -> dict:
"""Estimate sandwich attack profitability for a given trade.
Returns risk assessment with estimated cost and recommendations.
"""
# Trade as percentage of pool liquidity
sol_price = 150.0 # approximate; fetch live price in production
trade_usd = trade_size_sol * sol_price
trade_pct_of_pool = (trade_usd / pool_liquidity_usd) * 100
# Estimated price impact from constant-product AMM
# price_impact ≈ trade_size / pool_liquidity (simplified)
price_impact_bps = int(trade_pct_of_pool * 100)
# Sandwich profitability: attacker captures portion of slippage headroom
# Rough model: sandwich_profit ≈ 0.5 * slippage_headroom * trade_size
slippage_headroom_bps = slippage_bps - price_impact_bps
if slippage_headroom_bps < 0:
slippage_headroom_bps = 0
sandwich_profit_usd = (slippage_headroom_bps / 10000) * trade_usd * 0.5
jito_tip_cost = 0.001 * sol_price # ~0.001 SOL typical tip
tx_fees = 0.000015 * sol_price * 2 # two transactions for sandwich
net_mev_profit = sandwich_profit_usd - jito_tip_cost - tx_fees
is_profitable_to_sandwich = net_mev_profit > 0.10 # $0.10 minimum
# Volume ratio indicates MEV bot attention level
volume_ratio = trade_usd / max(token_daily_volume_usd, 1)
risk_level = "LOW"
if is_profitable_to_sandwich and trade_pct_of_pool > 1.0:
risk_level = "HIGH"
elif is_profitable_to_sandwich or trade_pct_of_pool > 0.5:
risk_level = "MEDIUM"
return {
"risk_level": risk_level,
"trade_pct_of_pool": round(trade_pct_of_pool, 2),
"estimated_price_impact_bps": price_impact_bps,
"slippage_headroom_bps": slippage_headroom_bps,
"estimated_sandwich_cost_usd": round(max(net_mev_profit, 0), 2),
"is_profitable_to_sandwich": is_profitable_to_sandwich,
"recommendations": _get_recommendations(
risk_level, trade_size_sol, slippage_bps, trade_pct_of_pool
),
}
def _get_recommendations(
risk_level: str,
trade_size_sol: float,
slippage_bps: int,
trade_pct_of_pool: float,
) -> list[str]:
"""Generate protection recommendations based on risk assessment."""
recs = []
if risk_level == "HIGH":
recs.append("Use Jito bundle with 0.001-0.005 SOL tip")
recs.append("Use private/protected RPC endpoint")
if trade_pct_of_pool > 2.0:
n_splits = max(2, int(trade_pct_of_pool))
recs.append(f"Split into {n_splits} trades over 2-5 minutes")
if slippage_bps > 100:
recs.append(f"Reduce slippage from {slippage_bps}bps to 50-100bps")
if risk_level in ("MEDIUM", "HIGH"):
recs.append("Enable Jupiter dynamic slippage / MEV protection")
if not recs:
recs.append("Standard execution is likely safe for this trade size")
return recsSet slippageBps as low as feasible. Sandwich profit is bounded by your slippage tolerance.
| Token Liquidity | Recommended Slippage |
|---|---|
| > $5M pool | 50 bps (0.5%) |
| $1M - $5M pool | 100 bps (1%) |
| $100K - $1M pool | 150-200 bps |
| < $100K pool | 200-500 bps (high risk) |
Trade-off: Too-tight slippage causes failed transactions, costing you fees with no execution.
Submit your swap as a Jito bundle with a priority tip:
import httpx
JITO_BLOCK_ENGINE = "https://mainnet.block-engine.jito.wtf"
async def submit_jito_bundle(
signed_transactions: list[str],
tip_lamports: int = 1_000_000, # 0.001 SOL
) -> str:
"""Submit a transaction bundle to Jito block engine.
Args:
signed_transactions: Base64-encoded signed transactions.
tip_lamports: Tip amount in lamports (1 SOL = 1e9 lamports).
Returns:
Bundle ID for tracking.
"""
async with httpx.AsyncClient() as client:
resp = await client.post(
f"{JITO_BLOCK_ENGINE}/api/v1/bundles",
json={
"jsonrpc": "2.0",
"id": 1,
"method": "sendBundle",
"params": [signed_transactions],
},
timeout=10.0,
)
resp.raise_for_status()
result = resp.json()
return result.get("result", "")Tip guidelines:
Send transactions through endpoints that do not expose them to searchers:
For large trades (> 1% of pool liquidity), split execution:
def compute_split_plan(
total_sol: float,
pool_liquidity_usd: float,
sol_price: float = 150.0,
max_pct_per_trade: float = 0.5,
) -> list[dict]:
"""Compute a trade splitting plan to minimize MEV exposure."""
total_usd = total_sol * sol_price
trade_pct = (total_usd / pool_liquidity_usd) * 100
if trade_pct <= max_pct_per_trade:
return [{"sol_amount": total_sol, "delay_seconds": 0}]
n_splits = max(2, int(trade_pct / max_pct_per_trade) + 1)
per_trade = total_sol / n_splits
delay = 30 # seconds between trades
return [
{"sol_amount": round(per_trade, 4), "delay_seconds": i * delay}
for i in range(n_splits)
]Jupiter v6 includes built-in MEV protection features:
Enable via Jupiter API:
params = {
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": token_mint,
"amount": str(amount_lamports),
"slippageBps": "50",
"dynamicSlippage": "true", # Auto-adjust slippage
"prioritizationFeeLamports": "auto", # Auto priority fee
}After a trade, check whether you were sandwiched:
See scripts/sandwich_detector.py for a working implementation.
Known MEV indicators:
slippage-modeling: Use slippage estimates to set protective limitsliquidity-analysis: Pool liquidity determines MEV vulnerabilityjupiter-api: Jupiter's MEV protection features and swap executionsolana-onchain: On-chain transaction analysis for sandwich detectionhelius-api: Transaction parsing and historical analysisreferences/solana_mev_mechanics.md — Solana block production, Jito block engine, MEV supply chain, and transaction flow pathsreferences/protection_strategies.md — Detailed protection strategies with implementation guidance, cost-benefit analysis, and decision matrixscripts/sandwich_detector.py — Detects sandwich attacks around a given transaction signature using on-chain datascripts/mev_risk_estimator.py — Estimates MEV exposure for a planned trade based on token liquidity, trade size, and slippage settings© agiprolabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts, references) in skills/mev-analysis of agiprolabs/claude-trading-skills.
Open the folder on GitHubat commit 981e1d7
Mev Analysis 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mev Analysis this skillagiprolabs/claude-trading-skills | 410 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Prismirfndi/prism-liquidity-agent | 123 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Solana Sniper Botnpc-live/clawfirm | 156 | — | ~913 | Automated safety check: Notes | None | |
| Solana Payments Wallets Tradingnpc-live/clawfirm | 156 | 1 repos | ~4.7k | Automated safety check: Pass | MIT | |
| Gmgn PortfolioGMGNAI/gmgn-skills | 607 | — | ~5.8k | Automated safety check: Notes | MIT | |
| Trading Signalbinance/binance-skills-hub | 1.1k | — | ~682 | Automated safety check: Pass | None |
irfndi/prism-liquidity-agent
Operate Prism, an autonomous Solana DLMM liquidity agent for Meteora pools.
npc-live/clawfirm
Autonomous Solana token sniper and trading bot. An agent skill from npc-live/clawfirm.
npc-live/clawfirm
Pay people in SOL or USDC, buy and sell tokens, check prices, discover trending and new tokens, create and manage Solana wallets, stake SOL, earn yield through lending and managed vaults, borrow…
GMGNAI/gmgn-skills
Analyze one or many crypto wallets by address — holdings, batch realized/unrealized P&L, win rate, trading history, performance stats, specific token balance, and tokens created by a developer…
binance/binance-skills-hub
Per-trade smart-money signals — each result is a discrete buy or sell event from a tracked smart-money wallet, with trigger price, current price, max gain since trigger, and exit rate.
alsk1992/CloddsBot
Bags.fm - Complete Solana token launchpad with creator monetization
agiprolabs/claude-trading-skills
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
agiprolabs/claude-trading-skills
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
agiprolabs/claude-trading-skills
Broad crypto market data from CoinGecko covering 13,000+ tokens.
agiprolabs/claude-trading-skills
Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis
agiprolabs/claude-trading-skills
Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading
agiprolabs/claude-trading-skills
Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation
Works with
Categories
MEV exposure assessment, sandwich attack detection, and protection strategies for Solana DEX trading. Mev Analysis is an agent skill from agiprolabs/claude-trading-skills.
Mev Analysis fits situations like: tasks that involve Trading and backtesting.
Run `npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a claude-code`. Or copy the skill folder (skills/mev-analysis in agiprolabs/claude-trading-skills) into .claude/skills/mev-analysis in your project. Claude Code loads it when a task matches its description.
Run `npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a codex`. Or copy the skill folder (skills/mev-analysis in agiprolabs/claude-trading-skills) into .agents/skills/mev-analysis in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add agiprolabs/claude-trading-skills --skill mev-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mev-analysis, .gemini/skills/mev-analysis, .github/skills/mev-analysis and .opencode/skills/mev-analysis in your project.
Going by SKILL.md and its folder, Mev Analysis needs Python for the scripts in its folder. Our summary lists: Python 3.
SKILL.md names 1 domain. In commands or code: mainnet.block-engine.jito.wtf; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
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.
Mev Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 12k 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 4.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Mev Analysis: Prism (irfndi/prism-liquidity-agent, 123 stars), Solana Sniper Bot (npc-live/clawfirm, 156 stars), Solana Payments Wallets Trading (npc-live/clawfirm, 156 stars) and Gmgn Portfolio (GMGNAI/gmgn-skills, 607 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
agiprolabs (a GitHub user) maintains it in agiprolabs/claude-trading-skills, which has 410 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on September 3, 2026.
Source: agiprolabs/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.