Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计提醒

console-patrol控制台巡逻

Agent Skill

console-patrol 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,742

周安装

112

GitHub Stars

公开资料未说明

下载量

878
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:console-patrol(控制台巡逻)
来源仓库:https://github.com/zhzgao/console-patrol
安装命令:
openclaw skills install console-patrol
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install console-patrol

简介

Console Patrol 自动扫描 Web 应用控制台错误,提供框架特定修复建议。

  • 适合在 OpenClaw 中诊断 React、Ant Design 或 Element 项目运行时问题。
  • 通过 clawhub 安装,支持实时捕获前端异常并生成 actionable 报告。
  • 需确保浏览器环境允许脚本注入,部分安全策略可能限制其运行。
  • 适用于前端性能优化、错误监控与快速故障排查场景。

SKILL.md

ConsolePatrol Skill

Name

console-patrol

Description

AI-First Console Error & Warning Detector for Web Applications. Automatically scans web pages to detect console errors and warnings, with framework-specific rules for Ant Design, React, and Element UI.

When to Use

Use this skill when the user asks to:

  • "Check for console errors"
  • "Scan pages for warnings"
  • "Audit a web app"
  • "Find issues in the application"
  • "Debug console output"
  • Fixing React/antd/Element UI warnings

Prerequisites

The skill uses console-patrol package:

pip install console-patrol
playwright install chromium

Core Workflow

1. Quick Scan (Recommended)

from console_patrol import ConsolePatrol

patrol = ConsolePatrol()
result = patrol.scan(
    url="http://localhost:3000",
    routes=[
        "http://localhost:3000/",
        "http://localhost:3000/dashboard",
        "http://localhost:3000/settings",
    ],
    wait_time=2.0,
)

print(f"Issues found: {result.report.total_issues}")
for issue in result.issues:
    print(f"[{issue.severity.value}] {issue.rule_id}")
    print(f"  Fix: {issue.suggestion}")

2. Auto-Discover Routes

from console_patrol import ConsolePatrol

patrol = ConsolePatrol()
result = patrol.scan(
    url="http://localhost:3000",
    router_type="react",
    base_path="/admin",
    auto_discover=True,  # Auto-discover common routes
)

3. With Framework Auto-Detection

result = patrol.scan(
    url="http://localhost:3000",
    routes=["http://localhost:3000/"],
    detect_framework=True,  # Auto-detect UI framework
)
print(f"Detected: {result.framework_info.ui_framework}")

4. CLI Usage

# Scan with auto-discovery
console-patrol scan http://localhost:3000 --router-type react --auto-discover

# Scan specific routes
console-patrol scan http://localhost:3000 --routes "/,/dashboard,/about"

# With screenshots on errors
console-patrol scan http://localhost:3000 --screenshot

# Output formats
console-patrol scan http://localhost:3000 --format markdown

Detection Rules

Severity Levels

LevelMeaningExit Code
P0Fatal (crashes, JS exceptions)2
P1Warning (framework issues)1
P2Hint (code smell)0

Built-in Rules

Ant Design

  • antd-useForm-unhooked (P1): form.getFieldValue() called outside Form
  • antd-modal-context (P1): Static modal in React 18
  • antd-tree-missing-keys (P1): Tree wildcard keys
  • antd-table-duplicate-key (P0): Duplicate key in Table

React

  • react-uncaught-error (P0): Uncaught JS exception
  • react-chunk-load-error (P0): Module load failure
  • react-hooks-rules (P1): Hooks violation
  • react-list-missing-key (P2): Missing key prop

Response Format

When issues are found, respond with:

## ConsolePatrol Scan Results

**Pages Scanned:** N
**Total Issues:** N

| Severity | Count |
|----------|-------|
| P0 (Fatal) | N |
| P1 (Warning) | N |
| P2 (Hint) | N |

### Issues

**[P0] react-uncaught-error**
- Message: Error description
- Location: page URL
- Fix: Suggestion

**[P1] antd-useForm-unhooked**
- Message: Error description
- Location: page URL
- Fix: Use state instead of form.getFieldValue() in render

Important Notes

  1. Wait Time: Default 2s after page load. Increase for SPAs with lazy loading.
  2. Screenshots: Use --screenshot flag to capture error screenshots.
  3. Frameworks: Pass --frameworks antd,react to limit rule scope.
  4. Exit Codes: Use in CI/CD: if [ $? -gt 0 ]; then echo "Issues found"; fi

Installation for Agent

If console-patrol is not installed:

import subprocess
subprocess.run(["pip", "install", "console-patrol"], check=True)
subprocess.run(["playwright", "install", "chromium"], check=True)

Edge Cases

  • Page not loading: Timeout is 30s by default. Check if dev server is running.
  • No issues found: Report success, no action needed.
  • P0 issues: Always highlight as critical, suggest immediate fix.
  • Framework not detected: Use default rules (antd, react, element).

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

86.49%
按下载量换算759

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills