Skip to main content
skill CX Codex

skill-diet — Claude Code skill: what it does, how to install

skill-diet is a Claude Code skill that keeps agent skills lean and accurate. It runs before edits that affect a skill’s rules or described behavior.

MIT ★ 262 updated 2026-11-06

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add nicobailon/skill-diet
/plugin install skill-diet@skill-diet
Open on GitHub

What skill-diet does

skill-diet organizes an agent skill by when its information is needed. Triggers stay in description, shared rules go in SKILL.md, and task-specific material moves to references/. For tool-specific details, it points to the tool’s help, replies, errors, and output checks instead of copying exact names and values into the skill.

Its editing flow starts with a fix below the skill, then checks whether the model needs another rule before changing existing prose. A tool name or behavior change calls for a matching skill update in the same change. Run node scripts/eval.mjs check <skill-dir> to check links and print the size. A full diet is triggered when SKILL.md is more than 10% larger than at its last diet commit, or when one idea appears twice.

After an edit, the skill calls for the triggering case to be rerun in a fresh session and for tests covering the skill text. In Claude Code, the installed file is ~/.claude/skills/skill-diet/SKILL.md.

What it helps with

  • trim a SKILL.md overloaded with detail
  • move occasional guidance behind reference links
  • remove duplicated rules across skill files
  • keep a skill aligned with changed tool names or behavior
  • check skill links and size after an edit

Example prompts for the agent

  • Review this skill and move task-specific details into references/.
  • A code change renamed an operation. Update the related skill and run node scripts/eval.mjs check <skill-dir>.
  • Run a full diet because SKILL.md grew more than 10% since its last diet commit.

How to install skill-diet

1Plugin marketplace

/plugin marketplace add nicobailon/skill-diet
/plugin install skill-diet@skill-diet

This installs the whole skill-diet plugin with all its skills

2Skills CLI (Vercel)

npx skills add nicobailon/skill-diet --skill skill-diet -a claude-code

3Manually: put the files in place

~/.claude/skills/skill-diet/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/skill-diet/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about skill-diet

How do I install skill-diet in Claude Code?

In Claude Code, run /plugin marketplace add nicobailon/skill-diet, then run /plugin install skill-diet@skill-diet. The skill is placed at ~/.claude/skills/skill-diet/SKILL.md.

What does skill-diet do?

It sorts skill content between description, SKILL.md, references/, and the tool’s own documentation. It also gives an editing and verification sequence for skill changes.

When does skill-diet run?

It is used before editing an existing skill, when a code change affects a name or behavior that the skill describes, and for a full diet of a large or drifted skill.

Source text

SKILL.md · MIT
---
name: skill-diet
description: Keep agent skills lean and correct. Use before editing an existing skill, such as adding a lesson; when a code change touches names or behavior a skill describes; and to put a skill on a full diet when it is large, loads detail most tasks never use, or has drifted from the tool it teaches.
metadata:
  version: 0.2.0
  creator: Nico Bailon
---

# Skill Diet

## Levels

Put each fact on the lowest level that still reaches the agent before it needs it.

| Level | Holds | Loaded |
| --- | --- | --- |
| `description` | one trigger per case | every session |
| `SKILL.md` | what every task needs | when the skill is used |
| `references/` | what only some tasks need, behind a link that says when to read it | when that case comes up |

A skill that teaches a tool has two more levels: the tool's help, then its replies and errors. Exact names, fields and values live there, not in the skill. A check on the skill's output (linter, tests, renderer) can replace a rule, unless one miss costs a slow cycle.

## Editing a skill

Stop at the first step that handles the change.

1. **Fix it below the skill.** A mechanical mistake gets a clearer error, a check, or a test in the tool. Prose is for judgment calls.
2. **Check the model needs it.** If a fresh session does the right thing without the line, add nothing.
3. **Edit, don't append.** Change the line that already covers the idea. Each meaning lives in one place across `SKILL.md`, references, and the tool's docs.
4. **Pick its level.**
5. **Write the rule, not the story.** One positive rule under a short name; the incident goes in the commit message.

**When code changes** a name or behavior the skill relies on, update the skill in the same change. Index new public operations by name only, unless agents will call them often. Run the skill's coverage check, or add one if drift could recur.

**Budget:** put `SKILL.md`'s size before and after in the commit message, and offset growth with a cut. When it is over 10% larger than at its last diet commit, or one idea appears in two places, do a full diet. `node scripts/eval.mjs check <skill-dir>` prints the size and checks links.

**Verify:** rerun the case that prompted the change in a fresh session, and any tests that assert the skill's text.

## Look up the rest

- Full diet of a large, bloated or drifted skill → [references/diet.md](references/diet.md)

© Nico Bailon · MIT · nicobailon/skill-diet

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set3

Project sponsors

Companies that keep this analytics open