token-card
Ce qu’il fait
Crée une carte visuelle (image SVG) qui affiche la quantité de tokens que vous avez utilisés avec les outils d'IA pour le code, leur coût équivalent et vos progrès récents. Cette carte est enregistrée directement dans vos fichiers de code.
Quand l’utiliser
- ✓Lorsque vous voulez afficher l'utilisation de vos assistants IA de codage dans votre projet.
- ✓Lorsque vous voulez un résumé facile à partager de votre activité de codage avec l'IA.
- ✓Lorsque vous voulez consulter un résumé de votre utilisation de l'IA sans passer par un service en ligne.
Lien du skill
https://github.com/affaan-m/ECC/blob/main/skills/token-card/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Génère une carte d'utilisation des tokens pour mon projet.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'outil consulte les journaux d'utilisation de vos programmes d'IA (comme Claude Code, Gemini, etc.) sur votre ordinateur. Il génère ensuite une image (SVG) avec ces informations et l'enregistre dans un dossier de votre projet.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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
…
Questions fréquentes
Quelles informations apparaissent sur la carte ?
Le nombre total de tokens utilisés, le coût approximatif en argent, votre série d'utilisation actuelle et la répartition de l'utilisation entre les différents outils d'IA.
Dois-je installer quelque chose ?
L'outil utilise `npx`, qui télécharge le programme nécessaire au moment de l'exécution sans l'installer durablement sur votre ordinateur. Il vous suffit d'avoir Node.js installé.
Cet outil envoie-t-il mes données quelque part ?
Non. Il lit uniquement les journaux locaux de votre ordinateur et génère l'image. Rien n'est envoyé sur Internet, à part le téléchargement initial du programme.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 280k
- Position au classement
- #426
- Licence
- MIT
- Mis à jour
- 15/10/2026
Commentaires
- …
Autres skills de ce dépôt
accessibility
280kAide votre agent à créer des interfaces accessibles à tous. Vérifie que sites et applis fonctionnent bien pour les personnes handicapées, aveugles ou à mobilité réduite.
agent-architecture-audit
280kPermet à votre agent de vérifier que tout fonctionne correctement. Il repère et corrige les problèmes des systèmes d'IA pour qu'ils se comportent comme prévu.
agent-eval
280kAide votre agent à comparer différents outils de codage IA. Il mesure lequel est le plus rapide, le moins cher et le plus fiable pour des tâches précises.
agent-harness-construction
280kRend votre agent plus efficace dans l'exécution des tâches. Il optimise les outils et les instructions qu'il utilise pour augmenter ses chances de réussite.
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.