← 返回 Skills 市场
michealxie001

OpenClaw Debugger

作者 michealxie001 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
156
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install openclaw-debugger
功能描述
Debugging assistant. Analyzes error logs, suggests breakpoints, traces execution flow, and helps identify root causes of issues.
使用说明 (SKILL.md)

Debugging Assistant

调试助手,分析错误日志、建议断点、追踪执行流程、帮助识别问题根因。

Version: 1.0
Features: 错误分析、断点建议、执行追踪、根因分析


Quick Start

1. 分析错误日志

# 分析 Python 错误
python3 scripts/main.py analyze-error "Traceback (most recent call last):..."

# 从文件分析
python3 scripts/main.py analyze-error --file error.log

2. 建议断点

# 为代码建议断点位置
python3 scripts/main.py suggest-breakpoints --file src/main.py

# 针对特定函数
python3 scripts/main.py suggest-breakpoints --function process_data

3. 追踪执行

# 追踪函数调用
python3 scripts/main.py trace --file src/app.py --function handle_request

Commands

命令 说明 示例
analyze-error 分析错误 analyze-error "Traceback..."
suggest-breakpoints 建议断点 suggest-breakpoints --file src.py
trace 追踪执行 trace --file src.py --function foo

Error Analysis

Python Traceback 分析

$ python3 scripts/main.py analyze-error "Traceback (most recent call last):
  File 'src/auth.py', line 45, in login
    user = db.get_user(username)
  File 'src/db.py', line 23, in get_user
    cursor.execute(query, (username,))
psycopg2.OperationalError: connection closed"

🔍 Error Analysis
=================

Type: Database Connection Error
Severity: 🔴 High

Root Cause:
The database connection was closed before executing the query.

Possible Causes:
1. Connection pool exhaustion
2. Connection timed out
3. Database server restart

Suggested Fixes:
1. Check connection pool settings
2. Implement connection retry logic
3. Add connection health checks

File: src/db.py:23
Function: get_user

常见错误模式

自动识别:

  • ImportError / ModuleNotFoundError - 导入问题
  • AttributeError - 属性访问错误
  • KeyError / IndexError - 数据访问错误
  • TypeError - 类型错误
  • ConnectionError - 网络/连接错误
  • TimeoutError - 超时错误

Breakpoint Suggestions

$ python3 scripts/main.py suggest-breakpoints --file src/payment.py

🔍 Breakpoint Suggestions
=========================

High Priority:
  Line 45: process_payment() - Entry point
  Line 67: validate_card() - Validation logic
  Line 89: charge_customer() - External API call

Medium Priority:
  Line 34: calculate_total() - Business logic
  Line 56: apply_discount() - Conditional logic

Tips:
- Set breakpoints before external API calls
- Watch variables: amount, currency, customer_id

Execution Tracing

$ python3 scripts/main.py trace --file src/api.py --function handle_request

🔍 Execution Trace
==================

Function: handle_request
File: src/api.py:23

Call Graph:
handle_request
├── authenticate_user
│   └── verify_token
├── validate_request
│   └── check_schema
├── process_data
│   ├── fetch_from_db
│   └── cache_result
└── format_response

Potential Issues:
- No error handling in process_data
- External call to fetch_from_db (line 67)

Configuration

.debugging.json:

{
  "breakpoints": {
    "before_external_calls": true,
    "before_conditionals": true,
    "in_error_handlers": true
  },
  "error_patterns": {
    "ignore": ["DeprecationWarning"],
    "highlight": ["SecurityError", "DataLossError"]
  }
}

Examples

场景 1:排查崩溃问题

# 1. 复制错误信息
python3 main.py analyze-error "$(cat error.log)"

# 2. 根据分析设置断点
python3 main.py suggest-breakpoints --file src/crash_point.py

# 3. 追踪相关函数
python3 main.py trace --function problematic_function

场景 2:性能问题排查

# 追踪执行路径
python3 main.py trace --file src/slow_endpoint.py --function handler

# 识别冗余调用

场景 3:API 错误调试

# 分析 API 错误响应
python3 main.py analyze-error "HTTP 500: Internal Server Error"

# 检查 API 处理代码
python3 main.py suggest-breakpoints --file src/api/handlers.py

Files

skills/debugging/
├── SKILL.md                    # 本文件
└── scripts/
    ├── main.py                 # ⭐ 统一入口
    ├── error_analyzer.py       # 错误分析器
    └── tracer.py               # 执行追踪器

Roadmap

  • Python error analysis
  • JavaScript error analysis
  • Interactive debugger integration
  • Log file monitoring
安全使用建议
This skill appears to be a straightforward local debugging helper: it reads error text and source files and prints suggestions. Before installing/running: 1) confirm you received the full source (SKILL.md mentions error_analyzer.py and tracer.py, but only scripts/main.py is bundled and the main.py listing appears truncated) — ask the publisher for the complete package. 2) Inspect the full main.py and any referenced modules for network calls or hidden behavior (current file shows no networking, but missing files could). 3) Run the code in a sandbox or isolated environment if you plan to feed it real logs or source files, especially if those files contain secrets. 4) If you will run it regularly, request a signed/verified release or source repository so you can track updates. If you want, I can point out the exact places in main.py to double-check or help compare the packaged files to the SKILL.md expectations.
功能分析
Type: OpenClaw Skill Name: openclaw-debugger Version: 1.0.0 The skill is a static analysis utility designed to assist with debugging Python code by analyzing tracebacks, suggesting breakpoints, and tracing function calls. The implementation in `scripts/main.py` uses standard libraries like `ast` and `re` to parse local files and text, and it lacks any network capabilities, shell execution, or data exfiltration logic. All instructions in `SKILL.md` are consistent with the tool's stated purpose.
能力评估
Purpose & Capability
Name/description (debugging assistant) matches the provided code and SKILL.md: the code analyzes traceback text, suggests breakpoints by scanning source files, and performs basic AST-based tracing. No unrelated binaries, cloud APIs, or extra credentials are requested.
Instruction Scope
SKILL.md instructs the agent to run scripts/main.py with user-supplied error text or source files. The runtime instructions and code operate on local files and input provided by the user (error logs, source files), which is expected for a debugger. However, the README references additional modules (error_analyzer.py, tracer.py) that are not present in the package, and the included scripts/main.py appears truncated in the provided listing — this incomplete packaging should be resolved before use.
Install Mechanism
No install spec is present (instruction-only + a code file). That is low-risk — nothing is downloaded or written to disk by an installer step beyond the files already bundled.
Credentials
The skill declares no required environment variables, credentials, or config paths. The code shown does not access environment secrets or external credential stores. It does read user-supplied files (error logs, source files), which is expected for this functionality.
Persistence & Privilege
The skill is not marked always:true, does not request persistent presence, and doesn't attempt to modify other skill configurations. It only runs as an invoked script and therefore has a limited privilege profile.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install openclaw-debugger
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /openclaw-debugger 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Debugging assistant with error analysis, breakpoint suggestions, and execution tracing
元数据
Slug openclaw-debugger
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

OpenClaw Debugger 是什么?

Debugging assistant. Analyzes error logs, suggests breakpoints, traces execution flow, and helps identify root causes of issues. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 156 次。

如何安装 OpenClaw Debugger?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install openclaw-debugger」即可一键安装,无需额外配置。

OpenClaw Debugger 是免费的吗?

是的,OpenClaw Debugger 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

OpenClaw Debugger 支持哪些平台?

OpenClaw Debugger 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 OpenClaw Debugger?

由 michealxie001(@michealxie001)开发并维护,当前版本 v1.0.0。

💬 留言讨论