← 返回 Skills 市场
cargo-ai

Cargo Billing

作者 Cargo · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
90
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install cargo-billing
功能描述
Pull usage metrics, check subscription status, view invoices, and manage credits using the Cargo CLI. Use when the user wants billing analytics, usage report...
使用说明 (SKILL.md)

Cargo CLI — Billing

Billing and credit management: pulling usage metrics, checking subscription status, viewing invoices, and managing credits.

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/usage-metrics.md for usage metric and subscription examples.

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.

Admin-only: every command in this skill requires a token with admin access on the workspace. Non-admin tokens return {"errorMessage":"forbidden"}.

Discover resources first

Usage metrics can be filtered and grouped by resource UUID. Discover them before querying.

cargo-ai orchestration play list            # all plays (name, workflowUuid)
cargo-ai orchestration tool list            # all tools (name, workflowUuid)
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 billing usage get-metrics --from \x3CYYYY-MM-DD> --to \x3CYYYY-MM-DD>
cargo-ai billing usage get-metrics --from \x3CYYYY-MM-DD> --to \x3CYYYY-MM-DD> --group-by workflow_uuid
cargo-ai billing subscription get
cargo-ai billing subscription get-invoices
cargo-ai billing subscription create-portal-session

Estimating cost before running a batch

Before triggering a large batch, estimate credit consumption to avoid unexpected charges.

Step 1 — Check current credit balance:

cargo-ai billing subscription get
# → subscriptionAvailableCreditsCount - subscriptionCreditsUsedCount = remaining credits

Step 2 — Estimate cost from a sample run:

Run the workflow on a single record first and measure credits consumed:

# Run on one record
cargo-ai orchestration run create --workflow-uuid \x3Cuuid> --data '{...}'
# → poll to completion

# Check credits used for that run
cargo-ai billing usage get-metrics \
  --from \x3Ctoday> --to \x3Ctoday> \
  --workflow-uuid \x3Cuuid>
# → .totalUsage = credits consumed today for this workflow

Step 3 — Project batch cost:

estimated_cost = credits_per_record × number_of_records

Compare against subscriptionAvailableCreditsCount - subscriptionCreditsUsedCount before proceeding.

Step 4 — Monitor during the batch:

# Check running costs mid-batch
cargo-ai billing usage get-metrics \
  --from \x3Cstart-date> --to \x3Ctoday> \
  --workflow-uuid \x3Cuuid>

Cost levers:

Action Effect
Use a cheaper model (e.g. gpt-4o-mini vs gpt-4o) Significant reduction for AI nodes
Add filter nodes early in the graph Skip ineligible records before expensive connector calls
Set fallbackOnFailure: false Stop the run early on failures instead of continuing to downstream nodes
Reduce maxSteps on agent nodes Limit how many tool calls an agent can make per record

Usage metrics

Pull credit and usage data for any time range, optionally filtered and grouped.

# Basic usage for a period
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date>

# Group by dimension
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --group-by workflow_uuid
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --group-by connector_uuid
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --group-by integration_slug
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --group-by model_uuid
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --group-by agent_uuid

# Filter by specific resource
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --workflow-uuid \x3Cuuid>
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --agent-uuid \x3Cuuid>
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --connector-uuid \x3Cuuid>
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --integration-slug \x3Cslug>

# Specify unit
cargo-ai billing usage get-metrics --from \x3Cstart-date> --to \x3Cend-date> --unit credits

--group-by values: workflow_uuid, connector_uuid, model_uuid, integration_slug, agent_uuid.

Available filters: --workflow-uuid, --model-uuid, --connector-uuid, --integration-slug, --slug, --agent-uuid. Combine with --group-by and --unit.

Subscription and credits

cargo-ai billing subscription get                    # current plan, credits used/available, period dates
cargo-ai billing subscription get-invoices            # invoice history (amounts in cents)
cargo-ai billing subscription get-credit-card         # card on file
cargo-ai billing subscription create-portal-session   # Stripe portal URL for self-service billing

Remaining credits = subscriptionAvailableCreditsCount - subscriptionCreditsUsedCount from subscription get.

Note: Invoice amounts are returned in cents. Divide by 100 for the dollar value.

Help

Every command supports --help:

cargo-ai billing usage get-metrics --help
cargo-ai billing subscription get --help
cargo-ai billing subscription get-invoices --help
安全使用建议
Install only if you trust Cargo and need an agent to use admin-level billing access. Prefer OAuth or a narrowly managed admin token, verify the workspace with cargo-ai whoami before use, and be careful with invoice, card, portal-session, and workflow-run commands because they expose billing information or may consume credits.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The commands match the stated purpose: usage metrics, subscription status, invoices, credit card-on-file lookup, and Stripe billing portal access for a Cargo workspace.
Instruction Scope
Instructions are explicit and mostly user-directed; one cost-estimation example runs a workflow on a single record, which is disclosed but should be treated as a real action that may consume credits or trigger workflow side effects.
Install Mechanism
Installation uses the declared npm Cargo CLI package @cargo-ai/cli@latest and there are no bundled executable scripts; using latest is mutable but disclosed.
Credentials
Admin OAuth/API credentials are sensitive, but they are clearly disclosed and proportionate for billing, invoice, credit, and portal operations.
Persistence & Privilege
No background workers, persistence mechanisms, privilege escalation, broad local indexing, or hidden credential collection were found in the skill artifacts.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cargo-billing
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cargo-billing 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated version to 1.0.1. - SKILL.md now references a shared prerequisites guide for install, login, and error conventions. - Clarified that all commands require an admin-level token; non-admin tokens result in a "forbidden" error. - Updated CLI installation instructions to use @cargo-ai/cli@latest. - No functional changes to commands or usage.
v1.0.0
Initial release of the cargo-billing skill. - Lets you pull usage metrics, analyze cost, and view credit consumption for your Cargo workspace using the Cargo CLI. - Check subscription status, invoice history, and manage billing or credits with simple CLI commands. - Includes quick cost estimation steps for batch runs to help avoid unexpected charges. - Supports detailed filtering and grouping of usage reports by workflow, agent, connector, or model. - Requires @cargo-ai/cli and a Cargo account with admin access.
元数据
Slug cargo-billing
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Cargo Billing 是什么?

Pull usage metrics, check subscription status, view invoices, and manage credits using the Cargo CLI. Use when the user wants billing analytics, usage report... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 90 次。

如何安装 Cargo Billing?

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

Cargo Billing 是免费的吗?

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

Cargo Billing 支持哪些平台?

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

谁开发了 Cargo Billing?

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

💬 留言讨论