Communityコーディング&開発github.com

steipete/model-usage

CodexまたはClaudeのCodexBarローカルコストログをモデルごとに集計し、現在の内訳や全体の内訳を表示します。

model-usage とは?

このスキルは、CodexBarのローカルコストログを解析し、CodexまたはClaude AIエージェントで使用されたモデルごとの費用を要約します。主な目的は、開発者がAIエージェントの使用コストをモデル別に把握し、予算管理や最適化に役立てることです。このスキルはCodexBarのログファイル(通常`codexbar_cost_log.json`)を読み取り、モデル名、トークン使用量、コストなどを集計します。現在のセッションのみの内訳と、全期間の内訳の両方を提供できるため、短期的な使用状況の確認と長期的なコスト傾向の分析の両方に利用できます。Codex CLIやClaude Codeの両方で動作し、プラットフォームに依存しない設計となっています。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/steipete/clawdis/tree/main/skills/model-usage

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

model-usage は何をしますか?

CodexBarのローカルコストログをモデルごとに集計し、CodexまたはClaudeの現在の内訳や全体の内訳を表示します。

機能

  • CodexBarのコストログを読み取り、モデル別に集計します。
  • 現在のセッション(最新のエントリ)のみのコスト内訳を表示します。
  • ログ全体の全期間コスト内訳を表示します。
  • 集計結果にはモデル名、トークン使用量、推定コストが含まれます。

使用方法

このスキルは、Codex CLIまたはClaude Codeのコンテキスト内で自動的に使用されるように設計されています。通常、以下のようなプロンプトで呼び出します。

モデルごとのコスト内訳を表示してください

または:

現在のセッションのコストを要約してください

設定

このスキルは、CodexBarが生成するコストログファイルが標準の場所にあることを前提としています。デフォルトのログファイルパスは以下のとおりです。

  • Codex CLI: ~/.codex/codexbar_cost_log.json
  • Claude Code: ~/.claude/codexbar_cost_log.json

ログファイルのパスをカスタマイズするには、CODEXBAR_LOG_PATH環境変数を設定します。

例

Codex CLI での使用例:

現在のモデル使用状況の内訳を表示

Claude Code での使用例:

全期間のコストログをモデル別に要約

注意事項

  • このスキルは、CodexBarがアクティブにコストを記録していることを前提としています。
  • ログファイルが見つからない場合、または破損している場合は、エラーメッセージが表示されます。
  • コストの見積もりは、公開されているモデル価格に基づいており、実際の請求額とは異なる場合があります。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

steipete/apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

steipete/apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

steipete/bear-notes

Create, search, and manage Bear notes via grizzly CLI.

steipete/blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

steipete/blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

steipete/bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

steipete/camsnap

Capture frames or clips from RTSP/ONVIF cameras.

steipete/clawhub

Search, install, update, sync, or publish agent skills with the ClawHub CLI and registry.

steipete/coding-agent

Delegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.

steipete/discord

Discord message-tool ops: send/read/edit/delete, react, poll, pin, thread, search, presence, media/components.

steipete/eightctl

Control Eight Sleep pods (status, temperature, alarms, schedules).

steipete/gemini

Gemini CLI one-shot prompts, summaries, generation, skills, hooks, MCP, or Gemma routing.

steipete/gh-issues

Fetch GitHub issues, select candidates, spawn background fix agents, open PRs, and optionally process PR review comments.

steipete/gifgrep

Search GIF providers with CLI/TUI, download results, and extract stills/sheets.

steipete/github

GitHub CLI for issues, PRs, CI/check logs, comments, reviews, releases, repos, and gh api queries.

steipete/gog

Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.

steipete/goplaces

Query Google Places for text search, place details, resolve, reviews, or scriptable JSON via goplaces.

steipete/healthcheck

Audit/harden OpenClaw hosts: SSH, firewall, updates, exposure, backups, disk encryption, gateway security.

steipete/himalaya

Himalaya CLI for IMAP/SMTP mail: list, read, search, compose, reply, forward, copy, move, delete.

関連スキル