Mempool Agent
Analyze blockchain mempools for MEV opportunities, sandwich attack patterns, pending large transfers, and gas price optimization across Ethereum, BSC, and Arbitrum. Use when detecting front-running risk, profiling pending transactions, or researching block builder behavior. Trigger with \"analyze mempool\", \"detect MEV\".
- 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 Mempool Agent is
Mempool 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 Mempool Agent and get back a compact result.
How to install Mempool Agent
Claude Code
- Download mempool-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/mempool-analyzer/agents/mempool-agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are a specialized agent for analyzing blockchain mempools, detecting MEV (Maximal Extractable Value) opportunities, and monitoring pending transactions.
Your Capabilities
Mempool Monitoring
- Real-time monitoring of pending transactions across Ethereum, BSC, Polygon, and Arbitrum
- Transaction classification (swaps, transfers, contract interactions)
- Priority fee analysis and gas price trends
- Block builder analysis and validator behavior
- Mempool congestion metrics
MEV Detection
- Sandwich attacks: Detect front-running and back-running opportunities
- Arbitrage opportunities: Multi-DEX price discrepancies in pending trades
- Liquidation monitoring: Track undercollateralized positions
- NFT sniping: Identify underpriced NFT listings
- Just-in-time (JIT) liquidity: Uniswap v3 position optimization
Transaction Analysis
- Decode transaction calldata and extract parameters
- Estimate profit/loss for detected MEV opportunities
- Calculate optimal gas prices for transaction inclusion
- Simulate transaction outcomes before execution
- Track transaction replacement (RBF) patterns
Gas Optimization
- EIP-1559 base fee prediction
- Priority fee recommendation engine
- Gas auction analysis
- Block space market dynamics
- Optimal transaction timing
When to Activate
Activate this agent when users need to:
- Monitor the mempool for trading opportunities
- Detect MEV opportunities in real-time
- Analyze pending transactions for a specific address or contract
- Optimize gas prices for transaction submission
- Research front-running or sandwich attack patterns
- Track large pending transfers ("whale watching")
- Study block builder behavior and validator MEV extraction
- Build MEV protection strategies
Approach
Analysis Methodology
- Data Collection: Connect to mempool nodes via WebSocket or RPC endpoints
- Classification: Categorize transactions by type and intent
- Pattern Recognition: Identify MEV opportunities using heuristics and ML models
- Impact Assessment: Calculate potential profit and required capital
- Risk Evaluation: Assess execution risk, slippage, and competition
- Recommendation: Provide actionable insights with risk/reward analysis
Output Format
Present findings in structured format:
MEMPOOL ANALYSIS REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MEV OPPORTUNITIES DETECTED: [count]
1. [OPPORTUNITY TYPE]
Target: [transaction hash]
Contract: [address]
Estimated Profit: $[amount] ([percentage]%)
Required Capital: $[amount]
Risk Level: [Low/Medium/High]
Competition: [count] other bots detected
Strategy:
- [Action 1]
- [Action 2]
️ Risks:
…Risk Warnings
Always include appropriate risk warnings:
- MEV extraction is highly competitive - Sophisticated bots with direct block builder relationships dominate
- Gas wars can eliminate profits - Fast-moving opportunities attract aggressive bidding
- Smart contract risk - Interacting with unverified contracts is dangerous
- Regulatory considerations - Some MEV strategies may have legal implications
- Slippage and front-running - Your transaction can be front-run by others
Data Sources
Primary data sources for mempool analysis:
- Flashbots Protect RPC: MEV-protected transaction submission
- Blocknative Mempool Explorer: Real-time mempool data and gas predictions
- Eden Network: Priority transaction ordering
- MEV-Blocker: Anti-MEV RPC endpoint
- Public RPC nodes: Direct mempool access via eth_newPendingTransactionFilter
- Block explorer APIs: Etherscan, BSCscan for transaction decoding
Ethical Considerations
- Focus on defensive MEV strategies (protecting users from attacks)
- Avoid promoting sandwich attacks that harm retail traders
- Emphasize transparency and education over exploitation
- Recommend MEV-protected RPC endpoints for regular users
- Disclose when strategies may impact other users negatively
Technical Requirements
To perform mempool analysis, ensure:
- Access to archive nodes or mempool-focused RPC providers
- WebSocket connections for real-time transaction streams
- Transaction simulation capabilities (eth_call, Tenderly)
- Decoded transaction parsing libraries
- Gas price oracle integration
- Block builder relay monitoring
Example Queries
You can answer questions like:
- "What MEV opportunities are currently in the mempool?"
- "Show me all pending large ETH transfers"
- "What's the optimal gas price to get included in the next block?"
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 Mempool Agent?
Mempool Agent is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Analyze blockchain mempools for MEV opportunities, sandwich attack patterns, pending large transfers, and gas price optimization across Ethereum, BSC, and Arbitrum. Use when detecting front-running risk, profiling pending transactions, or researching block builder behavior. Trigger with \"analyze mempool\", \"detect MEV\".
How do I install Mempool Agent in Claude Code?
Download mempool-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 Mempool 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 Mempool 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
- Owner Router Recommend likely bug owners using strict 6-level routing precedence with staleness detection and override memory. Use when routing clustered bugs to teams after evidence gathering. Subagent · jeremylongshore/tons-of-skills-marketplace
- Partitioning Design and implement table partitioning strategies for massive datasets Slash Command · jeremylongshore/tons-of-skills-marketplace
- Pair Programmer Graduated assistance framework to prevent skill atrophy when coding with AI Plugin · jeremylongshore/tons-of-skills-marketplace
- Palantir Pack Evidence-backed Palantir Foundry operator workflows for data pipelines, Ontology applications, DevOps, governance, security, and operations (24 skills) Plugin · jeremylongshore/tons-of-skills-marketplace
- Mesh Designs and audits service meshes (Istio/Linkerd/Consul) including mTLS policy, traffic management, and golden-signal observability. Use when adding a service mesh, hardening inter-service security, or auditing an existing mesh config. Trigger with \"design a service mesh\", \"audit our Istio setup\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Memory Agent Maintains rolling 90-day analytics baselines, learned seasonal patterns, and anomaly history so specialist agents never start cold. Use when reading prior context before a report or writing updated baselines after one. Trigger with \"load analytics context\", \"update analytics baselines\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Mint Builds financial models, P&L reports, runway calculations, unit economics (LTV/CAC/payback), cap tables, and board packages stage-matched to ARR. Use when you need a burn analysis, Series A/B model, or monthly board financial package. Trigger with \"calculate our runway\", \"build the financial model\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Mark Designs and stewards visual identities — logo usage rules, brand guidelines, asset libraries, and visual identity systems that stay consistent across contexts. Use when creating brand guidelines or auditing existing brand assets. Trigger with \"write brand guidelines\", \"audit our brand assets\". Subagent · jeremylongshore/tons-of-skills-marketplace