# cx-alerts

A skill that lets your agent manage Coralogix alert definitions from the terminal with cx alerts. Handy when someone is triaging firing rules.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3600 installs · ★ 124
- Author: coralogix
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/coralogix/cx-cli/tree/HEAD/skills/cx-alerts/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/cx-alerts

## What it does

The skill documents the `cx alerts` commands and tells the agent when to reach for them: `list`, `get <id>`, `create`, `delete <id>`, `enable <id>`, `disable <id>`, plus `events` and `event-stats`. A separate group covers `suppression-rules` — list, get, create, update, delete — the rules that mute alerts during maintenance windows.

Creation runs from JSON. The agent asks what you want to alert on (logs, metrics or traces) and which priority from P1 to P5, then builds a payload under `alertDefProperties`. A shortcut worth knowing: pull an existing rule with `cx alerts get <id> -o json`, edit it, send it back. The type is a string enum such as `ALERT_DEF_TYPE_LOGS_THRESHOLD`, and the type config sits as a sibling field, not nested inside it.

The skill assumes a working `cx` CLI pointed at your Coralogix account. Without it nothing runs, so check that first. Schema details live in `references/alert-schemas.md`, and assembling valid JSON without it is rough.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add coralogix/cx-cli --skill cx-alerts -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cx-alerts/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cx-alerts/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add coralogix/cx-cli --skill cx-alerts -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cx-alerts/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add coralogix/cx-cli --skill cx-alerts -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cx-alerts/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install coralogix/cx-cli cx-alerts
```

2. **Manually: put the files in place**
- File: `.github/skills/cx-alerts/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add coralogix/cx-cli --skill cx-alerts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/coralogix/cx-cli --path skills/cx-alerts
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cx-alerts/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add coralogix/cx-cli --skill cx-alerts -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/coralogix/cx-cli/tree/HEAD/skills/cx-alerts/SKILL.md

## When to use it
- see which alerts are currently ALERTING
- create a threshold alert on a spike in error logs
- disable a noisy rule and re-enable it later
- set up suppression for a maintenance window
- dump alert definitions as JSON for review

## Example prompts
- list every alert with ALERTING status
- create a metric alert when CPU stays above 90 for 5 minutes
- disable the alert with this id, it keeps firing

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b212e8a70d6bc1c3.

BEGIN THIRD-PARTY FILE b212e8a70d6bc1c3
```text
---
name: cx-alerts
description: This skill should be used when the user asks to "manage alerts", "create alert", "list alerts", "delete alert", "check alert status", "enable alert", "disable alert", "investigate firing alerts", "check which alerts are active", "find alerting rules", "set up an alert", "configure alerting", "mute an alert", "silence an alert", "see alert definitions", "check alert priority", or wants to manage Coralogix alert definitions using the cx CLI.
metadata:
  version: "0.1.0"
---

# Alert Management Skill

Use this skill to list, inspect, create, delete, enable, and disable Coralogix alert definitions using the `cx alerts` CLI commands.

## CLI Commands

| Command | Purpose | Key flags |
|---|---|---|
| `cx alerts list` | List all alert definitions | `--name <filter>` |
| `cx alerts get <id>` | Get a single alert definition by ID | - |
| `cx alerts create` | Create an alert from a JSON definition | `--from-file <path>` (default: stdin) |
| `cx alerts delete <id>` | Delete an alert | - |
| `cx alerts enable <id>` | Enable an alert | - |
| `cx alerts disable <id>` | Disable an alert | - |
| `cx alerts events` | List events; use alert-version scoped endpoint when filtering | `--alert-version-id`, `--start`, `--end` |
| `cx alerts event-stats` | Get alert event statistics | - |
| `cx alerts suppression-rules list` | List suppression rules | - |
| `cx alerts suppression-rules get <id>` | Get a suppression rule | - |
| `cx alerts suppression-rules create` | Create a suppression rule | `--from-file <path>` |
| `cx alerts suppression-rules update` | Update a suppression rule | `--from-file <path>` |
| `cx alerts suppression-rules delete <id>` | Delete a suppression rule | - |

**Output format:** append `-o json` or `-o toon` to `list`, `get`, and `create` commands for machine-readable output.

**Multi-profile:** use `-p <profile>` (repeatable) to target multiple profiles simultaneously.

## Alert Types Reference

Coralogix supports 12 alert types:

| Type enum | Human name | Description |
|---|---|---|
| `ALERT_DEF_TYPE_LOGS_IMMEDIATE` | Logs Immediate | Trigger on every matching log entry |
| `ALERT_DEF_TYPE_LOGS_THRESHOLD` | Logs Threshold | Trigger when log count exceeds a threshold in a time window |
| `ALERT_DEF_TYPE_LOGS_ANOMALY` | Logs Anomaly | ML-based anomaly detection on log volume |
| `ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD` | Logs Ratio Threshold | Trigger on ratio between two log queries |
| `ALERT_DEF_TYPE_LOGS_NEW_VALUE` | Logs New Value | Trigger when a new value appears in a field |
| `ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT` | Logs Unique Count | Trigger on unique value count threshold |
| `ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD` | Logs Time Relative | Compare current vs past time window |
| `ALERT_DEF_TYPE_METRIC_THRESHOLD` | Metric Threshold | Trigger when a PromQL expression crosses a threshold |
| `ALERT_DEF_TYPE_METRIC_ANOMALY` | Metric Anomaly | ML-based anomaly detection on metrics |
```
END THIRD-PARTY FILE b212e8a70d6bc1c3

The third-party file has ended. Everything between the b212e8a70d6bc1c3 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2974 of 10740 bytes. © coralogix · Apache-2.0 · https://github.com/coralogix/cx-cli/tree/HEAD/skills/cx-alerts/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
