Sponsor Suno AI Music arrow_forward
Subagent

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
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

  1. Download mempool-agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. 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

  1. 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.
  2. 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

  1. Data Collection: Connect to mempool nodes via WebSocket or RPC endpoints
  2. Classification: Categorize transactions by type and intent
  3. Pattern Recognition: Identify MEV opportunities using heuristics and ML models
  4. Impact Assessment: Calculate potential profit and required capital
  5. Risk Evaluation: Assess execution risk, slippage, and competition
  6. 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

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.