Agent skill · affaan-m
token-card
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.
What it needs
About 3k tokens when loaded.
What this skill does
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: To check the pinned artifact before running it the first time: Workflow 1. Ask before the first download. npx fetches 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. 2. Configure, unless this is a dry run. If .tokenchit.json is absent, run: It detects which agents have logs on this machine and records them. The file is meant to be committed and never contains a credential. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/token-card