ivan-magda

Instruction Health Skills — AI skill for Claude Code

AI community

Agent skills to keep AI instruction files (AGENTS.md, CLAUDE.md, MEMORY.md) lean.

How to install Instruction Health Skills

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ivan-magda/instruction-health-skills and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Instruction Health Skills does

Agent skills to keep AI instruction files (AGENTS.md, CLAUDE.md, MEMORY.md) lean. Guardian runs before edits to prevent bloat; cleanup restructures bloated files. Works with any AGENTS.md-aware tool.

Alternatives in AI

  • Humanizer-zh: 去除 AI 写作痕迹 — 你是一位文字编辑,专门识别和去除 AI 生成文本的痕迹,使文字听起来更自然、更有人味 5k ★
  • Mancode — AI coding agent harness 358 ★
  • Code CLI — Open-source terminal coding agent 205 ★

README

Instruction Health Skills

Agent skills that keep AI assistant instruction files (AGENTS.md, CLAUDE.md, MEMORY.md) lean.

Two skills work together: a **guardian** that runs before an instruction file is edited to prevent bloat, and a three-phase **cleanup** for files that have already grown too large. They work with Claude, Cursor, Windsurf, Copilot, Codex, and other AI coding assistants that support the Agent Skills / AGENTS.md format.

Table of Contents

Background

My team's `CLAUDE.md` hit Claude Code's 40k-character warning at 519 lines, grown over three months. The cost wasn't token count. Instruction-following degrades as the file grows, so a bloated instruction file makes the agent worse at every rule it holds, not only the ones it skips. I cleaned ours up by hand and cut always-loaded context by 73% ([writeup](https://ivanmagda.dev/posts/fixing-40k-claude-md-warning-monorepo/)). These two skills codify that routine: one prevents the bloat, one fixes it once it lands.

Treat the instruction file as a prompt budget. Spend it on rules the agent needs in front of it every turn.

Philosophy

These skills handle context-budget hygiene as a set of facts, leaving opinions about what belongs in your instruction file to you.

**Covered:**

  • Routing: every piece of content has one correct destination (instruction file, skill, rule, doc, memory, or delete).
  • Context budget: measuring, condensing, and preventing re-bloat of always-loaded context.
  • Compaction survival: which content survives /compact and which disappears.

**Intentionally excluded:**

  • Team workflow opinions. No mandate on what goes in CLAUDE.md vs AGENTS.md vs team docs.
  • Naming conventions. No rules about skill names, doc paths, or file structure.
  • Prescripti