Claw Trace - Work Process Visualization
This Skill is used to record and display the AI agent's work process.
Feature Modules (Configurable)
User can say "enable XX feature" or "use simple mode" to switch.
Module 1: Call Table (Enabled by Default)
| Step | Tool | Input | Result | Duration |
|---|
| 1 | websearch | query: "xxx" | ❌ Failed | 0ms |
| 2 |
webfetch | url: "xxx" | ✅ Success | 230ms |
Module 2: Flowchart (Enabled by Default)
[User Request]
↓
- 1. web_search → ❌
↓
- 2. web_fetch → ✅
↓
[Reply to User]
Module 3: Statistics (Optional)
CODEBLOCK0
Module 4: Detailed Log (Optional)
Record complete input/output for each call (except sensitive info).
Module 5: Save to File (Optional)
Generate Markdown report saved to workspace.
Module 6: Filters (Optional)
Filter tool calls by various criteria:
| Filter Type | Command | Example |
|---|
| By tool name | "filter: toolname" | "filter: websearch" |
| By result |
"filter: success" / "filter: failed" | "filter: failed" |
| By time | "filter: last N calls" | "filter: last 5 calls" |
| By keyword | "filter: keyword in output" | "filter: error" |
Multiple filters can be combined: "filter: web_search and failed"
Module 7: Export Format (Optional)
Choose export format:
- - Markdown (default)
- JSON
- HTML (with syntax highlighting)
Usage
Configuration File
The Skill has a config file config.json with the following options:
CODEBLOCK1
User Commands
User can modify config through conversation:
| Command | Action |
|---|
| "enable trace" | enable = true |
| "disable trace" |
enable = false |
| "use simple mode" | mode = simple |
| "use full mode" | mode = full |
| "enable statistics" | statistics = true |
| "enable filters" | filters = true |
| "filter: tool_name" | filter by tool name |
| "filter: success/failed" | filter by result |
| "filter: last N calls" | filter by count |
| "output in English" | language = en |
| "output in Chinese" | language = zh |
Workflow
- 1. Each time Skill is called: Read
config.json first to get current config - Based on config:
- enable = false → Don't show (unless user explicitly requests)
- enable = true →
MUST automatically show trace output after every tool call, do NOT wait for user to ask
- 3. When user modifies config: Update config.json and save
⚠️ Important Rule
When enable = true, trace output MUST be included in EVERY reply after tool calls automatically, without waiting for user to say "show trace"!
Language Auto-Detection
- - Output language follows user's language
- User speaks Chinese → Output in Chinese
- User speaks English → Output in English
Notes
- - Sensitive info (API Keys, passwords) should not be recorded
- Truncate overly long output with [...]
- Clearly indicate reasons for failed calls
- Keep output concise, don't over-detail
⚠️ Security Guidelines
Sensitive Data Redaction (MANDATORY)
Before displaying any tool call input/output, you MUST redact the following:
Must redact:
- - API Keys, Tokens, Passwords (patterns:
key=, token=, password=, Authorization:) - File contents that may contain secrets
- User credentials or private data
How to redact:
- - Replace with
[REDACTED] or INLINECODE7 - Keep the structure but mask values
- Example:
{"api_key": "sk-xxx"} → INLINECODE9
Safe Defaults
Default configuration is set to:
- -
enable: false (off by default, user must explicitly enable) - INLINECODE11 (don't record full inputs/outputs)
- INLINECODE12 (don't persist to disk)
Best Practices
- 1. Test before enabling - Enable in a safe environment first
- Review outputs - Check that no secrets appear in traces
- Use simple mode - Avoid detailed logging in production
- Disable after use - Turn off when not needed
爪痕追踪 - 工作流程可视化
此技能用于记录和展示AI代理的工作过程。
功能模块(可配置)
用户可以说启用XX功能或使用简洁模式来切换。
模块1:调用表格(默认启用)
| 步骤 | 工具 | 输入 | 结果 | 耗时 |
|---|
| 1 | websearch | 查询:xxx | ❌ 失败 | 0毫秒 |
| 2 |
webfetch | 网址:xxx | ✅ 成功 | 230毫秒 |
模块2:流程图(默认启用)
[用户请求]
↓
- 1. web_search → ❌
↓
- 2. web_fetch → ✅
↓
[回复用户]
模块3:统计信息(可选)
📊 工作统计
⏱️ 总耗时:8.5秒
🔧 工具调用:15次
✅ 成功率:87%(13/15)
📈 工具使用排名:
1. web_fetch - 10次(67%)
2. exec - 3次(20%)
模块4:详细日志(可选)
记录每次调用的完整输入/输出(敏感信息除外)。
模块5:保存到文件(可选)
生成Markdown报告并保存到工作区。
模块6:过滤器(可选)
按多种条件筛选工具调用:
| 过滤类型 | 命令 | 示例 |
|---|
| 按工具名称 | 过滤:工具名称 | 过滤:web_search |
| 按结果 |
过滤:成功 / 过滤:失败 | 过滤:失败 |
| 按时间 | 过滤:最近N次调用 | 过滤:最近5次调用 |
| 按关键词 | 过滤:输出中包含关键词 | 过滤:错误 |
多个过滤器可组合使用:过滤:web_search且失败
模块7:导出格式(可选)
选择导出格式:
- - Markdown(默认)
- JSON
- HTML(带语法高亮)
使用方法
配置文件
该技能有一个配置文件 config.json,包含以下选项:
json
{
enable: false, // 是否默认启用(默认:false,按需启用)
mode: simple, // 模式:simple / full
enabledModules: {
table: true, // 调用表格
flowchart: true, // 流程图
statistics: false, // 统计信息
detailedLog: false, // 详细日志
saveToFile: false // 保存到文件
},
language: auto // 语言:auto / zh / en
}
用户命令
用户可通过对话修改配置:
| 命令 | 操作 |
|---|
| 启用追踪 | enable = true |
| 禁用追踪 |
enable = false |
| 使用简洁模式 | mode = simple |
| 使用完整模式 | mode = full |
| 启用统计 | statistics = true |
| 启用过滤器 | filters = true |
| 过滤:工具名称 | 按工具名称过滤 |
| 过滤:成功/失败 | 按结果过滤 |
| 过滤:最近N次调用 | 按次数过滤 |
| 输出英文 | language = en |
| 输出中文 | language = zh |
工作流程
- 1. 每次技能被调用时:先读取 config.json 获取当前配置
- 根据配置:
- enable = false → 不显示(除非用户明确要求)
- enable = true →
必须自动显示每次工具调用后的追踪输出,无需等待用户询问
- 3. 当用户修改配置时:更新 config.json 并保存
⚠️ 重要规则
当 enable = true 时,每次回复中必须自动包含工具调用后的追踪输出,无需等待用户说显示追踪!
语言自动检测
- - 输出语言跟随用户语言
- 用户说中文 → 输出中文
- 用户说英文 → 输出英文
注意事项
- - 敏感信息(API密钥、密码)不应记录
- 过长的输出用[...]截断
- 明确标注失败调用的原因
- 保持输出简洁,不过度详细
⚠️ 安全指南
敏感数据脱敏(强制要求)
在显示任何工具调用的输入/输出前,必须对以下内容进行脱敏:
必须脱敏:
- - API密钥、令牌、密码(模式:key=、token=、password=、Authorization:)
- 可能包含机密信息的文件内容
- 用户凭证或私人数据
脱敏方式:
- - 替换为 [已脱敏] 或 [已隐藏]
- 保留结构但遮蔽值
- 示例:{apikey: sk-xxx} → {apikey: [已脱敏]}
安全默认值
默认配置设置为:
- - enable: false(默认关闭,用户必须明确启用)
- detailedLog: false(不记录完整输入/输出)
- saveToFile: false(不持久化到磁盘)
最佳实践
- 1. 先测试再启用 - 先在安全环境中启用
- 检查输出 - 确保追踪中没有出现机密信息
- 使用简洁模式 - 避免在生产环境中使用详细日志
- 用后即关 - 不需要时关闭