← 返回 Skills 市场
leoluo0814

ClawTrace

作者 LeoLuo · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
106
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install clawtrace
功能描述
Trace and debug a single OpenClaw conversation session. Use when you need to analyze openclaw logs, correlate them with the current session context, inspect...
使用说明 (SKILL.md)

ClawTrace

ClawTrace analyzes one OpenClaw session at a time. It combines OpenClaw logs and current session context to reconstruct steps, summarize module activity, and generate a Markdown trace report.

When to Use

  • Inspect one OpenClaw session end to end
  • Explain slow, failed, retried, or noisy runs
  • Generate a structured session trace report
  • Produce evidence-based optimization suggestions

Core Rules

  1. Always analyze one session at a time.
  2. Always use both data sources before writing the report:
    • openclaw logs --json --local-time --no-color
    • current session context
  3. Never invent missing values. Use Not available, Estimated, or Unknown when needed.
  4. Prefer exact identifiers and timestamps over inferred values.
  5. Write the report in the user's language unless the user asks for another language.
  6. If the user's chat channel supports file sending, prefer delivering the report as a Markdown file; otherwise reply directly in chat using the same report structure.
  7. Do not output raw logs, raw JSON, or verbatim log lines in the final report.

Inputs

Logs

Use JSON logs so events can be parsed reliably.

openclaw logs --json --local-time --no-color
  • --limit \x3Cn> to restrict line count
  • --max-bytes \x3Cn> to avoid huge tails
  • --interval \x3Cms> if polling is needed
  • --timeout \x3Cms> if waiting for fresh output
  • --expect-final only when the task requires waiting for the final response

Context

Use current session context to identify the target run and recover information not explicit in logs, such as request scope, recent responses, session clues, and context-size indicators.

Analysis Workflow

1: Identify the Target Session

  • sessionId
  • sessionKey
  • runId
  • channel
  • nearby timestamps
  • current-session clues

If multiple runs exist in the same session, prefer the latest completed run unless the user clearly points to a different one.

2: Extract Key Events

Extract session, prompt, agent, tool, lane, context, warning, error, and related gateway events, and capture the key fields needed for analysis such as time, level, module, sessionID, runID, tool, toolCallID, duration, summary, and outcome.

3: Reconstruct Steps

Convert events into ordered steps such as queue, prompt, agent, tool, gateway, context, warn, error, and done.

When possible, pair start and end events to compute duration. If only one side exists, mark duration as Unknown.

4: Compute Metrics

  • Session ID
  • Session Key
  • Run ID
  • Start and End Time
  • Total Duration
  • Step Count
  • Tool Count
  • Warning Count
  • Error Count
  • Module Count
  • Context Indicators
  • Token Indicators

Use exact values when present. Otherwise mark them as Estimated or Not available.

5: Produce Optimization Suggestions

Only give evidence-based suggestions, such as duplicate tool calls, oversized context, repeated warnings, long tool durations, queue delays, or excessive gateway noise.

If there is no clear optimization opportunity, say that no evidence-backed optimization was found.

Output Format

If file sending is supported in the user's chat channel, prefer a Markdown file such as clawtrace-run-\x3CrunId>.md or clawtrace-report-\x3Ctimestamp>.md; otherwise return the same structure directly in chat.

Example Markdown output:

# ClawTrace Report

## Overview
Scope: RunId=\x3CrunId> or Message=\x3Cmessage>
Start: \x3Cstart>
End: \x3Cend>
Total Tokens Used: \x3Ctokens>
Total Duration: \x3Ctotal_duration> (seconds)
Total Steps: \x3Csteps_count> 
Tools Used: \x3Ctools_list> (separated by comma)
Warnings: \x3Cwarn_count>
Errors: \x3Cerror_count>
Generated at: \x3Ctime>

Suggestions:
- \x3Cevidence-based suggestion>
- \x3Cevidence-based suggestion>

## Modules

| Module | Success | Warn | Error | Total Steps | Avg Time Cost | Notes |
| --- | ---: | ---: | ---: | ---: | --- | --- |
| \x3Cmodule> | \x3Csuccess> | \x3Cwarn> | \x3Cerror> | \x3Ctotal_steps> | \x3Cavg_time_cost> | \x3Cnotes> |

## Steps

| Step | Time | Type | Module | Action | Duration | Result | Notes |
| ---: | --- | --- | --- | --- | --- | --- | --- |
| 1 | \x3Ctime> | \x3Ctype> | \x3Cmodule> | \x3Caction> | \x3Cduration> | \x3Cresult> | \x3Cnotes> |
| 2 | \x3Ctime> | \x3Ctype> | \x3Cmodule> | \x3Caction> | \x3Cduration> | \x3Cresult> | \x3Cnotes> |

Sort the Steps table strictly by time in ascending order. Use Success, Failed, Warning, or Unknown for Result, and do not include raw logs or raw JSON.

Partial Data

If the logs contain Log tail truncated (increase --max-bytes)., explicitly state that the report is based on partial logs.

Do not fabricate missing steps. Mark uncertain durations and metrics as Unknown, Estimated, or Not available.

Noise Filtering

Ignore unrelated background noise such as cron timers, heartbeats, and unrelated channel traffic unless they materially affect the target session.

Quality Standard

The report should quickly show which session was analyzed, how long it took, what modules and steps were involved, where time went, what warnings or failures happened, and what to optimize next. If evidence is weak, say so clearly.

安全使用建议
This skill is coherent and appears to do what it says: parse local OpenClaw logs and current session context to produce a report. Before enabling it, ensure the agent environment actually has the 'openclaw' CLI and that you are comfortable granting the agent access to the local logs and session context (logs may contain sensitive data). The skill states it will not include raw log lines in the final report, but parsed fields can still reveal sensitive information — consider running it in a controlled environment or reviewing logs for sensitive tokens before analysis.
功能分析
Type: OpenClaw Skill Name: clawtrace Version: 1.0.1 The clawtrace skill is a legitimate debugging utility designed to help users analyze OpenClaw session logs. It instructs the agent to use the platform's native 'openclaw logs' command to reconstruct session steps and generate a structured Markdown report. The instructions in SKILL.md include safety-conscious rules, such as avoiding the output of raw log lines and focusing only on evidence-based optimization suggestions, with no signs of data exfiltration or malicious execution.
能力评估
Purpose & Capability
Name/description match the actions the skill instructs (parse OpenClaw logs + session context -> report). No unrelated credentials, binaries, or install steps are requested.
Instruction Scope
SKILL.md is specific: it instructs using the local 'openclaw logs' CLI and current session context, parses events, computes metrics, and outputs a sanitized Markdown report. It does not ask to read unrelated files, secrets, or transmit data externally.
Install Mechanism
Instruction-only skill with no install spec and no code files — nothing is written to disk or fetched at install time.
Credentials
No environment variables, credentials, or config paths are requested. The only implicit requirement is access to the local 'openclaw' CLI and session context, which is appropriate for the stated task.
Persistence & Privilege
always is false and the skill does not request persistent system-wide changes or other skills' configs. Autonomous invocation is allowed by default but not combined with other elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawtrace
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawtrace 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Removed the README.md file from the repository. - No changes were made to the skill logic, behavior, or documentation in SKILL.md.
v1.0.0
Initial release of ClawTrace: a tool for tracing and debugging single OpenClaw conversation sessions. - Supports end-to-end inspection of one OpenClaw session using both logs and session context. - Reconstructs and summarizes workflow steps, module activity, metrics, warnings, and errors. - Produces clear, structured Markdown trace reports with evidence-based optimization suggestions. - Prioritizes accuracy over inference; marks all missing or estimated values. - Designed for clarity: excludes raw logs and irrelevant noise, and adapts output to channel capabilities.
元数据
Slug clawtrace
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

ClawTrace 是什么?

Trace and debug a single OpenClaw conversation session. Use when you need to analyze openclaw logs, correlate them with the current session context, inspect... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 106 次。

如何安装 ClawTrace?

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

ClawTrace 是免费的吗?

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

ClawTrace 支持哪些平台?

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

谁开发了 ClawTrace?

由 LeoLuo(@leoluo0814)开发并维护,当前版本 v1.0.1。

💬 留言讨论