check-web-perf

check-web-perf is a command for coding agents from rubenCodeforges/codeforges-claude-plugin. It costs 15 tokens per session (2,082 once invoked), scanned A, original, MIT.

A diagnostic command for a web-performance toolkit, a set of tools that measures how quickly websites load and respond. It checks tools such as Lighthouse, Puppeteer, Node.js, and system dependencies.

In plain words
What is it for?
Use it before performance testing to verify that the required commands, global packages, and system dependencies are available.
Why use it?
It shows which required programs or packages are missing and provides installation hints for an incomplete setup.

Command

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 commands/rubencodeforges/codeforges-claude-plugin/check-web-perf
Clone the repo
git clone --depth 1 https://github.com/rubenCodeforges/codeforges-claude-plugin

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

agentmods badge for check-web-perf

README.md
[![agentmods](https://agentmods.dev/badge/commands/rubencodeforges/codeforges-claude-plugin/check-web-perf.svg)](https://agentmods.dev/commands/rubencodeforges/codeforges-claude-plugin/check-web-perf)
Your own site
<a href="https://agentmods.dev/commands/rubencodeforges/codeforges-claude-plugin/check-web-perf"><img src="https://agentmods.dev/badge/commands/rubencodeforges/codeforges-claude-plugin/check-web-perf.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,082 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00015 $0.02082
Opus 5 $0.00008 $0.01041
Sonnet 5 $0.00003 $0.00416
Haiku 4.5 $0.00002 $0.00208

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

Security

Grade A, and why

check-web-perf scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

if curl -s --head --max-time 5 https://registry.npmjs.org &> /dev/null; then
commands/check-web-perf.md · 274 lines

How it starts

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

Run a comprehensive diagnostic check of the web performance toolkit setup, including Lighthouse, Puppeteer, Node.js, and system dependencies.

Execute the following diagnostic script:

#!/bin/bash

echo "🔍 Web Performance Toolkit Diagnostic Check"
echo "==========================================="
echo ""

# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m'

# Check command function
check_command() {
    local cmd=$1
    local install_hint=$2

    if command -v "$cmd" &> /dev/null; then
        local version=$($cmd --version 2>&1 | head -n1)
        echo -e "${GREEN}✅ $cmd:${NC} $version"
        return 0
    else
        echo -e "${RED}❌ $cmd:${NC} not found"
        if [ -n "$install_hint" ]; then
            echo -e "   ${YELLOW}Install:${NC} $install_hint"
        fi
        return 1
    fi
}

# Check npm package
check_npm_package() {
    local package=$1
    local install_hint=$2

    if npm list -g "$package" &> /dev/null; then
        local version=$(npm list -g "$package" 2>&1 | grep "$package@" | head -n1 | sed 's/.*@//' | sed 's/ .*//')
        echo -e "${GREEN}✅ $package:${NC} $version (global)"
        return 0
    elif [ -f "$(pwd)/node_modules/.bin/$package" ] || [ -d "$(pwd)/node_modules/$package" ]; then
        echo -e "${GREEN}✅ $package:${NC} installed (plugin-local)"
        return 0
    else
        echo -e "${RED}❌ $package:${NC} not found"
        if [ -n "$install_hint" ]; then
            echo -e "   ${YELLOW}Install:${NC} $install_hint"
        fi
        return 1
    fi
}

# System information
echo "📊 System Information"
echo "-------------------"
OS="$(uname -s)"
case "${OS}" in
    Linux*)     PLATFORM="Linux";;
    Darwin*)    PLATFORM="macOS";;
    CYGWIN*|MINGW*|MSYS*) PLATFORM="Windows";;
    *)          PLATFORM="Unknown";;
esac
echo "Platform: $PLATFORM"
echo "Architecture: $(uname -m)"
echo ""

# Core dependencies
echo "🛠️  Core Dependencies"
echo "-------------------"
check_command "node" "https://nodejs.org"
check_command "npm" "Comes with Node.js"
echo ""

# Web performance tools
echo "🚀 Web Performance Tools"
echo "----------------------"
check_command "lighthouse" "npm install -g lighthouse"
check_npm_package "puppeteer" "npm install -g puppeteer"
echo ""

# Chromium/Chrome check
echo "🌐 Browser Engines"
echo "----------------"

CHROMIUM_FOUND=false

# Check for Puppeteer's Chromium
if [ -d "$HOME/.cache/puppeteer" ]; then
    echo -e "${GREEN}✅ Puppeteer Chromium:${NC} found in ~/.cache/puppeteer"
    CHROMIUM_FOUND=true
elif [ -d "$(pwd)/node_modules/puppeteer/.local-chromium" ]; then
    echo -e "${GREEN}✅ Puppeteer Chromium:${NC} found in plugin directory"
    CHROMIUM_FOUND=true
fi

# Check for system Chrome/Chromium
if command -v google-chrome &> /dev/null; then
    echo -e "${GREEN}✅ Google Chrome:${NC} $(google-chrome --version)"
    CHROMIUM_FOUND=true
elif command -v chromium &> /dev/null; then
    echo -e "${GREEN}✅ Chromium:${NC} $(chromium --version)"
    CHROMIUM_FOUND=true
elif command -v chromium-browser &> /dev/null; then
    echo -e "${GREEN}✅ Chromium:${NC} $(chromium-browser --version)"
    CHROMIUM_FOUND=true
fi

if [ "$CHROMIUM_FOUND" = false ]; then
    echo -e "${YELLOW}⚠️  Chromium:${NC} not found"
    echo "   Will be downloaded automatically on first Puppeteer use (~170MB)"
fi

echo ""

# System libraries (Linux only)
if [ "$PLATFORM" = "Linux" ]; then
    echo "📦 System Libraries (Linux)"
    echo "-------------------------"

    check_lib() {
        if ldconfig -p 2>/dev/null | grep -q "$1"; then
            echo -e "${GREEN}✅ $1${NC}"
        else
            echo -e "${RED}❌ $1${NC}"
        fi
    }

    check_lib "libnss3"
    check_lib "libxss1"
    check_lib "libasound2"
    check_lib "libatk-bridge"

    echo ""
fi

# Configuration check
echo "⚙️  Configuration"
echo "--------------"

if [ -f "$HOME/.config/cf-dev-toolkit/web-perf.conf" ]; then
    echo -e "${GREEN}✅ Config file:${NC} found"
    cat "$HOME/.config/cf-dev-toolkit/web-perf.conf"
else
    echo -e "${YELLOW}ℹ️  Config file:${NC} not found (using defaults)"
fi

echo ""

# npx availability
echo "📦 npx Fallback"
echo "-------------"
if command -v npx &> /dev/null; then
    echo -e "${GREEN}✅ npx:${NC} available (can auto-download Lighthouse)"
else
    echo -e "${RED}❌ npx:${NC} not available"
fi

echo ""

# Network connectivity test
echo "🌐 Network Connectivity"
echo "---------------------"
if curl -s --head --max-time 5 https://registry.npmjs.org &> /dev/null; then
    echo -e "${GREEN}✅ npm registry:${NC} reachable"
else
    echo -e "${RED}❌ npm registry:${NC} unreachable"
    echo "   npx mode requires internet connectivity"
fi

echo ""

# Determine overall status
echo "📋 Summary & Recommendations"
echo "============================"
echo ""

HAS_LIGHTHOUSE=$(command -v lighthouse &> /dev/null && echo "yes" || echo "no")
HAS_NPX=$(command -v npx &> /dev/null && echo "yes" || echo "no")

if [ "$HAS_LIGHTHOUSE" = "yes" ]; then
    echo -e "${GREEN}✅ Status: Fully configured${NC}"
    echo ""
    echo "All tools are installed. You can use the web-performance-agent."
    echo ""
    echo "Example:"
    echo '  Ask: "Analyze the performance of https://example.com"'
    echo ""

elif [ "$HAS_NPX" = "yes" ]; then
    echo -e "${YELLOW}⚠️  Status: npx mode (zero-config)${NC}"
    echo ""
    echo "Lighthouse will be downloaded automatically via npx on first use."
    echo "First run may take 30-60 seconds."
    echo ""
    echo "For faster performance, install globally:"
    echo "  npm install -g lighthouse"
    echo ""
    echo "Or run the setup script:"
    echo "  cd ~/.claude/plugins/cf-dev-toolkit"
    echo "  ./setup.sh"
    echo ""

else
    echo -e "${RED}❌ Status: Missing dependencies${NC}"
    echo ""
    echo "Node.js and npm are required but not found."
    echo ""
    echo "Install Node.js 18+ from:"
    echo "  https://nodejs.org"
    echo ""
    echo "Then run the setup script:"
    echo "  cd ~/.claude/plugins/cf-dev-toolkit"
    echo "  ./setup.sh"
    echo ""
fi

# Quick fixes
echo "🔧 Quick Fixes"
echo "------------"
echo ""
echo "To install all dependencies automatically:"
echo "  cd ~/.claude/plugins/cf-dev-toolkit"
echo "  ./setup.sh"
echo ""
echo "To install manually:"
echo "  npm install -g lighthouse puppeteer"
echo ""
echo "To use without installation (slower):"
echo "  Just use the agent - it will automatically use npx"
echo ""

# Test command
echo "🧪 Test Your Setup"
echo "----------------"
echo ""
echo "Run a test analysis:"
echo '  Ask: "Analyze the performance of https://example.com"'
echo ""

# Documentation
echo "📚 Resources"
echo "----------"
echo ""
echo "Plugin documentation:"
echo "  ~/.claude/plugins/cf-dev-toolkit/README.md"
echo ""
echo "Lighthouse documentation:"
echo "  https://developer.chrome.com/docs/lighthouse"
echo ""
echo "Report issues:"
echo "  https://github.com/rubenCodeforges/codeforges-claude-plugin/issues"
echo ""

echo "==========================================="
echo "Diagnostic check complete!"

Read the full file on GitHub · 274 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. 4d ago First seen · 274 lines · 15 tokens per session scan A 5e99b882eebc

Subscribe to this mod's changes

check-web-perf is a command published in the GitHub repository rubenCodeforges/codeforges-claude-plugin (2 stars, last pushed 9mo ago), licensed MIT. It adds 15 tokens to every session and 2,082 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.