coralogix/cx-cli

cx-coding-agents

Use this skill when the user asks about AI Center Coding Agents data, wants to reproduce or extend the Coding Agents dashboards, or asks questions about usage, cost, tokens, sessions, tools, code impact, users, models, spans, or logs for Claude Code, Codex,…

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/coralogix/cx-cli --skill cx-coding-agents

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Coding Agents Skill

Use this skill as the entry point for any investigation or data question about AI Center Coding Agents. It identifies which data source each agent uses and tells you which reference files to load before querying.

Supported Agents

AgentData TypeSource Identifier
Claude CodeMetricsclaude_code_* metric family
Claude Code (session text)Logssource ai_sessions_claude
CodexLogsservice.name == 'codex_cli_rs' or 'codex-app-server'
Codex (latency)Spans$l.serviceName == 'codex_cli_rs' or 'codex-app-server'
CursorSpans$l.serviceName == 'cursor-agent'
Gemini CLIMetricsgemini_cli_* metric family
Copilot CLI (direct OTel)Spans$l.serviceName == 'github-copilot' or tags['otel.scope.name'] == 'github.copilot'
GitHub Copilot CollectorMetricsgithub_copilot_* metric family

Loading References

Load the agent reference first, then the shared query-language files it depends on:

AgentAgent ReferenceShared References
Claude Code (metrics)references/claude-code.mdreferences/promql-guidelines.md + references/metrics-querying.md
Claude Code (sessions)references/claude-code.mdreferences/dataprime-reference.md + references/logs-querying.md
Codexreferences/codex.mdreferences/dataprime-reference.md + references/logs-querying.md + references/spans-querying.md
Cursorreferences/cursor.mdreferences/dataprime-reference.md + references/spans-querying.md
Gemini CLIreferences/gemini-cli.mdreferences/promql-guidelines.md + references/metrics-querying.md
Copilot CLI (direct OTel)references/copilot-cli.mdreferences/dataprime-reference.md + references/spans-querying.md
GitHub Copilot Collectorreferences/copilot-cli.mdreferences/promql-guidelines.md + references/metrics-querying.md
Cross-agent comparisonAll agent referencesAll shared references

Safety

All query commands (cx metrics, cx logs, cx spans, cx dataprime) are read-only. They never modify data and can be run freely without --yes.


CLI Commands

CommandPurposeWhen to Use
cx metrics search --name '<pattern>'Find metrics by nameDiscover available claude_code_*, gemini_cli_*, github_copilot_* metrics
cx metrics query '<expr>'Instant PromQL queryPoint-in-time metric snapshot
cx metrics query-range '<expr>'Range PromQL query (time series)Claude Code, Gemini CLI, GitHub Copilot Collector trends
cx logs '<dataprime_query>'Log queryClaude Code session text, Codex logs
cx spans '<dataprime_query>'Span queryCursor, Codex latency, Copilot CLI direct OTel
cx dataprime query '<query>'Raw DataPrime queryWhen you need an explicit source logs or source spans in the query

Output format: append -o toon to any command when passing results to an agent or further processing.

Multi-profile: use -p <profile> (repeatable) to fan out across profiles simultaneously.


First Response

Identify the requested agent and analysis goal. If any required scope is missing, ask before querying:

  • Agent: Claude Code, Codex, Cursor, Gemini CLI, or Copilot CLI.
  • Time range.
  • Optional filters: application, subsystem, user, model, session, repository.
  • Output shape: quick answer, table, trend, top-N ranking, investigation notes, or query only.
If the user says "GitHub Copilot Codex", clarify whether they mean Codex or Copilot CLI. AI Center has separate Codex and Copilot CLI dashboards.

Use the same data source as the corresponding dashboard whenever possible:

  • Claude Code metrics: PromQL over claude_code_* metrics.
  • Claude Code session text: DataPrime over ai_sessions_claude logs.
  • Codex: DataPrime over Codex logs for tokens, sessions, models, users, and tools; spans only for run_turn latency.
  • Cursor: DataPrime over Cursor spans. Cursor reports prompt length and file edits, not provider token counts.
  • Gemini CLI: PromQL over gemini_cli_* metrics.
  • Copilot CLI direct OTel: DataPrime over Copilot spans.
  • GitHub Copilot Collector: PromQL over github_copilot_* org/user/billing metrics when that collector data is present.

Time and Filters

PromQL (Claude Code, Gemini CLI, GitHub Copilot Collector)

Use increase(metric[<range>]) for counters over the selected window. Common label filter pattern:

promql
{user_email="<user>",model="<model>",cx_application_name="<app>",cx_subsystem_name="<subsystem>"}
  • Use sum by (...), count by (...), or topk(N, ...) for grouping.
  • For chart trends, use an interval window based on the selected range rather than the full range.

DataPrime (Codex, Cursor, Copilot CLI direct, Claude Code sessions)

  • Add | filter ... clauses for user, model, application, subsystem, session, and operation.
  • Prefer groupby ... aggregate ... for dashboard-like tables.
  • For spans: app/subsystem labels are $l.applicationName and $l.subsystemName (mixed case).
  • For logs: app/subsystem labels are $l.applicationname and $l.subsystemname (lowercase).

App/subsystem filter pattern:

text
| filter $l.applicationName == '<application>' && $l.subsystemName == '<subsystem>'

Cross-Agent Questions

When comparing agents:

  • Normalize units before comparing: cost in USD, tokens as input/output/total, runtime in milliseconds, sessions as distinct conversations.
  • State which signals are not equivalent. Cursor prompt length is not a provider token count. Direct Copilot CLI users are pseudonymous IDs (enduser.pseudo.id), not email addresses. GitHub Copilot Collector users may be logins, names, or emails.
  • Prefer per-agent sections over a single merged table when dimensions differ.
  • For "which agent is most used": compare sessions and users first, then tokens or span counts with caveats.
  • For "which agent costs the most": Claude Code has first-class USD metrics. Copilot direct spans expose github.copilot.cost. Collector billing metrics expose net/gross/discount amounts by organization/SKU. Do not merge Copilot span cost and collector billing without explaining the source and unit difference.

Answer Style

Always include:

  • The agent and data source used.
  • The query or a compact query excerpt.
  • The time range and filters applied.
  • A plain-language interpretation of the result.
  • Caveats about empty data, approximate counts, pseudonymous users, missing labels, or non-comparable metrics.

Do not invent fields not listed in the agent reference files. If the user asks for data an agent does not emit, say what is available and propose the nearest supported query.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills
coralogix
社区

coralogix-docs

Search and read official Coralogix platform documentation using cx docs search and cx docs fetch. Use when the user asks how Coralogix features work, how to configure or use the UI, set up integrations (OpenTelemetry, agents, collectors, webhooks), manage API keys, explore spans/traces/logs in the product, configure alerts/SLOs/dashboards, or needs authoritative product docs — not live tenant telemetry.

安装量
3
GitHub Stars
124
最近更新
10月25日
coralogix
社区

cx-cli

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.

安装量
3
GitHub Stars
124
最近更新
10月25日
coralogix
社区

cx-infra

Query Coralogix infrastructure resources with the cx infra CLI: resource types, filterable attributes, resource lists, health, raw data and configuration changes. Use when the user asks to "show resource types", "list infrastructure resources", "what resources of this kind are monitored", "is this resource healthy", "why is this resource critical", "which health policy is failing", "when did this resource go critical", "get raw resource data", "find resources by name", "filter resources by servi

安装量
3
GitHub Stars
124
最近更新
10月25日
coralogix
社区

cx-search-dashboard

This skill should be used when the user asks to "find a dashboard", "search dashboards", "does a dashboard exist for X", "find widgets that query Y", "which dashboards use this field", "find a dashboard about errors", "look up dashboards by description", "search for existing monitoring dashboards", "find widgets that reference a field", or wants to discover existing Coralogix dashboards or widgets using natural-language or field-based search.

安装量
3
GitHub Stars
124
最近更新
10月25日