Agent Skillsnixopus/nixopus › incident-response

incident-response

GitHub

自动化生产事故响应工作流,涵盖严重性分级、上下文收集、根因诊断、自动修复决策及通知机制,旨在快速恢复服务并减少人工干预。

api/skills/incident-response/SKILL.md nixopus/nixopus

Trigger Scenarios

收到自动化故障事件 用户报告生产环境事故

Install

npx skills add nixopus/nixopus --skill incident-response -g -y
More Options

Non-standard path

npx skills add https://github.com/nixopus/nixopus/tree/master/api/skills/incident-response -g -y

Use without installing

npx skills use nixopus/nixopus@incident-response

指定 Agent (Claude Code)

npx skills add nixopus/nixopus --skill incident-response -a claude-code -g -y

安装 repo 全部 skill

npx skills add nixopus/nixopus --all -g -y

预览 repo 内 skill

npx skills add nixopus/nixopus --list

SKILL.md

Frontmatter
{
    "name": "incident-response",
    "metadata": {
        "version": "1.0"
    },
    "description": "Structured incident response workflow — severity classification, diagnosis delegation, auto-fix decisions, notification, and post-incident review. Use when an automated failure event is received or when the user reports a production incident."
}

Incident Response

Event Classification

Classify the incident by severity before acting:

Severity Criteria Response time Action
Critical App completely down, all users affected Immediate Diagnose + attempt auto-fix + notify
High App degraded, errors for some users Within minutes Diagnose + attempt auto-fix + notify
Medium Non-user-facing failure (build failed, deploy failed) Within session Diagnose + fix suggestion + notify
Low Warning, non-critical issue detected Informational Notify only

Severity signals

Signal Severity
Container exited, restart_count > 3 Critical
HTTP probe returns 502/503/504 Critical
Build failed Medium
Container OOM-killed once High
Health endpoint returns unhealthy High
Deployment succeeded but no traffic High
SSL certificate expiring soon Medium
Disk usage > 85% Medium

Incident Workflow

1. GATHER

Collect context about the affected resource:

  • get_application — app details, current deployment, configured port
  • get_application_deployments — recent deployment history
  • get_deployment_logs — if build/deploy failed
  • list_containersget_container — container status
  • get_container_logs — runtime errors

2. DIAGNOSE

Delegate to the diagnostic agent with full context:

  • Include: application ID, deployment ID, error message, container status
  • The diagnostic agent uses failure-diagnosis skill for pattern matching
  • Wait for diagnosis result: root cause + whether it's code-fixable

3. DECIDE

Based on diagnosis:

Root cause type Action
Code error (syntax, missing dep, config) Auto-fix via PR
Dockerfile issue (wrong base image, missing file) Auto-fix via PR
Environment variable missing or wrong Notify user — env vars need manual input
Infrastructure (server resources, Docker daemon) Notify user — requires manual intervention
Database connection failed Notify user — check database status and credentials
External service down Notify user — nothing to fix on our side
Unknown Notify user with gathered evidence

4. FIX (if code-fixable)

Delegate to the GitHub agent:

  • Branch: auto-fix/<short-description> (e.g. auto-fix/missing-prisma-schema)
  • Read the problematic file, generate the minimal fix
  • Commit with message: fix: <description of what was fixed>
  • Open PR from fix branch into default branch
  • Never merge — return PR URL for user approval

5. NOTIFY

Send to all configured notification channels:

If fix PR created:

Failure detected for [app name].
Root cause: [one-line summary].
Auto-fix PR: [pr_url]
Review and merge to trigger redeploy.

If no fix possible:

Failure detected for [app name].
Root cause: [one-line summary].
Recommended action: [specific next step].

If diagnosis inconclusive:

Issue detected for [app name].
Findings: [what was observed].
Unable to determine root cause automatically.
Please investigate: [specific things to check].

6. VERIFY (after user merges fix)

If the fix PR is merged and a new deployment triggers:

  • Run post-deploy-verification checks
  • If healthy: notify "Issue resolved after fix merge"
  • If still failing: escalate — "Fix did not resolve the issue, further investigation needed"

Rules

  • Never merge PRs automatically — always require user approval
  • Never push to main/master — always use fix branches
  • Do not retry the same fix more than once
  • Maximum 3 auto-fix attempts per incident before escalating to user
  • Include all relevant context when delegating to sub-agents
  • Every response must end with a concrete result or completed action

Anti-Patterns

  • Fixing symptoms instead of root cause: If the container OOM-kills, don't just increase memory — investigate the memory consumer
  • Auto-fixing infrastructure issues: Server-level problems (disk full, Docker daemon down) can't be fixed via code PR
  • Notifying without actionable information: "Something went wrong" is useless — always include what failed, why, and what to do
  • Cascading fixes: If fix A causes failure B, stop and escalate — don't chain auto-fixes

Related Skills

  • failure-diagnosis — Pattern tables for identifying root causes
  • rollback-strategy — When to rollback vs fix forward
  • post-deploy-verification — Verify fix worked after merge

Event Context

Your prompt contains the full incident context formatted by the event pipeline. This includes the event type, source details, error information, and any relevant identifiers (application, deployment, repository, etc.). Use all provided context to drive your investigation.

Safety Rules

  • Never merge PRs. Always return the PR URL for user approval.
  • Never push to main/master. Always create a fix branch.
  • If you cannot determine the root cause, notify the user with what you found and stop.
  • Do not retry the same fix more than once. Maximum 3 auto-fix attempts per incident before escalating.
  • Include all relevant context identifiers when delegating to diagnostics or github.
  • After delegation returns, immediately process the result. Never say work is "underway".
  • Every response must end with concrete information or a completed action.

Version History

  • cf05d97 Current 2026-08-20 14:52

Same Skill Collection

api/skills/api-catalog/SKILL.md
api/skills/caddyfile-generation/SKILL.md
api/skills/compose-setup/SKILL.md
api/skills/container-resource-tuning/SKILL.md
api/skills/cpp-deploy/SKILL.md
api/skills/database-migration/SKILL.md
api/skills/deno-deploy/SKILL.md
api/skills/deploy-delegation/SKILL.md
api/skills/deploy-flow/SKILL.md
api/skills/deployment-analysis/SKILL.md
api/skills/diagnostic-workflow/SKILL.md
api/skills/dockerfile-generation/SKILL.md
api/skills/dockerignore-generation/SKILL.md
api/skills/domain-attachment/SKILL.md
api/skills/domain-tls-routing/SKILL.md
api/skills/dotnet-deploy/SKILL.md
api/skills/elixir-deploy/SKILL.md
api/skills/failure-diagnosis/SKILL.md
api/skills/github-onboarding/SKILL.md
api/skills/github-workflow/SKILL.md
api/skills/gleam-deploy/SKILL.md
api/skills/go-deploy/SKILL.md
api/skills/java-deploy/SKILL.md
api/skills/machine-ops/SKILL.md
api/skills/mcp-integrations/SKILL.md
api/skills/monorepo-strategy/SKILL.md
api/skills/nixopus-docs/SKILL.md
api/skills/node-deploy/SKILL.md
api/skills/onboarding/SKILL.md
api/skills/php-deploy/SKILL.md
api/skills/post-deploy-verification/SKILL.md
api/skills/pre-deploy-checklist/SKILL.md
api/skills/python-deploy/SKILL.md
api/skills/rollback-strategy/SKILL.md
api/skills/ruby-deploy/SKILL.md
api/skills/rust-deploy/SKILL.md
api/skills/self-heal/SKILL.md
api/skills/shell-deploy/SKILL.md
api/skills/static-deploy/SKILL.md

Metadata

Files
0
Version
cf05d97
Hash
7836726b
Indexed
2026-08-20 14:52

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 23:16
浙ICP备14020137号-1 $방문자$