← 返回 Skills 市场
cargo-ai

Cargo Analytics

作者 Cargo · GitHub ↗ · v1.4.1 · MIT-0
cross-platform ⚠ suspicious
94
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install cargo-analytics
功能描述
Download workflow run results, export segment data, and monitor run metrics using the Cargo CLI. Use when the user wants run metrics, error rates, data expor...
使用说明 (SKILL.md)

Cargo CLI — Analytics

Measurement and export: monitoring run metrics, downloading run and batch results, and exporting segment data.

See references/response-shapes.md for full JSON response structures. See references/troubleshooting.md for common errors and how to fix them. See references/examples/run-analytics.md for run metrics and error monitoring. See references/examples/exports.md for data export and download examples. For billing, usage metrics, and subscription: use the cargo-billing skill.

Prerequisites

See ../cargo/references/prerequisites.md for install, login (--oauth / --token), JSON output conventions, and error shapes. Verify the session with cargo-ai whoami before running any of the commands below.

Discover resources first

Most analytics commands require UUIDs. Discover them before querying.

cargo-ai orchestration play list            # all plays (name, workflowUuid)
cargo-ai orchestration tool list            # all tools (name, workflowUuid)
cargo-ai orchestration workflow list        # all workflows (uuid only — no name)
cargo-ai ai agent list                     # all agents (uuid, name)
cargo-ai connection connector list          # all connectors (uuid, name, integrationSlug)
cargo-ai storage model list                # all models (uuid, name, slug)

Quick reference

cargo-ai orchestration run get-metrics --workflow-uuid \x3Cuuid>
cargo-ai orchestration run download --workflow-uuid \x3Cuuid> --is-finished
cargo-ai orchestration run count --workflow-uuid \x3Cuuid> --statuses error
cargo-ai orchestration query execute "SELECT status, count() FROM runs GROUP BY status"
cargo-ai segmentation segment download --model-uuid \x3Cuuid> --filter '{"conjonction":"and","groups":[]}'

Picking the right command:

  • run get-metrics / run count — workflow-scoped, predefined aggregations. Best when you already have a workflowUuid.
  • orchestration query execute — ad-hoc SQL across the entire workspace (runs, batches, spans, records). Best for cross-workflow analytics, per-node breakdowns, and time-series.
  • run download / run download-outputs — per-record output retrieval.
  • segment download / storage query execute — storage data (Companies, Contacts, …).

Workflow run metrics

Aggregated metrics for workflow runs (success/error rates, credits per node).

# Metrics for a workflow
cargo-ai orchestration run get-metrics --workflow-uuid \x3Cuuid>

# Scoped to a release, batch, or date range
cargo-ai orchestration run get-metrics --workflow-uuid \x3Cuuid> --release-uuid \x3Cuuid>
cargo-ai orchestration run get-metrics --workflow-uuid \x3Cuuid> --batch-uuid \x3Cuuid>
cargo-ai orchestration run get-metrics --workflow-uuid \x3Cuuid> \
  --created-after \x3Cstart-date> --created-before \x3Cend-date>

Run count

Count runs matching specific criteria — useful for monitoring.

cargo-ai orchestration run count --workflow-uuid \x3Cuuid> --statuses error
cargo-ai orchestration run count --workflow-uuid \x3Cuuid> --is-finished \
  --created-after \x3Cstart-date> --created-before \x3Cend-date>
cargo-ai orchestration run count --workflow-uuid \x3Cuuid> --batch-uuid \x3Cuuid>

Supports: --statuses, --batch-uuid, --release-uuid, --is-finished, --created-after, --created-before, --record-id, --record-title.

For cross-workflow analytics or shapes that run count doesn't expose (per-node failure breakdowns, p95 durations, error rate over time), use orchestration query execute — see the Ad-hoc execution analytics section.

Ad-hoc execution analytics (orchestration query)

Run SQL against orchestration runtime tables — runs, batches, spans, records — for analytics that the canned metrics commands don't cover. Tables are referenced without a schema prefix; workspace scoping is automatic. See cargo-orchestration/references/examples/queries.md for schemas and limits.

# Error rate across the workspace in the last day
cargo-ai orchestration query execute \
  "SELECT countIf(status='error') / count() AS error_rate FROM runs WHERE created_at > now() - INTERVAL 1 DAY"

# Failed runs per workflow this week
cargo-ai orchestration query execute \
  "SELECT workflow_uuid, count() AS errors FROM runs WHERE status='error' AND created_at > now() - INTERVAL 7 DAY GROUP BY workflow_uuid ORDER BY errors DESC"

# Per-node failure counts (last 24h)
cargo-ai orchestration query execute \
  "SELECT node_slug, count() AS failures FROM spans WHERE execution_status='error' AND execution_started_at > now() - INTERVAL 1 DAY GROUP BY node_slug ORDER BY failures DESC"

# Credit spend by workflow this month
cargo-ai orchestration query execute \
  "SELECT workflow_uuid, sum(credits_used_count) AS credits FROM batches WHERE created_at >= toStartOfMonth(now()) GROUP BY workflow_uuid ORDER BY credits DESC"

Read-only and capped: 30s execution time, 10 000 result rows, 10 000 000 rows scanned. Narrow with a created_at/execution_started_at predicate to stay under the row-scan cap.

Downloading run results

Two distinct commands — pick the right one for the job.

run download — full run records (metadata + per-node runContext)

Returns each run as a JSON object with status, timing, executions, and runContext.\x3CnodeSlug> containing per-node outputs. Best for debugging or when you need the full execution history.

# All finished runs
cargo-ai orchestration run download --workflow-uuid \x3Cuuid> --is-finished

# Date range
cargo-ai orchestration run download --workflow-uuid \x3Cuuid> \
  --created-after \x3Cstart-date> --created-before \x3Cend-date>

# Specific statuses
cargo-ai orchestration run download --workflow-uuid \x3Cuuid> --statuses success,error

# From a specific batch
cargo-ai orchestration run download --workflow-uuid \x3Cuuid> --batch-uuid \x3Cuuid>

run download-outputs — output of a specific node (CSV/JSON via signed URL)

This is the canonical way to get action results out of the platform. Maps to API POST /v1/orchestration/runs/download-outputs. Returns {"url": "..."} — a signed URL to a CSV (default) or JSON file containing only the output node's data with input/output context. Faster and cheaper than downloading whole run records when you only need the result.

# Required: --workflow-uuid + --output-node-slug
cargo-ai orchestration run download-outputs \
  --workflow-uuid \x3Cuuid> \
  --output-node-slug \x3Cslug> \
  --format json \
  --is-finished

# Filter by batch + status
cargo-ai orchestration run download-outputs \
  --workflow-uuid \x3Cuuid> \
  --output-node-slug \x3Cslug> \
  --batch-uuid \x3Cuuid> \
  --statuses finished

To find the output-node-slug: cargo-ai orchestration release get \x3Crelease-uuid> → look at nodes[].slug. The terminal output node is typically named output or end.

Downloading batch results

cargo-ai orchestration batch download --uuid \x3Cbatch-uuid> --output-node-slug \x3Cnode-slug>

To find the output-node-slug: run cargo-ai orchestration release get \x3Crelease-uuid> (get the release UUID from the batch) and look at nodes[].slug.

Handling partial batch failures

A batch with status: "success" can still contain individual run failures. Always inspect the batch for errors before treating results as complete.

Step 1 — Check the batch summary:

cargo-ai orchestration batch get \x3Cbatch-uuid>
# → .runsCount          = total records submitted
# → .executedRunsCount  = records that reached a terminal state (success or error)
# → .failedRunsCount    = records that errored

Step 2 — Count errors for the batch:

cargo-ai orchestration run count \
  --workflow-uuid \x3Cuuid> \
  --batch-uuid \x3Cbatch-uuid> \
  --statuses error

Step 3 — Download failed runs to inspect root causes:

cargo-ai orchestration run download \
  --workflow-uuid \x3Cuuid> \
  --batch-uuid \x3Cbatch-uuid> \
  --statuses error

Step 4 — Re-run only the failed records:

After fixing the underlying issue (connector credentials, bad input data, rate limits):

# Extract record IDs from the failed run download, then:
cargo-ai orchestration batch create \
  --workflow-uuid \x3Cuuid> \
  --data '{"kind":"recordIds","recordIds":["id1","id2","id3"]}'

Filtering by node output slug:

To download only a specific node's output from a batch (e.g. just the enrichment node, not the full run):

# 1. Get the release UUID from the batch
cargo-ai orchestration batch get \x3Cbatch-uuid>
# → .releaseUuid

# 2. Find the node slug
cargo-ai orchestration release get \x3Crelease-uuid>
# → nodes[].slug

# 3. Download that node's output
cargo-ai orchestration batch download \
  --uuid \x3Cbatch-uuid> \
  --output-node-slug \x3Cnode-slug>

Segment data export

Filter JSON uses conjonction (not conjunction) — this is intentional. See the cargo-orchestration skill's references/filter-syntax.md for the full filter syntax.

# Full export (all records)
cargo-ai segmentation segment download \
  --model-uuid \x3Cuuid> \
  --filter '{"conjonction":"and","groups":[]}'

# With sorting and limit
cargo-ai segmentation segment download \
  --model-uuid \x3Cuuid> \
  --filter '{"conjonction":"and","groups":[]}' \
  --sort '[{"columnSlug":"created_at","kind":"desc"}]' \
  --limit 1000

IMPORTANT: segment download requires --model-uuid, not --segment-uuid. Get the modelUuid from segment list.

For live paginated queries with enrichment, use segmentation segment fetch from the cargo-orchestration skill.

Help

Every command supports --help:

cargo-ai billing usage get-metrics --help
cargo-ai orchestration run download --help
cargo-ai segmentation segment download --help
安全使用建议
Install only for users who are authorized to access and export Cargo workspace data. Treat downloaded files and signed URLs as sensitive, scope exports with workflow/date/status/model filters, and require explicit approval before using the documented failed-record re-run command because it can execute workflows and create side effects.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is analytics, downloading results, and exporting segment data, but the instructions also document `cargo-ai orchestration batch create` to re-run failed records; that is a state-changing execution action that can consume credits or trigger workflow effects.
Instruction Scope
Download/export commands are clearly part of the purpose, but broad full-run, full-segment, signed-URL, and email-filtered exports are presented with limited data-handling guardrails; the re-run step lacks an explicit confirmation or side-effect warning.
Install Mechanism
Installation is disclosed as a Node package install of `@cargo-ai/cli@latest` with the `cargo-ai` binary; using `latest` is transparent but less reproducible than a pinned CLI version.
Credentials
The skill requires a Cargo account and OAuth/API token access, which is proportionate for querying and exporting Cargo workspace data but means commands may access sensitive business or personal records.
Persistence & Privilege
No background workers, hidden persistence, privilege escalation, local indexing, or destructive local file operations were found in the markdown-only artifacts; credential persistence is limited to the referenced Cargo CLI login flow.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cargo-analytics
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cargo-analytics 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.4.1
cargo-analytics 1.4.1 - Updated install guidance to reference a shared prerequisites document, improving clarity. - Changed the CLI install metadata to always fetch the latest version of @cargo-ai/cli. - Minor documentation refinements for clarity and accuracy (no behavioral changes to skill functionality).
v1.4.0
cargo-analytics v1.4.0 - Clarified use cases: use this skill for run metrics, error rates, data export, or result downloads for Cargo workspaces; use cargo-billing for billing/credit usage. - Improved quick reference and command guidance for workflow metrics, monitoring, exports, and SQL analytics. - Added detailed usage notes for `run get-metrics`, `run count`, and `query execute` to distinguish their purposes. - Clarified options and filtering for downloading run and batch results using the Cargo CLI. - Expanded documentation on prerequisites, auth setup, and key commands for segment and storage data export.
元数据
Slug cargo-analytics
版本 1.4.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Cargo Analytics 是什么?

Download workflow run results, export segment data, and monitor run metrics using the Cargo CLI. Use when the user wants run metrics, error rates, data expor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。

如何安装 Cargo Analytics?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cargo-analytics」即可一键安装,无需额外配置。

Cargo Analytics 是免费的吗?

是的,Cargo Analytics 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cargo Analytics 支持哪些平台?

Cargo Analytics 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cargo Analytics?

由 Cargo(@cargo-ai)开发并维护,当前版本 v1.4.1。

💬 留言讨论