Estimate the floor (self-) cost of a self-hosted LLM token: electricity + hardware amortization. Measures power (nvidia-smi) and tok/s on the server, asks for tariff and hardware cost, prints cost per 1M input/output tokens. Not the market API price.
/token-cost — estimate the floor cost of a self-hosted LLM token: electricity
plus hardware amortization. This is the physical lower bound (the "bedrock"), not the
market API price. Based on the article
Почём нынче токен для народа? by Pavel Rykov.
The skill gathers the formula inputs by querying the server where it can and asking the user for the rest, then prints cost per 1M input/output tokens.
C_1M = ((P_kW * T_kWh + S / H_life) * 1e6) / (R_tok_s * 3600)
| Symbol | Meaning | Source |
|---|---|---|
P_kW | real power draw under load (kW) | measured (nvidia-smi) |
T_kWh | electricity tariff (RUB/kWh) | asked |
R_tok_s | speed, decode for output / prefill for input (tok/s) | measured (benchmark) |
S | hardware cost (RUB) | asked |
H_life | lifetime hours = years × 365 × 24 | asked (default 5 y) |
Input and output are computed separately; idle utilization raises the amortization share per useful token.
| File | Purpose |
|---|---|
SKILL.md | Agent instructions (frontmatter name, version, description). |
scripts/token_cost.py | Math + measure-power (samples nvidia-smi). stdlib only. |
scripts/bench_speed.py | Measures decode/prefill tok/s against an OpenAI-compatible endpoint. stdlib only. |
# Measure real power while the model is generating
python3 scripts/token_cost.py measure-power --overhead-w 150
# Measure speed against the running endpoint (vLLM / llama.cpp / NeuralDeep)
python3 scripts/bench_speed.py --base-url http://localhost:8000 --model gpt-oss-120b
# Full estimate with amortization
python3 scripts/token_cost.py compute \
--measure-power --tariff 6.97 \
--decode-tok-s 90 --prefill-tok-s 1440 \
--hw-cost 700000 --life-years 5 --utilization 1.0
Reference example (2×RTX 4090 48 GB, GPT-OSS-120B, Saint Petersburg tariff) reproduces the article: ≈10.76 RUB/1M output by electricity, ≈60 RUB/1M output with 5-year amortization.
This skill is distributed through the rpa-skills catalog (a Claude Code plugin marketplace), and also installs as a plain skill folder (Cursor, OpenAI Codex, Kimi Code CLI, and others).
As a plugin (Claude Code) — add the catalog once, then install this skill from it:
/plugin marketplace add EvilFreelancer/rpa-skills
/plugin install token-cost@rpa-skills
As a plain skill folder — copy or symlink this repository into a skill root (its SKILL.md lives at the repo root):
| Tool | Path |
|---|---|
| Claude Code | ~/.claude/skills/token-cost/ |
| Cursor | ~/.cursor/skills/token-cost/ |
| OpenAI Codex | ~/.codex/skills/token-cost/ |
| Kimi Code CLI | ~/.kimi/skills/token-cost/ |
The directory name must match the name field in SKILL.md.
/token-cost in agent chat.@ context — attach the skill folder or SKILL.md.description in SKILL.md.Part of rpa-skills — Pavel Rykov's agent-skills collection (see notes on vibe coding and the prompt collection cursor-vibe-prompts).
Based on the article Почём нынче токен для народа? by Pavel Rykov.
Licensed under the MIT License — see LICENSE.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub evilfreelancer/rpa-skills --plugin token-costClassical formal logic from G. Chelpanov's textbook: concepts, judgments, syllogisms, induction, fallacies, laws of thought. Two text modes — logical review (logika:review, analysis-only report) and argument fixing (rewrite with corrected logic) — plus solving logic textbook problems. Russian-language references distilled from the source book.
Warm up context on a repository: study code, docs and test code, set up the dev environment the project expects, run tests, write a short project report. No extra user brief required.
Create or refresh agent project rules (Cursor .cursor/rules/*.mdc, Claude Code CLAUDE.md and .claude/rules). Layered-cake architecture + BDD-style delivery, with a mandatory Rules Sync step that mirrors changes across every agent's rule tree.
Add a feature strictly by BDD: plan, failing tests (red), implementation (green), full test run, docs and examples, linter/pre-commit at the end. Requires a clear feature description.
Fix a bug with a reproduction test first, then the fix, then the full test suite, then a short report. Requires a clear bug description (expected vs actual, how to reproduce).
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
This skill should be used when users need to generate ideas, explore creative solutions, or systematically brainstorm approaches to problems. Use when users request help with ideation, content planning, product features, marketing campaigns, strategic planning, creative writing, or any task requiring structured idea generation. The skill provides 30+ research-validated prompt patterns across 14 categories with exact templates, success metrics, and domain-specific applications.
Develop, test, build, and deploy Godot 4.x games with Claude Code. Includes GdUnit4 testing, web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io.
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Consult multiple AI coding agents (Gemini, OpenAI, Grok, Perplexity, plus codex, antigravity, and grok CLIs when installed) to get diverse perspectives on coding problems