Community写作与编辑github.com

故障技术复盘撰写工具

将工单的技术事后分析(根本原因+修复方案)写入一个字段,并用其他分析字段指向该字段(“参见开发说明”)。支持工单参数或当前会话中的修复内容。

故障技术复盘撰写工具 是什么?

这是一个 AI 智能体技能,用于在项目管理系统中为工单自动生成并填写技术事后分析(post-mortem)。其核心设计理念是“一次编写,多处引用”:将所有技术分析内容(包括根本原因和修复方案)汇总到一个指定的字段中,然后将其他分析字段的文本指向该汇总字段,避免信息重复。技能高度可配置,通过读取 `~/.config/skills/analyse-causes/config.md` 配置文件,可以定制使用的工单管理系统(tracker)、字段格式、撰写语言、章节标题、以及指向字段的提示文本。该技能支持 Claude Code、Cursor 等基于终端的 AI 编程助手,通常通过自然语言触发词(如“analyse des causes”、“root cause”、“/analyse-causes”)调用。工作流程包括:识别目标工单(通过参数或当前会话的 diff/branch/MR)、阅读工单但不复制其描述、在代码中追溯根本原因并列出代码变更、生成结构化的 Markdown 内容(分为“根本原因”和“修复方案”两部分,禁止重述初始症状)、最后在工单中填写主字段和指向字段。该技能适用于需要标准化、自动化生成技术复盘文档的开发团队,能显著提升事后分析的效率和一致性。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Arzaroth/skills/tree/HEAD/skills/analyse-causes

Installed? Explore more 写作与编辑 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

工单技术事后分析(单一字段 + 指针)

用户将所有内容放入一个字段,并将其他分析字段指向该字段,避免重复描述。模拟此工作流程。

配置

在执行任何操作之前,请先读取 ~/.config/skills/analyse-causes/config.md。该文件设置了工单管理系统及其工具、项目和工单键匹配模式、字段格式、撰写语言和章节标题、主撰写字段、被指向字段及其提示文本,以及 MR 链接字段。如果该文件缺失,请告知用户将 config.example.md(位于本文件旁边)复制到 ~/.config/skills/analyse-causes/config.md 并填写内容,然后停止执行。

目标:传递给脚本的工单参数,否则为当前会话中正在修复的内容(diff / branch / MR)。

产出内容

一份完整的撰写内容,使用配置中指定的语言,采用 Markdown 格式,并包含配置标题下的两个章节:

  1. 根本原因 - 技术上的为什么会发生。不要复述初始情况(症状 / 工单描述)。回溯到真正起源:设计选择、常量 / 文件:行号、错误假设。绝不要提及可见症状。
  2. 修复方案 - 修改了什么以及为何它消除了根本原因。事实性描述:采用的机制、涉及的文件/常量、产生的行为。此处不包含 MR 链接:该链接应放到配置的 MR 链接字段中。

规则:简洁、短小精悍的要点、使用精确术语(常量、函数、文件:行号)、与实际代码核对。不要使用长破折号(U+2014)——使用连字符、逗号或重新组织句子。

执行步骤

  1. 识别工单:参数 = 与配置模式匹配的键;否则为正在修复的内容(当前会话的 diff / branch / MR)。
  2. 如有需要,通过配置的工具读取工单,但不要复制其描述。
  3. 在代码中追溯根本原因,并列出修复方案的变更(git diff / MR)。
  4. 撰写完整的分析内容。
  5. 展示该内容,然后按配置的格式填写字段:
    • 主撰写字段 <- 完整的分析内容
    • 每个被指向字段 <- 包含配置的提示文本的段落文档 如果没有定位到工单(会话中的修复没有关联工单键),则仅展示撰写内容并提供填写字段的选项。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Arzaroth/skills

Work one round of review comments on a pull/merge request: fetch every unresolved thread, verify each finding against the current code, fix what is still valid, reply with a justification to what is not, then commit, push and answer every thread. Use when a PR has review comments to deal with - from an AI reviewer (CodeRabbit and friends) or a human - and when asked to 'address the review', 'fix the review comments', 'respond to CodeRabbit', or 'handle the PR feedback'. The babysit-pr skill calls this for each of its rounds.

Arzaroth/skills

Open a pull/merge request and stay with it until it merges: trigger the reviewers, watch for their verdict, work each round of findings, push, re-trigger, and merge when it is clean. Handles AI reviewers (CodeRabbit) and human maintainers, on GitHub (gh) and GitLab (glab). Use when asked to 'open a PR and babysit it', 'ship this and see it through', 'get this PR merged', 'watch the PR until it lands', or '/babysit-pr'. Also the review-and-merge half of ship-feature-pipeline.

Arzaroth/skills

Check whether the repo's own docs still describe the code after recent changes, and update the ones that went stale. Scopes itself to the last merged branch, the last commit, this session's work, or a full sweep. Use when asked to 'update the docs', 'check the docs', 'are the docs still accurate', 'docs sweep', 'refresh the documentation', or '/docs-update'. Every line it writes goes through the unslop skill. Run it before cutting a release or merging a feature, so docs ship with the change instead of trailing it.

Arzaroth/skills

Cut a release on GitHub: update the changelog, bump the version (preferring the repo's own release task or script over a manual edit), tag, push, then watch the release workflow until the GitHub Release exists. Use when asked to 'cut a release', 'release version X', 'ship a new version', 'bump the version and tag', 'publish a release', or '/gh-release'. For repos where a tag push triggers a GitHub Actions workflow that creates the release.

相关技能