Scores every agent instruction file in your repository — CLAUDE.md, AGENTS.md, GEMINI.md,
.cursorrules, copilot-instructions.md — for duplicated, stale and always-on rules, and reports
on the pull request. Same engine as the TokenCheat browser audit.
Scoring runs on the runner. No file content is sent anywhere.
name: TokenCheat
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
tokencheat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: cmartinzip/tokencheat-action@v0
with:
fail-under: "60" # optional; 0 (default) reports without failing- One sticky PR comment with a score per file, edited in place on every push.
- A file annotation for each deduction.
- The same report in the job summary — visible even on fork PRs, where the token cannot comment.
- Outputs for gating later steps.
| Input | Default | Meaning |
|---|---|---|
path |
. |
Directory to scan, relative to the workspace |
fail-under |
0 |
Fail when any file scores below this; 0 never fails |
comment |
true |
Post or update the sticky PR comment |
github-token |
${{ github.token }} |
Token for the comment; fork PRs fall back to the job summary |
| Output | Meaning |
|---|---|
score |
Lowest score across scanned files (empty when none found) |
files |
Number of instruction files scanned |
In our published Boss Tests, the compiled instruction file held its gates under pressure at about a third the size.
@v0 tracks the latest v0.x release. Pin a full tag (for example @v0.1.0) or a commit SHA if
you need a fixed version.