360 Secure SkillHub
360 安全技能中心

Session Debug Log Investigator

用于诊断Claude Code会话运行异常:先启用调试日志(若未开启),读取最新日志片段排查警告、错误及重复失败模式,核对配置文件后总结可能原因与复现步骤。输入需提供问题描述、日志情况及配置文件,输出含错误分析、原因判断与具体后续建议,能区分配置与运行时问题,避免读取冗余大日志。

wimi321
wimi321
热度 34.87
最近更新 2026-05-11 17:39:39
分类:开发依赖:读写文件 / 内部调用大模型应用场景:调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add session-debug-log-investigator
Metadata
name
session_debug_log_investigator
description
Use when diagnosing a failing or confusing Claude Code session by enabling debug logging, tailing recent logs, and explaining warnings or errors.

Session Debug Log Investigator

Use this skill to diagnose runtime issues in an agent session.

Workflow

  1. Enable debug logging if it is not already active.
  2. Read the latest portion of the debug log instead of the whole file.
  3. Search for warnings, errors, and repeated failure patterns.
  4. Cross-check config files that can explain the behavior.
  5. Summarize likely causes and next reproduction steps.

Guardrails

  • Tail logs instead of loading giant files.
  • Separate configuration issues from product/runtime bugs.
  • If logging was just enabled, ask for reproduction before concluding too much.

Example Requests

  • Help me understand why this Claude Code session is misbehaving.
  • Turn on debug logging and diagnose this issue from the latest logs.

Inputs

  • Issue description
  • Current log availability
  • Relevant settings files

Outputs

  • Error or warning analysis
  • Likely causes
  • Suggested reproduction or next steps

Success Criteria

  • Recent logs were interpreted correctly.
  • The diagnosis distinguishes config vs runtime issues.
  • Follow-up steps are specific.

Non-Goals

  • Reading giant logs in full without need
  • Pretending to diagnose pre-log activity that was never captured

Source Provenance

Derived from src/skills/bundled/debug.ts.