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.
npx skills add coralogix/cx-cli --skill cx-cli -a claude-codeWhat 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-cliskill 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-code2Manually: put the files in place
~/.claude/skills/cx-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cx-cli/
1Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a codex2Manually: put the files in place
.agents/skills/cx-cli/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a cursor2Manually: put the files in place
.cursor/skills/cx-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install coralogix/cx-cli cx-cli2Manually: put the files in place
.github/skills/cx-cli/SKILL.md1Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a gemini-cli2Platform CLI
gemini skills install https://github.com/coralogix/cx-cli --path skills/cx-cliManually: put the files in place
.devin/skills/cx-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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