rmb-cost-report

Generate RMB cost reports from Codex session token usage with GPT and DeepSeek pricing.

Updated Jun 6, 2026
One-click install
npx skills add https://github.com/Kirrito-k423/AutoResearch --skill rmb-cost-report-kirrito-k423
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rmb-cost-report
Source: https://github.com/Kirrito-k423/AutoResearch/tree/main/workspace-core/rmb-cost-report
Command: npx skills add https://github.com/Kirrito-k423/AutoResearch --skill rmb-cost-report-kirrito-k423

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Long-running LLM tasks consume large volumes of tokens, but raw session logs do not directly show how much money was spent. This Skill converts Codex/OpenAI-style token usage into a reproducible RMB-Cost.md report that breaks down uncached input, cached input, and output costs in both USD and RMB. ## Core Features & Use Cases - Session-based usage extraction: Parses Codex session JSONL token_count events within a start/end timestamp window to compute delta token usage. - Dual-model cost comparison: Calculates costs for both GPT and DeepSeek pricing tiers, separating cache-hit, cache-miss, and output components. - Manual mode and price overrides: Accepts manually supplied token counts and custom per-million-token prices plus USD/CNY exchange rates. - Use Case: After a 3-hour automated experiment finishes, run the script against the session JSONL to produce RMB-Cost.md showing 320M input tokens, cache hit savings, and total RMB cost under both GPT and DeepSeek pricing. ## Quick Start Ask the assistant to use the rmb-cost-report skill to generate an RMB-Cost.md report from your Codex session JSONL file with the goal's start and end timestamps.

Frequently Asked Questions about rmb-cost-report

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate API cost from Codex session token usage?▼

Run the build_rmb_cost_report.py script with the --session flag pointing to your Codex session JSONL file plus --start-ts and --end-ts timestamps. It extracts token_count events in that window and writes an RMB-Cost.md report with USD and RMB totals.

How to compare GPT and DeepSeek API costs for the same workload?▼

The script prices identical token usage under both GPT and DeepSeek rate cards in one run. It outputs separate cost breakdown tables and a summary comparing total RMB and USD for each model.

Can I generate a cost report without a session JSONL file?▼

Yes, use manual mode by passing --input-tokens, --cached-input-tokens, and --output-tokens directly. The script computes uncached input as total input minus cached input and produces the same report format.

How are cached input tokens billed differently in cost reports?▼

Cached input tokens are billed at a lower cache-hit rate while uncached tokens use the standard input price. The report separates the three billable components: uncached input, cached input, and output, each with its own USD per million token rate.

Why might reported costs be marked as estimates?▼

API prices and USD/CNY exchange rates change over time, and the script ships with placeholder defaults. Unless you pass current verified prices and the --verified flag, the report is labeled as an estimate rather than payable figures.