PR Token Diff for GitHub 제작자: Jamison Lahman
Shows the estimated token difference of a GitHub pull request next to GitHub's line-count diffstat.
사용자 1명사용자 1명
확장 메타 데이터
정보
Line counts don't tell you how much LLM context a pull request consumes. This extension adds an estimated token diff wherever GitHub shows its line-count diffstat.
━ What you get
• A header badge on every PR: +12,345 −6,789 tokens, right beside GitHub's own +/− line counts
• Per-file token badges in the Files changed view
• Hover any badge for the exact added/removed estimate
━ How it works
The extension fetches the PR's .diff through your existing GitHub session — no API token, no OAuth, works on private repos you can already see. The unified diff is parsed locally (renames, binaries, and mode changes handled) and token counts are estimated per file, then cached with ETag revalidation so repeat visits are instant.
Counts are a fast heuristic estimate (identifier sub-word splitting blended with a chars-per-token ratio), not an exact BPE tokenization — accurate enough to judge whether a PR fits in a model's context window.
━ Privacy
• No data collection, no analytics, no external services
• Talks only to github.com / patch-diff.githubusercontent.com
• Zero runtime dependencies
Source code: https://github.com/jmelahman/github-token-diff-extension
━ What you get
• A header badge on every PR: +12,345 −6,789 tokens, right beside GitHub's own +/− line counts
• Per-file token badges in the Files changed view
• Hover any badge for the exact added/removed estimate
━ How it works
The extension fetches the PR's .diff through your existing GitHub session — no API token, no OAuth, works on private repos you can already see. The unified diff is parsed locally (renames, binaries, and mode changes handled) and token counts are estimated per file, then cached with ETag revalidation so repeat visits are instant.
Counts are a fast heuristic estimate (identifier sub-word splitting blended with a chars-per-token ratio), not an exact BPE tokenization — accurate enough to judge whether a PR fits in a model's context window.
━ Privacy
• No data collection, no analytics, no external services
• Talks only to github.com / patch-diff.githubusercontent.com
• Zero runtime dependencies
Source code: https://github.com/jmelahman/github-token-diff-extension
리뷰어 0명이 0점으로 평가함
권한 및 데이터
필수 권한:
- github.com에서 사용자의 데이터에 접근
선택적 권한:
- github.com에서 사용자의 데이터에 접근
- patch-diff.githubusercontent.com에서 사용자의 데이터에 접근
데이터 수집:
- 개발자는 이 확장 기능이 데이터 수집을 요구하지 않는다고 밝히고 있습니다.
추가 정보
- 부가 기능 링크
- 버전
- 0.1.4
- 크기
- 20.05 KB
- 최근 업데이트
- 2달 전 (2026년 7월 15일)
- 관련 카테고리
- 버전 목록
- 모음집에 추가