openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Ag Model Usage

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trig...

开发与 DevOps

作者:Lian Junhong @t-atlas

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.0

统计:⭐ 0 · 287 · 2 current installs · 2 all-time installs

0

安装量(当前) 2

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:ag-model-usage

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill appears to do what it says (query Google Antigravity quota APIs) but it reads a sensitive local auth file (with OAuth tokens) without declaring that access, and there are small mismatches between the description and the implementation.

目的

Name/description target: per-model usage from Codex/Claude/CodexBar. Implementation: Python script that directly queries a Google 'antigravity' internal API (daily-cloudcode-pa.sandbox.googleapis.com) using an OAuth token found in a local auth-profiles.json. This is plausible for model-usage reporting, but the SKILL.md mentions CodexBar CLI/local cost JSON while code calls Google internal endpoints directly — a partial mismatch in how the data…

说明范围

The script reads ~/.openclaw/agents/main/agent/auth-profiles.json to extract OAuth access tokens and projectId and then issues network requests to an internal Google endpoint. The SKILL metadata did not declare this config-path access; reading that file gives the skill access to sensitive credentials. While the script uses the token only to call the quota endpoint (it does not itself transmit tokens elsewhere), the instruction surface includes…

安装机制

No install spec (instruction-only plus a small Python script) — lowest install risk. One practical inconsistency: the script imports 'requests' but the manifest only declared python3 as a required binary and did not declare Python package dependencies. No downloads or arbitrary code installs are present.

证书

Registry metadata declares no required env vars or config paths, yet the code accesses a local config file that contains OAuth access tokens. This is effectively requesting credential access without declaring it in requires.env or requires.config — a proportionality / transparency issue. The number of external credentials requested is small (a single OAuth token), which fits the task, but it should be declared explicitly.

持久

No 'always: true' or other elevated persistence. The skill is user-invocable and can be invoked autonomously (platform default), which is normal. The skill does not modify other skills or system-wide settings.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Ag Model Usage」。简介:Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Cla…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/ls18166407597-design/ag-model-usage/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: model-usage
description: Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
metadata:
  {
    "openclaw": {
      "emoji": "📊",
      "requires": { "bins": ["python3"] }
    }
  }
---

# model-usage Skill

查询并显示 AI 模型的使用配额、剩余百分比及下一次额度刷新时间。

## 功能
- **实时同步**:直接从 Google 内部 API 获取最真实的账户配额数据。
- **状态监控**:支持 Gemini、Claude 等核心模型的剩余额度展示。
- **时间预估**:精准显示每个模型下次刷新的具体时间点(已转换为本地时区)。

## 使用方法
直接对 AI 说:
- "查看模型用量"
- "我还有多少额度"
- "model-usage"

## 内部原理
该技能通过读取 `auth-profiles.json` 中的 OAuth 令牌,模拟官方 IDE 客户端的行为向 Google 发起配额查询请求。

## 适用范围
仅适用于使用 Google Antigravity (Cloud Code Assist) OAuth 方式登录的账户。