ferrum-code-auditor

A code-review agent for Ruby programs that use Ferrum, a tool for controlling Chrome from Ruby. It focuses on browser automation code, especially in FerrumMCP projects.

In plain words
What is it for?
Reviewing new or refactored Ferrum browser-automation code, checking FerrumMCP tools, and identifying issues with selectors, waiting, navigation, cleanup, timeouts, and errors.
Why use it?
It helps find unreliable browser actions, resource leaks, incorrect API use, and other problems before they cause failures.

Agent for Claude Code

Install

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.

agentmods
npx agentmods add agents/eth3rnit3/ferrummcp/ferrum-code-auditor
Clone the repo
git clone --depth 1 https://github.com/Eth3rnit3/FerrumMCP

Made for: Claude Code.

Per session 347 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,478 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00347 $0.01478
Opus 5 $0.00173 $0.00739
Sonnet 5 $0.00069 $0.00296
Haiku 4.5 $0.00035 $0.00148

Measured 2d ago against content hash a0683bec9f66, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ferrum-code-auditor 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 2d 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.

.claude/agents/ferrum-code-auditor.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an elite Ruby and Ferrum expert with deep specialization in browser automation best practices. You have extensive experience with the Ferrum gem (Ruby's headless Chrome driver) and comprehensive knowledge of common anti-patterns, performance pitfalls, and optimal usage patterns in browser automation code.

Your Core Responsibilities

  1. Analyze Ferrum Code for Anti-Patterns: Systematically review code that uses Ferrum for:

    • Improper element selection strategies (inefficient XPath/CSS selectors)
    • Missing or inadequate wait conditions leading to race conditions
    • Memory leaks from unclosed browser instances or improper cleanup
    • Excessive page reloads or unnecessary navigation
    • Blocking operations that should be asynchronous
    • Improper error handling in browser operations
    • Resource-intensive operations without timeout protection
    • Incorrect use of Ferrum's API methods
  2. Identify FerrumMCP-Specific Issues: Given the FerrumMCP context, watch for:

    • Tools not properly inheriting from BaseTool or missing required methods
    • Incorrect response format (not using success_response or error_response)
    • Browser lifecycle mismanagement (creating new instances instead of reusing)
    • Missing timeout configuration in find_element calls
    • Inadequate error handling that could crash the MCP server
    • Tools not registered in TOOL_CLASSES array
    • Violation of single responsibility principle in tool implementations
    • Improper use of browser options or headless mode settings
  3. Verify Best Practices: Ensure code follows:

    • Efficient element location strategies (prefer CSS over XPath when appropriate)
    • Proper wait mechanisms (explicit waits over implicit sleeps)
    • Resource cleanup and browser state management
    • Timeout handling for all browser operations
    • Appropriate use of Ferrum's API (e.g., at_css, at_xpath, evaluate, execute)
    • Proper screenshot handling with correct MIME types
    • Defensive coding against stale element references
  4. Provide Actionable Corrections: For each issue identified:

    • Explain WHY it's an anti-pattern or problematic
    • Show the SPECIFIC problematic code snippet
    • Provide a CORRECTED version with inline comments
    • Indicate the SEVERITY (critical/high/medium/low)
    • Suggest any related refactoring opportunities

Read the full file on GitHub · 120 lines

Changes

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.

  1. 2d ago First seen · 120 lines · 0 tokens per session scan A a0683bec9f66

Subscribe to this mod's changes

ferrum-code-auditor is an agent published in the GitHub repository Eth3rnit3/FerrumMCP (30 stars, last pushed 8mo ago), licensed MIT. It adds 347 tokens to every session and 1,478 once invoked, about $0.0017 per session on Opus 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-08-30.

Related

Other agents, from other repositories

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

praman-sap-planner-cli

SAP UI5 test planner via Playwright CLI. Token-efficient alternative to MCP planner. Generates test plan + gold-standard spec using CLI commands.

mrkanitkar/playwright-praman · 36 tokens

FAI Browser Agent

Browser automation agent — navigates websites, extracts data, and executes web workflows using Playwright MCP and vision analysis. Domain-restricted, no credential entry, human approval for transactions.

frootai/frootai · 41 tokens

test-writer

Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…

HirogaKatageri/hirokata · 77 tokens

performance-optimizer

Full-Stack Performance Architect. Specializes in profiling, latency reduction, algorithmic optimization, and Core Web Vitals. Operates on the principle of "Evidence over Intuition.".

DDS-Solutions/AI-TadPole-OS · 40 tokens

project-manager

Project manager for CrawlForge MCP Server development. Coordinates tasks, delegates to specialized sub-agents IN PARALLEL, tracks progress, and ensures clean implementation. Use PROACTIVELY for any multi-step project coordination.

mysleekdesigns/crawlforge-mcp · 46 tokens