home / skills / contextware / skills / incident-management

incident-management skill

/skills/incident-management

This skill creates and lists incidents on the Incident Management MCP server, handling OAuth and credential storage for seamless ongoing use.

npx playbooks add skill contextware/skills --skill incident-management

Review the files below or copy the command above to add this skill to your agents.

Files (11)
SKILL.md
2.7 KB
---
name: incident-management
description: >-
  Skill for creating and listing incidents via the Incident Management MCP
  server. Includes OAuth handling.
metadata:
  createdAt: '2026-02-01T22:10:53.440Z'
  lastTestDate: '2026-02-02T08:59:40.005Z'
  passRate: 100
allowed-tools:
  - Incident-Management-v4_createIncident
  - Incident-Management-v4_listIncident
  - Incident-Management-v4_retrieveIncident
mcp-servers:
  - Incident-Management-v4
depends-on:
  - mcp-server-oauth
---
# Incident Management Skill

This skill allows you to create and list incidents using the Incident Management MCP server. It handles OAuth authentication if required.

## Authentication

1. The skill attempts to connect to the Incident Management MCP server.
2. If the server requires OAuth, the skill will present an authentication URL to the user, following the process described in the [mcp-server-oauth](skill:mcp-server-oauth) skill.
3. If the mcp-server-oauth skill is not available, the skill will attempt to handle the OAuth flow itself using the references for portable scripts allow you to implement MCP OAuth on any platform:

1. **Clone/copy the scripts** to your agent's execution environment
2. **Run `discover-oauth.js`** when connecting to a new MCP server
3. **Run `build-auth-url.js`** to generate the auth URL with PKCE
4. **Present the URL** to your user and wait for callback
5. **Run `exchange-token.js`** with the authorization code
6. **Store and inject** the token in subsequent MCP requests

This works with Claude Desktop, Cursor, custom agents, or any environment with Node.js 18+.

4. After successful authentication (confirmed by the user), the skill stores the necessary credentials for future use.

## Creating an Incident

1. Provide the required incident details:
    - `name` (string): The name of the incident.
    - `category` (string): The category of the incident.
    - `priority` (string): The priority of the incident (critical, high, medium, low).
    - `state` (string): The state of the incident (raised, updated, cleared).
    - `ackState` (string): The ack state of the incident (acknowledged, unacknowledged).
    - `occurTime` (string): The time at which the incident occurred (e.g., 2024-01-01T12:00:00Z).
    - `domain` (string): The domain of the incident.
    - `sourceObject` (array): An array containing at least one object with an `id` representing the source of the incident.
2. The skill creates a new incident using the provided details.

## Listing Incidents

1. The skill retrieves a list of existing incidents from the Incident Management MCP server.
2. The list of incidents is displayed to the user.

## Usage

To create an incident, provide the required incident details. To list incidents, simply request the list.

Overview

This skill provides incident creation and listing against an Incident Management MCP server, including built-in OAuth handling. It streamlines sending incident details and retrieving incident lists so agents can integrate with MCP-based incident systems. The skill is lightweight and designed for Node.js 18+ environments or agents that can present an auth URL to users.

How this skill works

On connect, the skill attempts to reach the configured MCP server and detects whether OAuth is required. If OAuth is needed it will generate or delegate an auth URL with PKCE and prompt the user to complete authentication, then exchange and store tokens for future requests. For incident operations the skill accepts structured incident fields, posts them to the MCP server to create incidents, and queries the server to return current incident lists.

When to use it

  • Create incidents from automated alerts, scripts, or agent interactions.
  • List active or historical incidents during troubleshooting or status reviews.
  • Integrate incident creation into chat workflows or orchestration pipelines.
  • When you need a portable MCP-compatible incident client with OAuth support.

Best practices

  • Provide complete incident fields: name, category, priority, state, ackState, occurTime, domain, and at least one sourceObject with id.
  • Use ISO 8601 timestamps (e.g., 2024-01-01T12:00:00Z) for occurTime to avoid timezone ambiguity.
  • Prefer PKCE-based OAuth flow: present the auth URL to the user and securely store tokens for later use.
  • Validate categories and priorities against your MCP server conventions before creating incidents.
  • Limit sensitive data in incident payloads and rotate stored tokens according to security policy.

Example use cases

  • An automated monitoring script posts a critical incident when a service check fails, including sourceObject id for the affected host.
  • A support agent uses the skill inside a chat agent to create an incident while talking with a customer, then lists incidents to confirm status.
  • A runbook automation lists incidents at start of maintenance to decide which issues to address first.
  • A developer prototypes MCP integration by running discover-oauth.js and build-auth-url.js locally, completing the auth flow, then creating test incidents.

FAQ

How does OAuth work with this skill?

The skill either delegates to an available OAuth helper or builds a PKCE auth URL, asks the user to authenticate, exchanges the code for tokens, and stores the token for subsequent requests.

What fields are mandatory to create an incident?

Required fields are name, category, priority, state, ackState, occurTime, domain, and at least one sourceObject entry containing an id.