diet

diet is a skill for Claude Code from yanfeid/claude-amber. It costs 61 tokens per session (581 once invoked), scanned A, original, MIT.

A project audit that examines the fixed instructions and tools loaded into an agent's context window. The context window is the information the agent can consider during a conversation.

In plain words
What is it for?
Use it to review CLAUDE.md files, MCP servers, rules, and skills, then produce a concrete plan for reducing their context cost.
Why use it?
It shows what is using context space and identifies material that can be moved or shortened, helping reduce frequent context limits.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the amber plugin — 4 skills, 3 hooks shipped together

Good fit Use it to review CLAUDE.md files, MCP servers, rules, and skills, then produce a concrete plan for reducing their context cost.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yanfeid/claude-amber/diet
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.

Any agent
npx skills add yanfeid/claude-amber --skill diet
Clone the repo
git clone --depth 1 https://github.com/yanfeid/claude-amber

Made for: Claude Code.

Or install amber, the plugin that ships this one along with the rest of its 4 skills, 3 hooks.

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 diet

README.md
[![agentmods](https://agentmods.dev/badge/skills/yanfeid/claude-amber/diet/github.svg)](https://agentmods.dev/skills/yanfeid/claude-amber/diet)
Your own site
<a href="https://agentmods.dev/skills/yanfeid/claude-amber/diet"><img src="https://agentmods.dev/badge/skills/yanfeid/claude-amber/diet/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diet

Your own site · 80×15
<a href="https://agentmods.dev/skills/yanfeid/claude-amber/diet"><img src="https://agentmods.dev/badge/skills/yanfeid/claude-amber/diet.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00061 $0.00581
Opus 5 $0.00030 $0.00291
Sonnet 5 $0.00012 $0.00116
Haiku 4.5 $0.00006 $0.00058

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

Security

Grade A, and why

diet 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 9d 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.

skills/diet/SKILL.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/amber:diet — context audit & slimming plan

Audit this project's fixed context costs and produce a slimming plan. Fixed costs are paid every turn of every session — a 2,000-token CLAUDE.md in a 100-turn session is 200K tokens of spend and a fatter, dumber context.

1. Measure the consumers

Check each of these (skip silently if absent):

Consumer How to check Red flag
Project CLAUDE.md (+ imports) Read it, estimate tokens (~chars/3.5) > 300 lines
User ~/.claude/CLAUDE.md Read it Project-specific content in a global file
MCP servers .mcp.json, ~/.claude.json mcpServers for this project Servers with 10+ tools that are rarely used — every tool schema is always-loaded context
.claude/rules/, large always-on context files List + size Rules that only apply to specific situations
.claude/skills/ List descriptions Bloated descriptions (the description line is the only always-loaded part — bodies are free)

2. Classify every instruction in CLAUDE.md

  • Keep (always-relevant): build commands, hard constraints, style rules that apply to every edit.
  • → Skill (situational): anything starting with "when X, do Y" that isn't hit every session — deploy procedures, release checklists, how to run a specific tool. Move the body into a skill; only its one-line description stays resident.
  • → Delete: things Claude can derive from the code, duplicated docs, stale instructions.

3. Deliver the plan

Output a short report:

  1. Current fixed cost estimate (tokens per turn) by consumer.
  2. Specific moves: "lines X–Y of CLAUDE.md → new skill deploy-checklist", "disable MCP server Z (used 0 times in recent sessions, costs ~N tokens of tool schemas)".
  3. Estimated fixed-cost after the diet.

Then ask whether to apply the moves. If the user approves, perform them: create the skill files (with description frontmatter written for recall, ≤ 2 lines), trim CLAUDE.md, and list every change made. Do not delete anything without showing it first.

Read the full file on GitHub · 37 lines

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. 9d ago First seen · 37 lines · 61 tokens per session scan A b37f538d1c11

Subscribe to this mod's changes

diet is a skill published in the GitHub repository yanfeid/claude-amber (2 stars, last pushed 2mo ago), licensed MIT. It adds 61 tokens to every session and 581 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

debug

Use when encountering any bug, test failure, unexpected behavior, or performance regression — before proposing any fix. Root-cause discipline plus a feedback-loop method; applies at every tier.

AbdurRafay2004/handoff · 38 tokens

ship

Use when work is verified and ready to leave the machine — branch/PR/merge/deploy/smoke-check. Triggers on "ship it", "deploy", "merge the PR", "push this", "release", "go live", "cutover". Covers git hygiene, PR and merge discipline, deploy-target detection (Cloudflare Workers/Pages via wrangler, Vercel, Convex…

AbdurRafay2004/handoff · 105 tokens

browser-qa

Use to exercise the running app in a real browser — after UI changes, before ship, or when the user asks to QA the site, smoke-test a branch, or check "does it actually work". Drives affected routes headlessly via Playwright, captures console errors, failed requests, and screenshots, and produces a report with a…

AbdurRafay2004/handoff · 85 tokens

design

Use when designing or improving a module's interface, deciding where a seam goes, making code more testable or navigable, or pinning down domain terminology. Provides the deep-module vocabulary other skills lean on.

AbdurRafay2004/handoff · 44 tokens

learn

Use at the end of T3 work, after an incident/rollback, or when the user asks for a retro — turns what happened into recorded learnings that live in the repo (CHANGELOG entry, typed LEARNINGS.md entries, follow-up tasks, and — only with explicit user approval — new RULES).

AbdurRafay2004/handoff · 66 tokens

verify-done

Use when about to claim work is complete, fixed, or passing — before committing, opening a PR, or telling the user it works. Requires running verification commands and confirming output first; evidence before assertions, always.

AbdurRafay2004/handoff · 47 tokens