360 Secure SkillHub
360 安全技能中心

Incident Hotfix

这是聚焦代码层面的生产事故响应热修复工具,适用于生产环境出现代码故障需快速修复的场景。核心功能按标准化流程执行:分级判定 severity、创建CI安全的热修复分支、复现隔离问题并制作带回滚方案的补丁、执行CI检查、收集证据包、跟踪事后行动。通过脚本辅助操作,输出包含事故时间线、回滚方案、行动项的标准化文档及证据包,确保修复可追溯且有安全回退路径。

broedkrummen
broedkrummen
热度 85.91
最近更新 2026-05-18 12:13:05
分类:开发依赖:代码执行 / 读写文件应用场景:调试排错 / DevOps / 自动化脚本 / 任务管理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add incident-hotfix
Metadata
name
incident-hotfix
description
Coder-focused incident response and hotfix execution for production issues. Use when you need reproducible triage, patch/rollback decisions, CI-safe hotfix branches, evidence capture, and postmortem action tracking tied to code changes.

Incident Hotfix

Use this alongside broader incident-response skills when code-level action is required.

Workflow

  1. Classify severity using references/severity-matrix.md
  2. Create hotfix branch from current production tag/commit
  3. Reproduce and isolate with minimal failing test
  4. Patch with rollback plan
  5. Run focused CI checks
  6. Capture evidence bundle
  7. Merge + verify + postmortem actions

Step 1 — Create incident workspace

bash scripts/start_hotfix.sh --id INC-1234 --base main

This creates:

  • hotfix/INC-1234-<slug> branch
  • docs/incidents/INC-1234/ folder
  • starter files for timeline, rollback, and actions

Step 2 — Evidence capture

bash scripts/capture_evidence.sh --id INC-1234

Collects into docs/incidents/INC-1234/evidence/:

  • latest commits + diff summary
  • changed files list
  • local env snapshot (safe subset)
  • test output logs

Step 3 — Patch gate

Before PR/merge, ensure:

  • failing case reproduced (or clearly documented)
  • minimal patch scope
  • rollback command documented in ROLLBACK.md
  • focused tests pass + no new lint/type failures

Step 4 — Postmortem actions

Use references/action-template.md to convert findings into concrete tasks:

  • owner
  • due date
  • verification criteria

Required outputs

  • docs/incidents/<id>/TIMELINE.md
  • docs/incidents/<id>/ROLLBACK.md
  • docs/incidents/<id>/ACTIONS.md
  • docs/incidents/<id>/evidence/ bundle

Notes

  • Prefer smallest safe patch over broad refactor during incident.
  • If root cause is uncertain, ship containment first, then permanent fix.
  • Never merge hotfix without rollback path.