skill-diet — скилл для Claude Code: что делает и как установить
Скилл skill-diet для Claude Code помогает держать агентные скиллы короткими и точными. Он включается перед правками, затрагивающими их правила или поведение.
MIT ★ 262 обновлён 2026-11-06
/plugin marketplace add nicobailon/skill-diet
/plugin install skill-diet@skill-dietЧто делает skill-diet
skill-diet разбирает агентный скилл по уровням загрузки: триггеры остаются в description, общие правила — в SKILL.md, редкие детали — в references/. Для инструментов он предлагает опираться на встроенную справку, ответы и ошибки, а точные имена и значения не дублировать в тексте скилла.
При редактировании скилла он ведёт от исправления в инструменте или проверке к точечной правке существующего правила. Изменение имени или поведения инструмента требует обновить связанный скилл в той же правке. Команда node scripts/eval.mjs check <skill-dir> проверяет ссылки и печатает размер; полный разбор нужен, когда SKILL.md вырос больше чем на 10% после последней диеты или одна идея повторяется в двух местах.
После изменения предлагается повторить исходный сценарий в новой сессии и запустить тесты текста скилла. Рабочий файл устанавливается в ~/.claude/skills/skill-diet/SKILL.md для Claude Code.
Какие задачи решает
- сократить
SKILL.md, перегруженный деталями - разнести правила по уровням загрузки
- убрать повтор одной идеи из разных файлов
- синхронизировать скилл с изменившимся именем или поведением инструмента
- проверить ссылки и размер скилла
Примеры запросов агенту
- Разбери существующий скилл и перенеси редкие детали в
references/. - В коде изменилось имя операции. Обнови связанный скилл и запусти
node scripts/eval.mjs check <skill-dir>. - Проведи полную диету скилла, если он вырос больше чем на 10% после последней диеты.
Как установить skill-diet
1Через маркетплейс плагинов
/plugin marketplace add nicobailon/skill-diet/plugin install skill-diet@skill-dietКоманда ставит плагин skill-diet целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add nicobailon/skill-diet --skill skill-diet -a claude-code3Вручную: положить файлы
~/.claude/skills/skill-diet/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/skill-diet/
1Через Skills CLI (Vercel)
npx skills add nicobailon/skill-diet --skill skill-diet -a codex2Вручную: положить файлы
.agents/skills/skill-diet/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add nicobailon/skill-diet --skill skill-diet -a cursor2Вручную: положить файлы
.cursor/skills/skill-diet/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install nicobailon/skill-diet skills/skill-diet2Вручную: положить файлы
.github/skills/skill-diet/SKILL.md1Через Skills CLI (Vercel)
npx skills add nicobailon/skill-diet --skill skill-diet -a gemini-cli2Командой платформы
gemini skills install https://github.com/nicobailon/skill-diet --path skills/skill-dietВручную: положить файлы
.devin/skills/skill-diet/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о skill-diet
Как установить skill-diet в Claude Code?
В Claude Code выполни /plugin marketplace add nicobailon/skill-diet и затем /plugin install skill-diet@skill-diet. Скилл появится в ~/.claude/skills/skill-diet/SKILL.md.
Что делает skill-diet?
Он помогает распределить сведения между description, SKILL.md, references/ и документацией инструмента. Также скилл задаёт порядок правок и проверки после изменения.
Когда запускается skill-diet?
Он используется перед редактированием существующего скилла, при изменении имён или поведения, которое скилл описывает, а также для полной диеты крупного или устаревшего скилла.
Исходный текст
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