← 返回 Skills 市场
in-liberty420

0G Compute

作者 in-liberty420 · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
943
总下载
0
收藏
2
当前安装
3
版本数
在 OpenClaw 中安装
/install 0g-compute
功能描述
Use cheap, TEE-verified AI models from the 0G Compute Network as OpenClaw providers. Discover available models and compare pricing vs OpenRouter, verify prov...
使用说明 (SKILL.md)

0G Compute Network

Interface with the 0G Compute Network — a decentralized AI inference marketplace with TEE-verified model integrity.

Prerequisites

  • 0g-compute-cli installed: npm i -g @0glabs/0g-serving-broker
    • Note: npm package name is @0glabs/0g-serving-broker (the old @0glabs/0g-compute-cli package name no longer resolves), but the binary command is still 0g-compute-cli.
  • Wallet funded with 0G tokens
  • Logged in: avoid passing key on the command line when possible (it can be visible in shell history/process list). Prefer reading from a protected prompt/env:
    • read -s OG_PK; 0g-compute-cli login --private-key "$OG_PK"; unset OG_PK
  • Network configured: 0g-compute-cli setup-network

Core Workflows

1. Discover Models

# List all providers with models, prices, verifiability
0g-compute-cli inference list-providers

# Detailed view with health/uptime metrics
0g-compute-cli inference list-providers-detail

# Include providers without valid TEE signer
0g-compute-cli inference list-providers --include-invalid

Filter output by model name, price, health status, and TeeML support (models running in Trusted Execution Environment).

2. Verify Provider Integrity

Always verify before trusting a new provider. TEE verification ensures the model runs in a secure enclave with hardware-attested integrity.

# Full TEE attestation check
0g-compute-cli inference verify --provider \x3Caddress>

# Download raw attestation data
0g-compute-cli inference download-report --provider \x3Caddress> --output report.json

The verify command checks:

  • TEE signer address matches contract
  • Docker Compose hash integrity
  • DStack TEE (Intel TDX) attestation

3. Wallet & Balance

# Account overview
0g-compute-cli get-account

# Per-provider sub-account balance
0g-compute-cli get-sub-account --provider \x3Caddress> --service inference

# Fund operations
0g-compute-cli deposit --amount \x3C0G>                          # To main account
0g-compute-cli transfer-fund --provider \x3Caddr> --amount \x3C0G> --service inference  # To sub-account
0g-compute-cli retrieve-fund --service inference              # From sub-accounts
0g-compute-cli refund --amount \x3C0G>                           # Withdraw to wallet

Important: Inference calls fail if sub-account balance is depleted. Monitor balances regularly.

4. Configure OpenClaw Provider

Get API key from a verified provider (interactive — prompts for expiration):

0g-compute-cli inference get-secret --provider \x3Caddress>

Add to openclaw.json:

"providers": {
  "0g-\x3Cmodel-name>": {
    "baseUrl": "\x3Cprovider-url>/v1/proxy",
    "apiKey": "\x3Csecret>",
    "api": "openai-completions",
    "models": [{ "id": "\x3Cmodel-id>", "name": "\x3Cdisplay-name>" }]
  }
}

Register in agents.defaults.models with an alias. Set cost: 0 since billing is on-chain.

See references/openclaw-config.md for complete setup guide.

5. Price Comparison (0G vs OpenRouter)

Compare 0G pricing against OpenRouter for the same models:

scripts/0g-price-compare.sh

No API keys needed — uses public endpoints:

  • CoinGecko for 0G token → USD price
  • OpenRouter /api/v1/models for model pricing
  • 0G CLI for provider pricing

Shows side-by-side USD/1M tokens with savings percentage. Set OG_TOKEN_PRICE_USD env var to override CoinGecko price.

6. Status Check

# Login status & wallet
0g-compute-cli status

# Current network (mainnet/testnet)
0g-compute-cli show-network

Safety Guidelines

  • Always run inference verify on new providers before use
  • Check provider health/uptime before relying on them
  • Monitor sub-account balances — depleted funds cause inference failures
  • Private key stored in ~/.0g-compute-cli/config.json — never expose this file

Reference Documentation

安全使用建议
This skill appears to do what it says — it wraps the 0g-compute-cli to discover/verify providers, manage on-chain balances, and add providers to OpenClaw. Before installing: 1) Verify the npm package (@0glabs/0g-serving-broker) and its publisher (check the package page, repository, and versions) because npm installs run code on your machine. 2) Protect your wallet private key: prefer ephemeral keys or hardware wallets; if you use a key file or OG_PK, ensure ~/.0g-compute-cli/config.json is secured (it may store the private key). 3) Be cautious when copying provider secrets into openclaw.json — store secrets securely and avoid committing them to source control. 4) The included price-compare script requires network access and python3; review it before running and consider running in an isolated environment if you don’t trust the package source. 5) Always run the documented TEE verification on providers before sending funds or inference traffic.
功能分析
Type: OpenClaw Skill Name: 0g-compute Version: 1.0.2 The 0g-compute skill bundle provides a legitimate interface for interacting with the 0G Compute Network, a decentralized AI inference marketplace. It includes tools for model discovery, TEE (Trusted Execution Environment) hardware attestation verification, wallet management, and a price comparison script (scripts/0g-price-compare.sh) that fetches data from CoinGecko and OpenRouter. The skill demonstrates security awareness by advising against passing private keys via command-line arguments and emphasizing the importance of TEE verification for provider integrity. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
Name/description match the implementation: it requires the 0g-compute-cli binary (provided by the declared npm package) and the instructions focus on discovering providers, TEE verification, wallet operations, and configuring OpenClaw. The included price-compare script and references align with the stated goal.
Instruction Scope
SKILL.md instructs running the 0g-compute-cli commands (list/verify/get-secret, wallet operations) and using the provided script to compare prices. These instructions do require handling private keys and provider secrets (e.g., example uses read -s OG_PK and notes private key storage at ~/.0g-compute-cli/config.json). This is expected for a wallet/CLI integration but is sensitive — the skill does not instruct any unrelated file-system or credential harvesting.
Install Mechanism
Install uses an npm package (@0glabs/0g-serving-broker) to create the 0g-compute-cli binary, which is appropriate for a CLI-based integration. npm installs are a moderate-trust operation — the install mechanism is expected but you should verify the package and publisher before installing.
Credentials
The skill declares no required env vars. The runtime docs show an optional pattern for providing a private key (OG_PK) and explain that keys are stored in ~/.0g-compute-cli/config.json and that provider API secrets will be placed in openclaw.json. The requested/used credentials are proportional to the functionality but are highly sensitive and must be protected.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. Its lifecycle (installing a CLI and editing openclaw.json) is normal and scoped to this integration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 0g-compute
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /0g-compute 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Security hardening docs: add structured install metadata (requires/install), and safer login guidance to avoid exposing private key in history/process list.
v1.0.1
Fix install docs: npm package is @0glabs/0g-serving-broker (binary remains 0g-compute-cli). Add install clarification to CLI reference.
v1.0.0
Initial release: model discovery, TEE verification, wallet management, OpenClaw provider config, price comparison vs OpenRouter
元数据
Slug 0g-compute
版本 1.0.2
许可证
累计安装 2
当前安装数 2
历史版本数 3
常见问题

0G Compute 是什么?

Use cheap, TEE-verified AI models from the 0G Compute Network as OpenClaw providers. Discover available models and compare pricing vs OpenRouter, verify prov... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 943 次。

如何安装 0G Compute?

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

0G Compute 是免费的吗?

是的,0G Compute 完全免费(开源免费),可自由下载、安装和使用。

0G Compute 支持哪些平台?

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

谁开发了 0G Compute?

由 in-liberty420(@in-liberty420)开发并维护,当前版本 v1.0.2。

💬 留言讨论