← 返回
未分类 中文

Web Auto Analyzer

Automatically analyze websites for performance metrics and audit issues using Lighthouse.
自动使用 Lighthouse 分析网站性能指标和审计问题
lj-hao lj-hao 来源
未分类 clawhub v1.1.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 536
下载
💾 0
安装
1
版本
#latest

概述

When to Use

User wants to automatically analyze a website URL for performance metrics, accessibility, SEO, or best practices without manual Chrome DevTools interaction.

Core Rules

  1. Verify prerequisites — Check Node.js (v18+) and packages installed: node --version && npm list lighthouse chrome-launcher
  1. Run Lighthouse audit — Execute node automation-script.js [--mobile] [--output=DIR] to collect all metrics.
  1. Extract and present metrics — Use tables for scores (0-100) and metrics with status indicators (⚪ Good, 🟡 Warning, 🔴 Critical).
  1. Identify critical issues — Flag metrics outside thresholds: LCP>2.5s, CLS>0.1, INP>200ms, TBT>200ms, Performance<50.
  1. Provide actionable fixes — For each issue, include specific code fixes from audit-checklist.md and metrics-reference.md.
  1. Save results — Store JSON and HTML reports in ./results/. Ask user before saving to memory for tracking.
  1. Handle errors gracefully — If audit fails, check troubleshooting.md for common solutions (Chrome not found, ES module errors, memory issues).

Quick Reference

TopicFile
-------------
Automation scriptautomation-script.js
Metrics & thresholdsmetrics-reference.md
Fix checklistsaudit-checklist.md
Setup guidesetup.md
Quick startquick-start.md
Troubleshootingtroubleshooting.md
Memory trackingmemory-template.md

Data Storage

After analysis, offer to save: URL, timestamp, scores, critical issues, report path. Always ask before saving to memory.

Security & Privacy

  • Runs locally in headless Chrome — no external data transmission
  • Warn before analyzing authenticated URLs
  • JSON reports contain URL structure — handle sensitive paths carefully

Common Commands

# Quick audit (desktop)
node automation-script.js https://example.com

# Mobile emulation
node automation-script.js https://example.com --mobile

# Custom output directory
node automation-script.js https://example.com --output=./reports

# Lighthouse CLI directly
lighthouse https://example.com --output=json --output-path=report.json

Troubleshooting Quick Reference

ErrorSolution
-----------------
"lighthouse is not a function"Add "type": "module" to package.json
"Chrome not found"Install Chrome or use npm install puppeteer
"JavaScript heap out of memory"Run with node --max-old-space-size=4096
"Port already in use"Specify different port in script config

版本历史

共 1 个版本

  • v1.1.1 当前
    2026-05-02 04:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,828
dev-programming

Control Usb Relay

lj-hao
控制USB继电器模块,支持开关切换、状态追踪与自动化。
★ 0 📥 505
it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,509