Skip to content

Guide · Agent skill

How to use the Minimal Code Discipline agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The minimal-code-discipline skill is a set of planning and coding rules for an AI agent that keeps code changes as small as possible while still correct. It is part of the oh-my-claudecode project and is licensed MIT. This guide explains what the skill changes about the agent's behaviour, how to install it, how to trigger it, and where it should not be used, so you can decide whether it fits your project.

Minimal Code DisciplineYeachan-Heo/oh-my-claudecode · MIT

Quick start

  1. 1Download the ZIP. Get the minimal-code-discipline ZIP from this skill's page in the directory.
  2. 2Unzip the folder. Extract the archive so you have a folder containing SKILL.md.
  3. 3Place it in the skills location. Copy the folder into ~/.claude/skills/ for your user account, or into .claude/skills/ inside a project.
  4. 4Or upload it in the apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
  5. 5Make a lean request. Ask for the change in plain words, such as asking for the smallest possible diff.
  6. 6Review the diff. Check that every added line is needed, that no helper was duplicated, and that the non-negotiables remain.

What is an agent skill, and what does this one do?

An agent skill is a folder containing a SKILL.md file that gives an AI coding agent extra instructions it can load when they are relevant. This skill, minimal-code-discipline, applies a YAGNI-style approach ("you aren't gonna need it") when the agent plans and writes code changes.

In practice, the agent is pushed to ask whether a change needs to exist at all, to search the codebase for existing helpers before writing new ones, and to prefer the standard library or already-installed tools over new dependencies. It also aims for the shortest correct diff and favours boring, obviously correct code over clever code.

  • Existence first: skip work that only serves a speculative future need.
  • Reuse before writing: look for an existing helper, type or pattern first.
  • Dependency ladder: standard library, then platform-native features, then an already-installed dependency, with hand-written code as the last resort.
  • Mark the ceiling: deliberate simplifications get a short comment naming the limit.
  • Root cause, not symptoms: fix bugs where every caller shares the problem.

What the skill never minimizes away

The skill has a list of non-negotiables. The agent must keep validation wherever a trust boundary is crossed, error handling that guards against data loss, security controls, accessibility fundamentals, and any scope you explicitly requested. Minimization pressure is not allowed to remove these.

If you ask for a broad or feature-rich build, the skill says your explicit scope wins, so it does not work against a request like that.

How do you install the minimal-code-discipline skill?

The skill ships as a folder with a single file, SKILL.md. You can download the ZIP from the skill's page on this directory and unzip it. Then place the folder in one of these locations:

  • For your user account: ~/.claude/skills/
  • For a single project: the .claude/skills/ folder inside the project
  • Or upload the ZIP in the Claude apps under Settings → Capabilities → Skills

How do you trigger the skill with natural requests?

You do not need a special command. The skill is meant to be used when you ask for lean code or when the work is starting to grow. The SKILL.md lists the situations it applies to, so phrase your request in ordinary words.

  • "Implement this with the smallest possible diff."
  • "Keep this lean, no speculative generality."
  • "Before adding a helper, check whether we already have one."
  • "Review this proposed change for size and scope creep before you write it."
  • "Don't add a new dependency if a few lines will do."

Examples of what changes in practice

Suppose you ask for a small change to format a date in an existing report. With this skill, the agent first searches the codebase for a date formatting helper, reuses it if one exists, and avoids adding a date library unless you approved one. It still validates input that comes from outside the program.

Another example: a bug is reported from three screens that all call the same function. The skill directs the agent to fix the shared cause once rather than patch each screen separately.

What do you need and what are the safety notes?

The skill lists no requirements. It does not run scripts and does not use the network, according to its listing. It is a set of written instructions, so the agent's behaviour still depends on the tools and project you give it.

Use the skill as guidance, and still review the diffs it produces. The Verification section asks the agent to confirm that tests pass and that behaviour is unchanged except as requested, but your own review and test suite remain the real check.

Tips for getting the best results

State your scope clearly. The more precisely you describe what you want, the less room there is for the agent to guess. Pair this skill with a clean-up skill if you want it: the source says ai-slop-cleaner cleans code after it lands, while this skill keeps it from being written.

Say when a throwaway prototype is throwaway, because the skill says not to apply it to exploratory scaffolding.

  • Name the existing helper or module if you know it.
  • Say explicitly if you approve a new dependency.
  • Ask for a size review before implementation on large changes.

What people use it for

  • Keeping a small bug fix from growing into a refactor
  • Checking that a new feature reuses existing helpers instead of duplicating them
  • Reviewing a proposed change for scope creep before the agent writes it
  • Avoiding new dependencies when standard library or installed tools are enough

Frequently asked questions

Is the minimal-code-discipline skill free?

The skill is licensed under the MIT licence, as stated on this page. Check the license file in the source repository for the full terms.

How do I install the minimal-code-discipline skill?

Download the ZIP from this page and unzip it. Put the folder in ~/.claude/skills/ for your account or .claude/skills/ inside a project, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.

What does the skill require?

The listing says it requires nothing beyond the skill file itself. It does not run scripts and does not use the network.

Will this skill stop the agent from writing validation and error handling?

No. The skill lists validation at trust boundaries, error handling that guards against data loss, security controls, accessibility basics and explicitly requested scope as non-negotiables that are never minimized away.

When should I not use this skill?

Do not use it for requests for broad, feature-rich or future-proofed builds, because your explicit scope wins. Also skip it for throwaway or exploratory scaffolding.

How is this different from ai-slop-cleaner?

According to the source, ai-slop-cleaner cleans up slop after code lands, while minimal-code-discipline aims to keep that slop from being written in the first place.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers and teams who keep getting bloated code, duplicated helpers or unneeded dependencies from their agents, and who want reviewable, small diffs. It is a poor fit for ambitious feature builds or throwaway prototypes, where its minimizing bias works against the goal. Use it when the scope is clear and you want restraint.

Download the skill