Skip to content
Back to search

claude-context-diet

MarketplaceWorks with Claude CodeGitHub

Trim what Claude Code loads into context, per project.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/normandesjr--claude-context-diet/badge.svg)](/listings/normandesjr--claude-context-diet)

HTML

<a href="/listings/normandesjr--claude-context-diet"><img src="/api/listings/normandesjr--claude-context-diet/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

/plugin marketplace add normandesjr/claude-context-diet
/plugin install context-diet@claude-context-diet

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 12 lines
  1. {
  2. "name": "claude-context-diet",
  3. "description": "Trim what Claude Code loads into context, per project.",
  4. "owner": { "name": "Normandes Junior" },
  5. "plugins": [
  6. {
  7. "name": "context-diet",
  8. "source": "./plugins/context-diet",
  9. "description": "Inventory loaded skills, plugins and MCP servers, measure their use from transcripts, and turn off what you pick."
  10. }
  11. ]
  12. }
README.md · README · 55 lines
  1. # claude-context-diet
  2. Every skill description, MCP instruction block and plugin Claude Code loads costs tokens on **every turn**. Most projects carry many that never fire. `context-diet` inventories what a project loads, measures what was actually used from its session transcripts, and lets you pick what to turn off.
  3. ## Install
  4. ```
  5. /plugin marketplace add normandesjr/claude-context-diet
  6. /plugin install context-diet@claude-context-diet
  7. ```
  8. ## Use
  9. In the project you want to trim:
  10. ```
  11. /context-diet:diet
  12. ```
  13. 1. **Inventory**: lists loaded skills, plugins, MCP servers and agents, with approximate token cost.
  14. 2. **Classify**: cut / keep / ask, from usage counts and last-used dates in `~/.claude/projects/<project>/*.jsonl` (subagents included). With little history, it judges by the repo's stack.
  15. 3. **Choose**: you pick per group; you pick the scope (project, local or user).
  16. 4. **Apply**: merges into the settings file, showing a diff first. Hooks, allow rules and other keys are preserved.
  17. 5. **Verify**: restart and run `/context`.
  18. Rerun after Claude Code updates or new plugins; only new items need a decision.
  19. The skill is user-invoked (`disable-model-invocation: true`), so it adds no context load of its own.
  20. ## What it changes
  21. | Item | Setting |
  22. | --- | --- |
  23. | Skill | `skillOverrides[name] = "off"` (or `"name-only"`) |
  24. | Plugin | `enabledPlugins["plugin@marketplace"] = false` |
  25. | `.mcp.json` server | `disabledMcpjsonServers` |
  26. | Other MCP server / tool | `permissions.deny` |
  27. ## Scripts
  28. Standard-library Python 3, usable on their own:
  29. - `plugins/context-diet/scripts/inventory.py --project-dir <dir>`: JSON report, read-only.
  30. - `plugins/context-diet/scripts/apply.py --scope project|local|user [--skill-off X] [--plugin-off P@M] [--deny mcp__S] [--mcp-off S] [--dry-run]`
  31. ## Limits
  32. - The transcript format is internal to Claude Code and may change; the inventory degrades to settings + plugins when it does.
  33. - Token counts are estimates (characters / 4). `/context` is the real measure.
  34. - Core tools (Bash, Read, Edit...) and the base system prompt are out of scope.
  35. - Denying a claude.ai connector's tools may leave its server instruction block in context; check `/context`.
  36. ## License
  37. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.