token-card
Fungsinya
Membuat kartu visual (gambar SVG) yang menampilkan seberapa banyak Anda menggunakan alat AI untuk coding, perkiraan biayanya, dan perkembangan terbaru Anda. Kartu ini langsung disimpan ke dalam file kode Anda.
Kapan dipakai
- βSaat Anda ingin menampilkan penggunaan asisten AI untuk coding di proyek Anda.
- βSaat Anda ingin ringkasan aktivitas coding AI yang mudah dibagikan.
- βSaat Anda ingin melihat ringkasan penggunaan AI tanpa bergantung pada layanan online.
Link skill
https://github.com/affaan-m/ECC/blob/main/skills/token-card/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuatkan kartu penggunaan token untuk proyek saya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Alat ini memeriksa log penggunaan program AI Anda (seperti Claude Code, Gemini, dll.) di komputer Anda. Lalu, alat ini membuat gambar (SVG) dari informasi tersebut dan menyimpannya di sebuah folder di dalam proyek Anda.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Token Card
Produce an SVG card summarising this machine's AI coding agent usage β total tokens, equivalent API cost, current streak, and the split across agents β and write it into the working tree as a file the README can reference.
The card is a committed artifact rather than a hosted image, so it renders from the repository itself and does not depend on a third-party endpoint staying up.
When to Activate
- Someone wants a usage figure visible in a README or docs page.
- Someone asks for a shareable summary of their agent activity across tools.
Use /cost-report instead when the question is "what did I spend this week". The two read
different sources and produce different things:
/cost-report |
Token Card | |
|---|---|---|
| Source | ~/.claude/metrics/costs.jsonl, written by ECC's stop:cost-tracker hook |
The agents' own session logs |
| Agents | Claude Code | Claude Code, Codex, Gemini CLI, OpenCode |
| Output | Terminal summary, optional CSV | An SVG file committed to the repo |
The tool this runs
@tokenchit/cli, MIT licensed: https://github.com/iyashjayesh/tokenchit
Pinned to an exact version, deliberately. @latest resolves to whatever the registry
currently serves, and this tool reads local session logs β so a compromised future release
would be executed with access to them before anyone had reviewed it. Pin, and raise the pin
knowingly:
TOKENCHIT_VERSION=0.10.0
To check the pinned artifact before running it the first time:
npm view @tokenchit/cli@0.10.0 dist.integrity dist.tarball
Workflow
Ask before the first download.
npxfetches the package from the npm registry and executes it. That is a remote download of code that will read local logs, so get explicit confirmation from the user before the first run on a machine. If they decline, stop here and say what would have run.Configure, unless this is a dry run. If
.tokenchit.jsonis absent, run:npx -y @tokenchit/cli@0.10.0 initIt detects which agents have logs on this machine and records them. The file is meant to be committed and never contains a credential.
Skip this entirely when the user passed
--dry-run, and report that.tokenchit.jsonwould be created. A preview that writes a config file is not a preview.Render the card. The bare command writes to the configured output β
tokenchit.svgunless.tokenchit.jsonnames another path:npx -y @tokenchit/cli@0.10.0 syncAppend only the flags the user actually asked for, each spelled exactly as below. Do not copy a placeholder into the command β
syncignores an unrecognised positional argument rather than refusing it, so a bracketed[--dry-run]reaches the CLI as junk and the card is written anyway, which is the opposite of what was asked.Flag Effect --out <path>Write somewhere other than the configured output --theme auto|light|darkCard theme; autoadapts to the reader's system--dry-runPrint what would be written and touch nothing syncreads local files and sends nothing: no prompts, no code, no file contents leave the machine, and it transmits nothing to any server. The npx invocation around it is a registry download β that is the network access in this workflow, and step 1 is where it is agreed.Report and offer. Print the figures it produced β tokens, equivalent cost, streak, per-agent split β and the path written. If the repository has a README that does not yet reference the card, offer to add:
syncprints the path relative to the repository root. A Markdown image resolves relative to the file it sits in, so rewrite it for the README being edited: a card atdocs/usage.svgis./docs/usage.svgfrom the root README but../usage.svgfromdocs/zh-CN/README.md. Pasting the printed path into a nested README points atdocs/zh-CN/docs/usage.svgand renders broken.Do not edit the README without being asked.
Stop after step 4. Publishing to the public leaderboard is a separate publish command that
requires explicit opt-in, and is not part of this workflow β run it only if the user asks for
it by name. unpublish removes the row and the account again.
Output
β¦
Pertanyaan umum
Informasi apa saja yang muncul di kartu?
Total token yang digunakan, perkiraan biaya dalam uang, streak penggunaan Anda saat ini, dan rincian penggunaan di berbagai alat AI.
Apakah saya perlu menginstal sesuatu?
Alat ini menggunakan `npx`, yang mengunduh program yang dibutuhkan saat dijalankan tanpa menginstalnya secara permanen di komputer Anda. Anda hanya perlu memiliki Node.js yang sudah terpasang.
Apakah alat ini mengirim data saya ke mana pun?
Tidak. Alat ini hanya membaca log lokal di komputer Anda dan membuat gambarnya. Tidak ada yang dikirim ke internet, kecuali saat unduhan awal program.
Detail
Deskripsi asli dari pembuat
Render a token-usage stat card from local Claude Code, Codex, Gemini CLI, and OpenCode session logs and commit it into the repository as a file. Use when someone wants a current usage figure in a README, or asks for a shareable card of their coding-agent activity.
repo: affaan-m/ECC
Popularitas
- Bintang GitHub
- 280k
- Peringkat
- #426
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
accessibility
280kMembantu agent Anda membuat antarmuka yang ramah untuk semua orang. Memastikan website dan aplikasi tetap bisa dipakai penyandang disabilitas, seperti tunanetra.
agent-architecture-audit
280kMembuat agent Anda memeriksa apakah semuanya berjalan dengan benar. Agent akan menemukan dan memperbaiki masalah pada sistem AI agar bekerja sesuai harapan.
agent-eval
280kMembantu agent Anda membandingkan berbagai alat coding AI. Mengukur mana yang lebih cepat, lebih murah, dan lebih andal untuk tugas tertentu.
agent-harness-construction
280kMembuat agent Anda lebih memahami cara menyelesaikan tugas. Agent mengoptimalkan alat dan instruksi yang digunakan agar peluang berhasilnya lebih besar.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.