用调试命令执行任务并导出工具调用追踪 JSON,便于排障审计。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "tool-tracer" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/cat-agent-skills/main/submissions/tool-tracer/SKILL.md 2. 保存为 ~/.claude/skills/tool-tracer/SKILL.md 3. 装好后重载技能,告诉我可以用了
/special-debug tool-trace 查询订单 4471 的状态,并起草一封给客户的说明邮件
正常完成订单查询与邮件草稿,并生成可下载的 tool_trace.json,按顺序记录本次运行中的工具与动作调用。
/special-debug tool-trace 帮我检查这次任务里调用了哪些连接器,并总结是否有报错
返回任务结果,并附带默认脱敏的追踪文件,其中疑似密钥、令牌或隐私数据会被遮盖。
/special-debug tool-trace --full 运行这项任务,并保留所有调用输入输出用于管理员排查
执行任务后生成未脱敏的完整追踪 JSON,适合授权管理员做深入问题定位。
开发者或运维在真实对话中需要了解代理背后具体调用了哪些工具、连接器或子技能时,可以用该命令执行原任务并导出结构化追踪文件。
当一次任务失败或结果异常时,这个技能可在任务结束后输出包含错误码、重试和调用顺序的 JSON,帮助做故障定位与复盘。
默认模式会对疑似密钥、令牌及敏感个人信息做脱敏,便于团队在不过度暴露敏感值的前提下共享追踪结果进行分诊。
该文档介绍了一个仅供管理员或调试用途的技能:当消息中出现精确命令 /special-debug tool-trace 时,先正常执行用户任务,再生成 tool_trace.json,记录本次运行中的工具、动作、连接器、知识查询和子技能调用,以及输入输出、错误码、重试和顺序。文档还说明了默认脱敏与 --full 完整捕获两种模式、敏感数据风险,以及追踪文件的默认保存位置。
Runs any user task normally, then produces a structured JSON run summary (tool_trace.json) capturing every tool, action, connector, knowledge query, and sub-skill call made during the run — inputs, outputs, error codes, retries, and sequence. Built as an admin / debug tool: on a live channel a normal user never sees what the agent did behind the scenes, so this lets a maker or admin see it and triage an interaction without reproducing it in the test pane.
This skill activates only when the user's message contains the exact debug command:
/special-debug tool-trace
The command may be followed by (or precede) the task to run — e.g. /special-debug tool-trace look up order 4471 and email the customer. If the command is present, run the task and produce the trace; if it is not present, this skill does not apply — even for casual phrasings like "trace this", "log this run", "debug this", or "what did you just do". Requiring the explicit command keeps a trace a deliberate act, not something a channel user triggers by accident.
Two capture modes. By default the trace runs in redacted mode — values that look like secrets, tokens, credentials, or PII/PHI are masked so the trace is safe to share for triage while still showing what ran. An authorized admin can append --full (/special-debug tool-trace --full …) to capture every value verbatim for deep debugging. Restrict who can use --full at deployment — a skill can't enforce it.
Scope & sensitivity. This is an admin / debug tool. In the default redacted mode, values that look like secrets, tokens, credentials, or PII/PHI are masked (e.g.
"<redacted:token>") so the trace shows what ran without leaking sensitive data. In--fullmode nothing is masked, sotool_trace.jsoncan contain secrets, tokens, or PHI verbatim. A skill cannot enforce access control; the maker deploying this is responsible for restricting--full(and the agent) to authorized admin/maker users and for handling the file within that trust boundary. Prefer not to expose--fullon agents published to untrusted end-user channels.
Carry out the user's request exactly as you would without this skill. Use whatever tools are needed. Do not alter your reasoning or tool usage because tracing is active.
After the task is complete (or if it fails), compile a tool_trace.json file capturing every tool call made during the run.
Write tool_trace.json using your file-writing tool so it is returned to the user as a download. Default path: /app/created/tool_trace.json (the download folder in the Agent Skills sandbox). If that path or a create tool is unavailable in your runtime, use whatever file-writing tool exists and save to the runtime's user-download location.
{
"trace_metadata": {
"task_description": "<what the user asked for>",
"agent_name": "<agent name if known, else null>",
"timestamp_utc": "<ISO 8601 timestamp of when the task completed, or null if no clock is available>",
"total_tool_calls": 0,
"mode": "redacted | full",
"status": "success | partial | failed"
},
"tool_calls": [
{
"step": 1,
"tool_name": "<exact tool name>",
"purpose": "<one sentence: why this tool was called at this step>",
"input": {
"<param_name>": "<param_value>"
},
"output_summary": "<concise summary of what the tool returned>",
"output_raw": "<full raw output if ≤ ~2000 chars, else 'truncated — see output_summary'>",
"status": "success | error",
"error_message": null
}
],
"final_answer_summary": "<brief description of what was ultimately delivered to the user>"
}
…
只有当用户消息中包含精确命令 /special-debug tool-trace 时才会触发,也可附加 --full。像“trace this”这类自然语言说法不会触发。
默认是脱敏模式,会遮盖看起来像密钥、令牌、凭证或 PII/PHI 的值。只有使用 --full 时才会按原样保留这些内容。
文档说明默认写入 /app/created/tool_trace.json,作为可下载文件返回给用户。如果该路径或创建工具不可用,会改用当前运行时可用的文件写入方式与下载位置。
验证并分析指定 SharePoint 列表,生成可交互 HTML 洞察报告并返回链接
帮助你设计、审查并打包可复用的 Agent Skill 与 SKILL.md
帮你润色、改写和去AI味,让文字更像自然的人类写作。
帮助用户以冷静、结构化且合乎伦理的方式准备和改进谈判。
把白板草图转成可编辑的客户级PPT信息图
分析 Teams 与邮件写作习惯,生成可复用的个人沟通风格画像。
通过分析 JSONL 调试日志,快速定位聊天代理异常、耗时与调用原因
帮助开发者本地分析 AI 代理的 CLI 使用行为与调用数据。
抓取并分析 LangSmith 执行轨迹,快速定位 LangChain 与 LangGraph 代理问题
帮助你系统复现、定位并修复代码或环境中的复杂故障问题。
将 AI 任务拆成可复用步骤流,便于持续优化、复盘与稳定执行。
探测线上 API 故障并给出根因、证据与置信度