Skip to main content
skill CX Codex

cx-cli — Claude Code skill: what it does, how to install

Teaches coding agents how to run Coralogix CLI commands, parse structured toon output, and check for tool and skill updates.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add coralogix/cx-cli --skill cx-cli -a claude-code
Open on GitHub

What cx-cli does

The skill configures the agent for working with the Coralogix cx CLI. Whenever commands run programmatically, it enforces machine-readable output with --output toon. To explore supported commands and their parameters without guessing, the assistant queries cx schema. If API requests against Coralogix data take time, the skill applies --http-timeout or the CX_HTTP_TIMEOUT environment variable.

After running commands, the agent scans stdout for trailing _meta.update JSON metadata or plain-text notices on stderr. When an update exists, the assistant answers the user prompt first, then leaves a single closing note. It must propose both the binary upgrade command and the skills refresh via npx skills add coralogix/cx-cli/skills.

Using --read-only prevents accidental state changes during inspection. For non-interactive scripts, the prompt rules specify passing --yes to skip console confirmations.

What it helps with

  • parse machine-readable Coralogix CLI results with --output toon
  • inspect available subcommands and flags using cx schema
  • handle binary updates alongside the cx-cli skill refresh
  • query observability data safely with --read-only
  • target multiple Coralogix profiles simultaneously using -p

Example prompts for the agent

  • Run cx schema to inspect available commands and flags.
  • Query Coralogix data with cx using --read-only and profiles prod and dev.
  • Run cx with --output toon and check if an update is available.

How to install cx-cli

1Skills CLI (Vercel)

npx skills add coralogix/cx-cli --skill cx-cli -a claude-code

2Manually: put the files in place

~/.claude/skills/cx-cli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cx-cli/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cx-cli

How to install cx-cli in Claude Code?

Run npx skills add coralogix/cx-cli --skill cx-cli -a claude-code in your terminal. The configuration writes to ~/.claude/skills/cx-cli/SKILL.md.

What does the cx-cli skill do?

It establishes runtime rules for running Coralogix CLI commands. The skill directs the model to parse toon JSON output, enforce read-only safety flags, and handle API deadlines.

How are cx CLI updates handled?

The model inspects _meta.update in the command output or stderr notices. If an update is detected, it offers both the binary upgrade and npx skills add coralogix/cx-cli/skills in a single closing line.

Source text

SKILL.md · Apache-2.0
---
name: cx-cli
description: This skill should be used whenever the user runs any cx command, uses the cx CLI, Coralogix CLI, or mentions cx in the context of Coralogix observability. This skill provides cross-cutting concerns like update notifications that apply to all cx commands.
metadata:
  version: "0.1.0"
---

# cx-cli

Cross-cutting behaviors for all cx CLI commands.

---

## Update Notifications

After running any cx command, check for update notices using the channels below (in priority order). If a newer version is available, finish answering the user's request first, then mention the update once at the end.

An update notice always has **two parts** — binary upgrade and skills refresh. Offer both commands; don't mention only the version number or only the binary upgrade.

### 1. Primary — toon mode (`-o toon`)

Commands with `--output toon` append a **standalone trailing JSON line** to stdout:

```json
{"_meta":{"update":{"binary":{"current":"0.1.7","latest":"0.2.0","command":"brew upgrade cx"},"skills":{"command":"npx skills add coralogix/cx-cli/skills","docs":"https://github.com/coralogix/cx-cli#install"}}}}
```

Scan the **last line** of stdout for `_meta.update`. When present:

- Binary upgrade: `_meta.update.binary.command` (current: `.binary.current`, latest: `.binary.latest`)
- Skills refresh: `_meta.update.skills.command`

### 2. Schema startup check

`cx schema` embeds the same `_meta.update` object at the **top level** of the schema JSON (not a trailing line). Check `_meta.update.binary` and `_meta.update.skills` the same way.

### 3. Fallback — human-readable text

Also scan stderr and stdout for plain-text notices. Binary and skills appear on one line, separated by `|`:

```
[cx update] v0.2.0 available (you have 0.1.9) | upgrade: brew upgrade cx | skills: npx skills add coralogix/cx-cli/skills
```

TTY text mode uses two lines with the same `upgrade: ... | skills: ...` pattern:

```
cx 0.2.0 is available (you have 0.1.9).
upgrade: brew upgrade cx | skills: npx skills add coralogix/cx-cli/skills
```

These appear on stderr for text/json mode after normal commands.

### Response template

> [Summarize the command result here]
>
> ---
> A newer cx version (X.Y.Z) is available — you have A.B.C. Would you like me to run `<binary upgrade command>` and `npx skills add coralogix/cx-cli/skills` to update?

Keep it to one brief closing line. Don't repeat on later commands in the same session.

---

## General cx CLI Guidelines

- Always use `--output toon` for machine-readable output when processing results programmatically
- Use `cx schema` to discover available commands and their flags
- Commands support multi-profile fan-out with `-p profile1 -p profile2`
- For commands that query or manage Coralogix data, use `--http-timeout <SECONDS>` or `CX_HTTP_TIMEOUT=<SECONDS>` to set an API request deadline.
- Use `--yes` to skip confirmation prompts in scripts
- Use `--read-only` for safe exploration without risk of modifications

© coralogix · Apache-2.0 · coralogix/cx-cli

Similar skills

All skills for DevOps and infrastructure →

From the same set16

cx-telemetry-querying A skill that routes telemetry questions to the right signal — metrics, logs, traces or RUM — and loads the reference files the agent needs before querying. CX Codex +1 4,700installs cx-search-dashboard Searches existing Coralogix dashboards and widgets by description or field path through the cx dashboards CLI. Useful when you want to check for duplicates before building a new dashboard. CX Codex +1 3,900installs coralogix-docs This skill searches and reads official Coralogix documentation through cx docs search and cx docs fetch. Handy when you need to know how the platform works or how to wire up an integration. CX Codex +1 3,700installs 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. CX Codex +1 3,600installs cx-cost-optimization Guides your agent through diagnosing Coralogix spend spikes, tuning TCO policies, and moving cold telemetry to archive storage. CX Codex +1 3,300installs cx-olly This skill wires the Coralogix Observability Agent Olly into your coding agent: ask about alerts, metrics and logs, then pull the artifacts it generates. CX Codex +1 3,300installs cx-data-pipeline A skill for configuring parsing, enrichment and Events2Metrics in Coralogix through the cx CLI. Useful when logs need to become fields and metrics. CX Codex +1 3,300installs cx-observability-setup Configures the Coralogix observability stack via the CLI: sets up saved views, notification connectors, alert routing, and webhooks for new services. CX Codex +1 3,400installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor