Skip to content

Add token-count badge to README#71

Open
rsamf wants to merge 1 commit into
JCodesMore:masterfrom
rsamf:add-token-badge
Open

Add token-count badge to README#71
rsamf wants to merge 1 commit into
JCodesMore:masterfrom
rsamf:add-token-badge

Conversation

@rsamf

@rsamf rsamf commented Jul 14, 2026

Copy link
Copy Markdown

Hi! This PR adds one line to the README: a badge showing an estimate of how many LLM tokens this repo weighs. Since this project is the kind of thing people load into an LLM's context window, the number seemed genuinely useful to surface.

Preview: tokens

Full disclosure: I built the free, open-source service behind the badge (https://github.com/rsamf/gittokens), and I'm proposing it to a small, hand-picked set of repos where it seems like a good fit. If it isn't a fit here, please just close this, and I won't resubmit.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a single token-count badge to the README header, sourced from the gittokens.rsamf.com service (authored by the PR contributor) via shields.io's endpoint proxy mechanism. The change is documentation-only and touches no application code.

  • The badge renders a live estimate of how many LLM tokens the repository weighs, which is relevant for a project whose primary use case is loading code into an LLM context window.
  • Unlike the three existing badges, the new one is not wrapped in an <a> tag, breaking the row's consistent clickable-badge pattern.
  • The badge depends on an external community service maintained by the PR author; if that service goes offline or changes its response format, the badge will show a broken/error state in the README.

Confidence Score: 4/5

Documentation-only README change; no application code is affected and the change is safe to merge as-is.

The only changes are to a single README line. The badge renders through shields.io as a proxy, so no user data is directly exposed to the third-party service. The two minor observations — missing link wrapper and external service availability — do not affect runtime behavior of the project itself.

README.md — the badge line warrants a quick look for the missing link and the decision about accepting an external service dependency.

Important Files Changed

Filename Overview
README.md Adds a token-count badge sourced from a third-party service (gittokens.rsamf.com via shields.io endpoint proxy); badge is unlinked unlike all other badges in the same line

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Browser as GitHub/Browser
    participant Shields as shields.io
    participant GitTokens as gittokens.rsamf.com

    Browser->>Shields: "GET /endpoint?url=https://gittokens.rsamf.com/badge/..."
    Shields->>GitTokens: GET /badge/JCodesMore/ai-website-cloner-template
    GitTokens-->>Shields: JSON badge data (label, message, color)
    Shields-->>Browser: Rendered SVG badge image
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Browser as GitHub/Browser
    participant Shields as shields.io
    participant GitTokens as gittokens.rsamf.com

    Browser->>Shields: "GET /endpoint?url=https://gittokens.rsamf.com/badge/..."
    Shields->>GitTokens: GET /badge/JCodesMore/ai-website-cloner-template
    GitTokens-->>Shields: JSON badge data (label, message, color)
    Shields-->>Browser: Rendered SVG badge image
Loading

Reviews (1): Last reviewed commit: "docs: add token-count badge to README" | Re-trigger Greptile

Comment thread README.md
# AI Website Cloner Template

<a href="https://github.com/JCodesMore/ai-website-cloner-template/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a> <a href="https://github.com/JCodesMore/ai-website-cloner-template/stargazers"><img src="https://img.shields.io/github/stars/JCodesMore/ai-website-cloner-template?style=flat" alt="Stars" /></a> <a href="https://discord.gg/hrTSX5yTpB"><img src="https://img.shields.io/discord/1400896964597383279?label=discord" alt="Discord" /></a>
<a href="https://github.com/JCodesMore/ai-website-cloner-template/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a> <a href="https://github.com/JCodesMore/ai-website-cloner-template/stargazers"><img src="https://img.shields.io/github/stars/JCodesMore/ai-website-cloner-template?style=flat" alt="Stars" /></a> <a href="https://discord.gg/hrTSX5yTpB"><img src="https://img.shields.io/discord/1400896964597383279?label=discord" alt="Discord" /></a> <img src="https://img.shields.io/endpoint?url=https://gittokens.rsamf.com/badge/JCodesMore/ai-website-cloner-template" alt="tokens" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge lacks a link, inconsistent with other badges

The new token badge is the only one in the row not wrapped in an <a> tag — the license, stars, and Discord badges all link to a relevant destination. Wrapping it in <a href="https://gittokens.rsamf.com">...</a> would keep the row consistent and give curious visitors somewhere to go.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread README.md
# AI Website Cloner Template

<a href="https://github.com/JCodesMore/ai-website-cloner-template/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a> <a href="https://github.com/JCodesMore/ai-website-cloner-template/stargazers"><img src="https://img.shields.io/github/stars/JCodesMore/ai-website-cloner-template?style=flat" alt="Stars" /></a> <a href="https://discord.gg/hrTSX5yTpB"><img src="https://img.shields.io/discord/1400896964597383279?label=discord" alt="Discord" /></a>
<a href="https://github.com/JCodesMore/ai-website-cloner-template/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a> <a href="https://github.com/JCodesMore/ai-website-cloner-template/stargazers"><img src="https://img.shields.io/github/stars/JCodesMore/ai-website-cloner-template?style=flat" alt="Stars" /></a> <a href="https://discord.gg/hrTSX5yTpB"><img src="https://img.shields.io/discord/1400896964597383279?label=discord" alt="Discord" /></a> <img src="https://img.shields.io/endpoint?url=https://gittokens.rsamf.com/badge/JCodesMore/ai-website-cloner-template" alt="tokens" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 External service dependency with no fallback

The badge pulls live data from gittokens.rsamf.com via shields.io's endpoint proxy. If the service becomes unavailable or the URL format changes, the badge will show a broken/error state on every page load of the README. Since this is a community-maintained open-source service run by the PR author rather than an established provider, the repo maintainers should be comfortable accepting that availability dependency. Consider whether a static pre-computed badge (e.g. https://img.shields.io/badge/tokens-~Xk-blue) would serve the use case with less fragility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant