← Back to Skills Marketplace
zhzgao

Console Patrol

by ThatsD · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
91
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install console-patrol
Description
Automatically scans web apps for console errors and warnings, providing framework-specific diagnostics and fix suggestions for React, Ant Design, and Element...
README (SKILL.md)

ConsolePatrol Skill\r

\r

Name\r

\r console-patrol\r \r

Description\r

\r 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.\r \r

When to Use\r

\r Use this skill when the user asks to:\r

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

Prerequisites\r

\r The skill uses console-patrol package:\r \r

pip install console-patrol\r
playwright install chromium\r
```\r
\r
## Core Workflow\r
\r
### 1. Quick Scan (Recommended)\r
\r
```python\r
from console_patrol import ConsolePatrol\r
\r
patrol = ConsolePatrol()\r
result = patrol.scan(\r
    url="http://localhost:3000",\r
    routes=[\r
        "http://localhost:3000/",\r
        "http://localhost:3000/dashboard",\r
        "http://localhost:3000/settings",\r
    ],\r
    wait_time=2.0,\r
)\r
\r
print(f"Issues found: {result.report.total_issues}")\r
for issue in result.issues:\r
    print(f"[{issue.severity.value}] {issue.rule_id}")\r
    print(f"  Fix: {issue.suggestion}")\r
```\r
\r
### 2. Auto-Discover Routes\r
\r
```python\r
from console_patrol import ConsolePatrol\r
\r
patrol = ConsolePatrol()\r
result = patrol.scan(\r
    url="http://localhost:3000",\r
    router_type="react",\r
    base_path="/admin",\r
    auto_discover=True,  # Auto-discover common routes\r
)\r
```\r
\r
### 3. With Framework Auto-Detection\r
\r
```python\r
result = patrol.scan(\r
    url="http://localhost:3000",\r
    routes=["http://localhost:3000/"],\r
    detect_framework=True,  # Auto-detect UI framework\r
)\r
print(f"Detected: {result.framework_info.ui_framework}")\r
```\r
\r
### 4. CLI Usage\r
\r
```bash\r
# Scan with auto-discovery\r
console-patrol scan http://localhost:3000 --router-type react --auto-discover\r
\r
# Scan specific routes\r
console-patrol scan http://localhost:3000 --routes "/,/dashboard,/about"\r
\r
# With screenshots on errors\r
console-patrol scan http://localhost:3000 --screenshot\r
\r
# Output formats\r
console-patrol scan http://localhost:3000 --format markdown\r
```\r
\r
## Detection Rules\r
\r
### Severity Levels\r
\r
| Level | Meaning | Exit Code |\r
|-------|---------|-----------|\r
| P0 | Fatal (crashes, JS exceptions) | 2 |\r
| P1 | Warning (framework issues) | 1 |\r
| P2 | Hint (code smell) | 0 |\r
\r
### Built-in Rules\r
\r
#### Ant Design\r
- `antd-useForm-unhooked` (P1): `form.getFieldValue()` called outside Form\r
- `antd-modal-context` (P1): Static modal in React 18\r
- `antd-tree-missing-keys` (P1): Tree wildcard keys\r
- `antd-table-duplicate-key` (P0): Duplicate key in Table\r
\r
#### React\r
- `react-uncaught-error` (P0): Uncaught JS exception\r
- `react-chunk-load-error` (P0): Module load failure\r
- `react-hooks-rules` (P1): Hooks violation\r
- `react-list-missing-key` (P2): Missing key prop\r
\r
## Response Format\r
\r
When issues are found, respond with:\r
\r
```\r
## ConsolePatrol Scan Results\r
\r
**Pages Scanned:** N\r
**Total Issues:** N\r
\r
| Severity | Count |\r
|----------|-------|\r
| P0 (Fatal) | N |\r
| P1 (Warning) | N |\r
| P2 (Hint) | N |\r
\r
### Issues\r
\r
**[P0] react-uncaught-error**\r
- Message: Error description\r
- Location: page URL\r
- Fix: Suggestion\r
\r
**[P1] antd-useForm-unhooked**\r
- Message: Error description\r
- Location: page URL\r
- Fix: Use state instead of form.getFieldValue() in render\r
```\r
\r
## Important Notes\r
\r
1. **Wait Time**: Default 2s after page load. Increase for SPAs with lazy loading.\r
2. **Screenshots**: Use `--screenshot` flag to capture error screenshots.\r
3. **Frameworks**: Pass `--frameworks antd,react` to limit rule scope.\r
4. **Exit Codes**: Use in CI/CD: `if [ $? -gt 0 ]; then echo "Issues found"; fi`\r
\r
## Installation for Agent\r
\r
If `console-patrol` is not installed:\r
\r
```python\r
import subprocess\r
subprocess.run(["pip", "install", "console-patrol"], check=True)\r
subprocess.run(["playwright", "install", "chromium"], check=True)\r
```\r
\r
## Edge Cases\r
\r
- **Page not loading**: Timeout is 30s by default. Check if dev server is running.\r
- **No issues found**: Report success, no action needed.\r
- **P0 issues**: Always highlight as critical, suggest immediate fix.\r
- **Framework not detected**: Use default rules (antd, react, element).\r
Usage Guidance
This skill's purpose and code examples are coherent, but it asks the agent to install a PyPI package ('console-patrol') and Playwright/Chromium at runtime without providing a source URL, package version, checksums, or homepage. Before installing, verify the package provenance (PyPI project page, GitHub repo, maintainer), prefer a pinned version and checksum, and run installs in an isolated environment (virtualenv or sandbox) to avoid altering system-wide Python or downloading untrusted binaries. If you cannot verify the package/source, avoid running the automatic pip/playwright install and ask the skill's author for a signed release or official upstream link. Also be cautious about scanning arbitrary remote URLs (possible sensitive-target scanning or SSRF) and consider limiting scanning to trusted hosts or local development instances.
Capability Analysis
Type: OpenClaw Skill Name: console-patrol Version: 0.1.0 The skill automates web application debugging by scanning for console errors using the `console-patrol` library and Playwright. It explicitly instructs the agent to perform shell-based dependency installation (`pip install`) and network-based scanning of URLs (`SKILL.md`). While these capabilities are aligned with the stated diagnostic purpose, the combination of automated package installation and arbitrary network access via a headless browser introduces significant risks, such as supply chain attacks or SSRF, if the agent is directed toward sensitive internal endpoints.
Capability Assessment
Purpose & Capability
Name, description, and runtime examples align: a console-scanning tool reasonably needs a Python package and a headless browser (Playwright/Chromium) to execute scans and capture console output.
Instruction Scope
SKILL.md tells the agent to run pip install console-patrol and playwright install chromium (including example subprocess.run code). Those runtime install instructions will download and execute third-party code and binaries and will allow the skill to fetch arbitrary URLs supplied for scanning. The instructions do not constrain where packages/binaries are installed (system vs virtualenv) or limit target URLs, which broadens the skill's runtime effects.
Install Mechanism
There is no formal install spec; instead the README instructs the agent to pip install a package named 'console-patrol' and run Playwright's installer. Installing from PyPI and downloading Chromium are reasonable for the functionality but risky without provenance: pip packages can execute arbitrary code during install, and Playwright will download large browser binaries. No package version pinning, checksums, or official upstream links/homepage are provided.
Credentials
The skill does not request environment variables, credentials, or config paths — proportional to the stated purpose. However, runtime installation will modify the agent environment (install packages/binaries), which is a side effect not declared in metadata.
Persistence & Privilege
always is false and the skill is user-invocable (normal). The SKILL.md explicitly instructs installing packages and browser binaries, which creates persistent files on disk and may change the agent environment; this is expected for such a tool but increases the blast radius compared to an instruction-only skill that makes no on-disk changes.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install console-patrol
  3. After installation, invoke the skill by name or use /console-patrol
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release of console-patrol skill. - Detects and reports console errors and warnings on web applications. - Supports framework-specific rules for Ant Design, React, and Element UI. - Provides CLI and Python API for scanning URLs and routes, with auto-discovery and framework detection options. - Categorizes findings by severity (P0: Fatal, P1: Warning, P2: Hint) with built-in detection rules. - Includes response formats and usage guides for both end-users and automated workflows.
Metadata
Slug console-patrol
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Console Patrol?

Automatically scans web apps for console errors and warnings, providing framework-specific diagnostics and fix suggestions for React, Ant Design, and Element... It is an AI Agent Skill for Claude Code / OpenClaw, with 91 downloads so far.

How do I install Console Patrol?

Run "/install console-patrol" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Console Patrol free?

Yes, Console Patrol is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Console Patrol support?

Console Patrol is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Console Patrol?

It is built and maintained by ThatsD (@zhzgao); the current version is v0.1.0.

💬 Comments