AGENT SKILL
default-log-triage
内置默认值班日志链路排查 Flow,按步骤加载工具 Skill 并生成参数。
- License 许可
- MIT
- 最近更新
- 2026-10-15
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- default-log-triage
- metadata
- { "role": "playbook" }
- description
- 内置默认值班日志链路排查 Flow,按步骤加载工具 Skill 并生成参数。
- allowed-tools
- incident.normalize catalog.resolve_service catalog.get_log_sources log.query_by_trace_id log.query_by_template trace.get_chain index.get_status repo.list code.search code.read graph.impact graph.context code.find_callers notify.send
03 SKILL.md 正文
default-log-triage
用于 webhook 告警、replay 与人工错误排查。按下列 14 步推荐顺序执行;每步加载对应 helper Skill 文档,由 Agent 经 MCP Gateway 调用工具。不允许伪造结果。
推荐顺序(14 步)
incident.normalize(helper:incident-normalize)— 规整事件输入,提取服务、租户、环境、trace、症状、代码线索、exception_summary与call_chaincatalog.resolve_service(helper:catalog-resolve-service)— 将服务名映射到服务目录条目catalog.get_log_sources(helper:catalog-log-sources)— 解析后续查询用的日志源log.query_by_trace_id(helper:log-query-trace)— 按 trace id 拉取事发窗口日志log.query_by_template(helper:log-query-template)— 按默认错误模板拉取兜底日志trace.get_chain(helper:trace-chain)— 在有 trace id 时拉取分布式链路index.get_status(helper:index-repo-context)— 读代码前确认索引是否可用repo.list(helper:index-repo-context)— 目录或索引不完整时列出已注册仓库code.search(helper:code-lookup)— 日志或 trace 给出具体线索后再搜代码code.read(helper:code-lookup)— 读取命中文件或事件中的明确路径graph.impact(helper:graph-lookup)— 对call_chain故障符号做 GitNexus 影响面graph.context(helper:graph-lookup)— 加载故障方法的 360° 符号上下文code.find_callers(helper:code-lookup)— 跨仓库追踪 caller(图谱优先,Zoekt 回退),与运行时调用链对齐- 生成报告(系统在报告后按通知渠道自动发送;不要规划
notify.send)
系统在 build_case_report 之后按 Admin 已启用渠道自动发送通知;不要在计划中调用 notify.send。
AI 分析输入约定
错误排查工作台在生成 AI 分析时,不会上传完整 tool inputs/outputs 或整段堆栈,而是优先使用:
normalize-incident提取的exception_summary与call_chaingraph-impact/graph-context(GitNexus 影响面与符号上下文)find-callers(code.find_callers,图谱优先 + Zoekt 回退)的 caller 对齐与 HTTP 入口- 规则引擎 report 摘要
- 少量证据预览
因此 incident.normalize 必须尽量从原始日志中提取业务调用链主方法(如 Controller -> Service -> Mapper),供后续 AI 与 code/graph lookup 复用。
工具 Skill 索引
| 步骤 | 工具 Skill |
|---|---|
| normalize | incident-normalize |
| catalog | catalog-resolve-service、catalog-log-sources |
| logs | log-query-trace、log-query-template |
| trace | trace-chain |
| index/repo | index-repo-context |
| code | code-lookup |
| graph | graph-lookup |
| notify | notify-send |
所有工具调用必须经过 MCP Gateway,不允许伪造结果。
04 同仓库更多 Skills
hello-triage
Minimal playbook fixture for install tests.
★ 1
trace-chain
获取分布式 trace 链路证据。
★ 1
notify-send
在报告生成后发送排查结果通知。
★ 1
log-query-trace
按 trace id 查询日志证据。
★ 1
log-query-template
按默认错误模板查询日志作为兜底证据。
★ 1
index-repo-context
检查代码索引状态并列出已注册仓库。
★ 1