TokenDiet copilot-instructions.md

TokenDiet copilot-instructions.md is an instructions file for GitHub Copilot from Fortytude/TokenDiet. It costs 415 tokens per session, scanned A, original, MIT.

Repository instructions for reviewing large language model and token costs, where tokens are the text units used to process a request. They require evidence from specific files and prohibit invented dollar savings or unsafe edits.

In plain words
What is it for?
Use them when auditing LLM usage in the repository, citing findings by file and line, evaluating model or caching changes, and preparing fixes for user validation.
Why use it?
They keep cost analysis honest and make suggested fixes traceable, while separating safe mechanical changes from changes that could alter behaviour.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/fortytude/tokendiet/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/Fortytude/TokenDiet

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for TokenDiet copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/fortytude/tokendiet/copilot-instructions.svg)](https://agentmods.dev/instructions/fortytude/tokendiet/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/fortytude/tokendiet/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/fortytude/tokendiet/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 415 This file is loaded in full into every session.
When invoked 415 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00415 $0.00415
Opus 5 $0.00208 $0.00208
Sonnet 5 $0.00083 $0.00083
Haiku 4.5 $0.00042 $0.00042

Measured 6d ago against content hash 7843ff8e38d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

TokenDiet copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

editors/copilot/.github/copilot-instructions.md · 26 lines

What it actually says

TokenDiet honesty contract (repo-wide)

When you reason about LLM / token cost in this repo, apply the /tokendiet discipline — describe technical waste, never fabricate the dollars:

  • Never fabricate a dollar figure. You don't know the traffic volume, so a "$X/month saved" total would be invented. Describe waste qualitatively — the pattern, the mechanism, the fix. You may cite published provider rates as facts (cached reads ~10% of input; Batch API 50% off; a small model ~5× cheaper than a flagship, not 25×) — just never multiply a rate into a total. Give a number only if the user first shares their bill or volume.
  • A model swap / downgrade is always a suggestion to validate, never a promised saving — it changes output quality. Never attach a dollar figure to it. Never suggest downgrading the core generation model on a code-gen / dev-agent repo.
  • Never propose a corrupting edit. Only offer to apply behavior-preserving (SAFE-MECHANICAL) fixes, with the diff shown first. Flag anything behavior-changing and let the user validate it.
  • Cite evidence. Every finding points at a real file:line. Never claim the review is "exhaustive" — say "I reviewed N call-sites."
  • Dead / myth levers — never surface: the token-efficient-tools-2025-02-19 header is a no-op on Claude 4+; lowering max_tokens caps output, not input cost; temperature/top_p have no billing effect; OpenAI and Gemini cache automatically (no cache_control to add — the lever is ordering).

When the user asks about LLM / token / API cost, run the /tokendiet prompt for the full methodology, waste catalog, and grouped report.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 26 lines · 415 tokens per session scan A 7843ff8e38d7

Subscribe to this mod's changes

TokenDiet copilot-instructions.md is an instructions file published in the GitHub repository Fortytude/TokenDiet (11 stars, last pushed 1mo ago), licensed MIT. It adds 415 tokens to every session, about $0.0021 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories