meta-context-diet

meta-context-diet is a skill for Claude Code from laurigates/claude-plugins. It costs 49 tokens per session (3,482 once invoked), scanned A, original, MIT.

A skill for reviewing always-loaded instructions in CLAUDE.md and .claude/rules files. It identifies procedures that could instead load only when a task needs them.

In plain words
What is it for?
Use it to audit instruction files, decide what should remain always loaded, and move suitable procedures into on-demand skills.
Why use it?
It helps reduce repeated context on every agent turn while keeping permanent rules that genuinely apply everywhere.

Skill for Claude Code

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

Part of the agent-patterns-plugin plugin — 22 skills shipped together

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 skills/laurigates/claude-plugins/meta-context-diet
Any agent
npx skills add laurigates/claude-plugins --skill meta-context-diet
Clone the repo
git clone --depth 1 https://github.com/laurigates/claude-plugins

Made for: Claude Code.

Or install agent-patterns-plugin, the plugin that ships this one along with the rest of its 22 skills.

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 meta-context-diet

README.md
[![agentmods](https://agentmods.dev/badge/skills/laurigates/claude-plugins/meta-context-diet.svg)](https://agentmods.dev/skills/laurigates/claude-plugins/meta-context-diet)
Your own site
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/meta-context-diet"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/meta-context-diet.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,482 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00049 $0.03482
Opus 5 $0.00024 $0.01741
Sonnet 5 $0.00010 $0.00696
Haiku 4.5 $0.00005 $0.00348

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

Security

Grade A, and why

meta-context-diet scanned grade A with 1 finding 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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- CLAUDE.md files in tree: !`find . -maxdepth 3 -name 'CLAUDE.md' -not -path '*/node_modules/*' -not -path '*/.claude/worktrees/*'`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

agent-patterns-plugin/skills/meta-context-diet/SKILL.md · 153 lines

How it starts

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

meta-context-diet

Audit always-loaded context — CLAUDE.md files and .claude/rules/*.md — for material that would be cheaper and clearer as an on-demand skill, then migrate approved candidates — per-candidate confirmation for lossy edits, batched approval for the safe ones.

The premise: CLAUDE.md and unscoped rules are paid for on every turn. A skill costs only its name + description in the listing budget until its intent fires, then loads its body on demand. Anything that is not a hard, always-respected invariant is a candidate to move off the always-loaded surface.

When to Use This Skill

Use this skill when... Use a different skill when...
CLAUDE.md or .claude/rules/ has grown heavy and you want to find what can move to on-demand skills You want to move rules/skills between scopes (project → user-global) — use meta-promote
A rule is really a procedure/workflow triggered by intent, not an always-true invariant, and should be a skill You want to turn a finished session's learnings into new rules — use session-distill
You want a per-item keep / path-scope / promote-to-skill / consolidate decision over the always-loaded surface You want skill-to-skill overlap and split-pressure analysis — use health-skill-audit
You suspect rules duplicate plugin skills already loaded for the session You only want frontmatter/size hygiene on existing skills — use scripts/plugin-compliance-check.sh

Context

  • Current directory: !pwd
  • CLAUDE.md files in tree: !find . -maxdepth 3 -name 'CLAUDE.md' -not -path '*/node_modules/*' -not -path '*/.claude/worktrees/*'
  • Local rules: !find . -path '*/.claude/rules/*' -maxdepth 3 -name '*.md' -not -path '*/.claude/worktrees/*'
  • User-global rules are resolved during execution (Step 1), not here — $HOME paths and error redirection are disallowed in Context commands.

Parameters

Parse $ARGUMENTS:

  • scope-path (optional, default .) — the directory whose CLAUDE.md and .claude/rules/ are audited. Use a child path (e.g. someplugin) to scope the diet to one area. The user-global ~/.claude/ surface is audited too unless scope-path names a non-. project.

Read the full file on GitHub · 153 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. 6d ago First seen · 153 lines · 49 tokens per session scan A 9d30d36dc7a2

Subscribe to this mod's changes

meta-context-diet is a skill published in the GitHub repository laurigates/claude-plugins (58 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 3,482 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

obsidian-memory-architecture

Use when designing, setting up, or maintaining an Obsidian vault as Hermes Agent's durable knowledge layer. Routes facts, conversation history, documents, procedures, and daily logs to the correct Hermes or vault system without duplicating everything into the prompt.

AtlasOmnia/hermes-custom-pack · 56 tokens

session-saver

Skill "session-saver" from animalzinc/claude-plugins, covering session saver, task, format requirements, output structure and session log: [yyyy-mm-dd].

animalzinc/claude-plugins · 0 tokens

openclaw-test-heap-leaks

Investigate pnpm test memory growth, Vitest worker OOMs, and suspicious RSS increases in OpenClaw using the scripts/test-parallel.mjs heap snapshot tooling. Use when Codex needs to reproduce test-lane memory growth, collect repeated .heapsnapshot files, compare snapshots from the same worker PID, distinguish…

SafeAI-Lab-X/ClawKeeper · 104 tokens

feishu-wiki

Feishu knowledge base navigation. Activate when user mentions knowledge base, wiki, or wiki links.

SafeAI-Lab-X/ClawKeeper · 24 tokens

agent-memory

Use the agent-memory MCP server to retrieve, verify, and store durable project knowledge and global user knowledge before and after non-trivial work.

RashadAnsari/myagents · 31 tokens

context-management

Use when managing Claude Code context window during long sessions, when context feels degraded, or when deciding between /compact, /clear, /rewind, and sub-agents. Covers context rot detection, compaction timing, branching strategy, and sub-agent isolation patterns.

Sagargupta16/claude-skills · 56 tokens