token-card
하는 일
코딩에 AI 도구를 얼마나 사용했는지, 그 비용이 얼마인지, 최근 진행 상황을 보여 주는 시각적 카드(SVG 이미지)를 만듭니다. 이 카드는 코드 파일 안에 바로 저장됩니다.
사용하는 경우
- ✓프로젝트에서 AI 코딩 도구 사용량을 보여 주고 싶을 때.
- ✓AI 코딩 활동을 쉽게 공유할 수 있는 요약이 필요할 때.
- ✓온라인 서비스에 의존하지 않고 AI 사용량 요약을 보고 싶을 때.
스킬 링크
https://github.com/affaan-m/ECC/blob/main/skills/token-card/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 프로젝트를 위한 토큰 사용량 카드를 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 컴퓨터에 있는 Claude Code, Gemini 등 AI 프로그램의 사용 기록을 확인합니다. 그다음 이 정보를 담은 이미지(SVG)를 만들어 프로젝트 안의 폴더에 저장합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
…
자주 묻는 질문
카드에는 어떤 정보가 표시되나요?
사용한 토큰의 총합, 대략적인 비용, 현재 사용 연속 기록, AI 도구별 사용량 내역이 표시됩니다.
따로 설치해야 하나요?
이 도구는 `npx`를 사용합니다. 필요한 프로그램을 그때그때 내려받으며, 컴퓨터에 영구적으로 설치하지는 않습니다. Node.js만 설치되어 있으면 됩니다.
이 도구가 제 데이터를 외부로 보내나요?
아니요. 컴퓨터에 있는 로그만 읽어 이미지를 만듭니다. 프로그램을 처음 내려받을 때를 제외하고는 인터넷으로 아무것도 보내지 않습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 280k
- 순위
- #426
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
accessibility
280k에이전트가 모든 사람이 쓸 수 있는 인터페이스를 만들도록 돕습니다. 시각 장애나 운동 장애가 있는 사람도 쓸 수 있게 합니다.
agent-architecture-audit
280k에이전트가 모든 것이 올바르게 작동하는지 점검하도록 돕습니다. AI 시스템의 문제를 찾아 고쳐서 기대대로 작동하게 합니다.
agent-eval
280k에이전트가 서로 다른 AI 코딩 도구를 비교하도록 돕습니다. 특정 작업에서 어느 도구가 더 빠르고, 저렴하고, 믿을 만한지 측정합니다.
agent-harness-construction
280k에이전트가 작업을 더 잘 이해하도록 돕습니다. 에이전트가 쓰는 도구와 지시문을 최적화해 성공 가능성을 높입니다.