cx-cli — скилл для Claude Code: что делает и как установить
Скилл учит агента работать с Coralogix CLI: парсить вывод утилиты cx, следить за обновлениями бинарника и безопасно запускать команды.
npx skills add coralogix/cx-cli --skill cx-cli -a claude-codeЧто делает cx-cli
Скилл инструктирует модель при вызове команд cx и работе с Coralogix CLI. Он задаёт правила разбора данных: для машинной обработки результатов агент переключается на формат --output toon, а список доступных команд и их флагов запрашивает через cx schema. При длинных запросах к API Coralogix задаётся ограничение по времени через флаг --http-timeout или переменную окружения CX_HTTP_TIMEOUT.
В ответах утилиты скилл отслеживает уведомления о новых версиях через объект _meta.update или сообщения в текстовом потоке. Уведомление формируется один раз за сессию и строго в конце ответа. При этом помощник предлагает сразу два действия: обновление бинарного файла и обновление набора скиллов через npx skills add coralogix/cx-cli/skills.
Для исследования инфраструктуры без риска что-то сломать скилл прямо предписывает запускать команды с флагом --read-only. А для автоматических сценариев агент применяет ключ --yes, отключая подтверждения в консоли.
Какие задачи решает
- вызывать команды Coralogix CLI с машиночитаемым выводом
--output toon - находить команды и флаги
cxчерез схемуcx schema - отслеживать обновления бинарника
cxи синхронизировать скиллы - выполнять безопасные запросы к телеметрии с флагом
--read-only - передавать запросы сразу в несколько профилей через ключ
-p
Примеры запросов агенту
- Проверь через cx schema, какие команды доступны в Coralogix CLI.
- Выполни cx с флагом --read-only для профилей prod и staging.
- Запусти cx с выводом --output toon и проверь, нет ли новой версии.
Как установить cx-cli
1Через Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a claude-code2Вручную: положить файлы
~/.claude/skills/cx-cli/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cx-cli/
1Через Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a codex2Вручную: положить файлы
.agents/skills/cx-cli/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a cursor2Вручную: положить файлы
.cursor/skills/cx-cli/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install coralogix/cx-cli cx-cli2Вручную: положить файлы
.github/skills/cx-cli/SKILL.md1Через Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a gemini-cli2Командой платформы
gemini skills install https://github.com/coralogix/cx-cli --path skills/cx-cliВручную: положить файлы
.devin/skills/cx-cli/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add coralogix/cx-cli --skill cx-cli -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о cx-cli
Как установить cx-cli в Claude Code?
Выполните в терминале команду npx skills add coralogix/cx-cli --skill cx-cli -a claude-code. Конфигурация сохранится по пути ~/.claude/skills/cx-cli/SKILL.md.
Что делает скилл cx-cli?
Он задаёт правила вызова утилиты cx от Coralogix. Скилл указывает модели запрашивать машинный вывод через --output toon, применять флаг --read-only и корректно передавать уведомления об обновлениях.
Как скилл сообщает об обновлениях Coralogix CLI?
Ассистент проверяет блок _meta.update в выводе команды или текстовые сообщения в stderr. Если найдена новая версия, агент в конце ответа предлагает обновить и бинарник, и скилл командой npx skills add coralogix/cx-cli/skills.
Исходный текст
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