Lean Code logo

Lean Code

Community
AnastasiyaW
lean-code

On-demand minimalism intensifier — find the smallest sufficient, verified implementation for the requested outcome. Use when the user says "be lazy / yagni / simplest / minimal / shortest / don't over-engineer", complains about bloat / boilerplate / unnecessary dependencies / abstraction, or before writing a substantial chunk of new code. Supports intensity: lite / full / ultra. Pairs with the always-on quality-code rule and the over-engineering-advisor hook. Do NOT use as a general code-review or bug-hunting pass — it only removes over-building and will not find unrelated correctness defects; use /code-review or /review for those.

Overview

PublisherAnastasiyaW
Repositorycodex-claude-code-config
Skill namelean-code
Stars
212
Forks
32
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AnastasiyaW on GitHub. Read the source before you install it.

Installation

Install the Lean Code AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/lean-code
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git /tmp/codex-claude-code-config
mkdir -p .claude/skills
cp -r /tmp/codex-claude-code-config/skills/lean-code .claude/skills/lean-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Lean Code in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Lean Code on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Lean Code is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Lean Code

Aggressive YAGNI mode, on demand. The always-on baseline is rules/quality-code.md; this skill is the intensifier you invoke when minimalism matters most. The win is the smallest solution that fully satisfies the accepted task outcome, not the fewest lines or the shortest explanation.

The ladder — stop at the first rung that holds

Choose a rung only when it preserves the accepted architecture, contracts, and non-functional requirements; installed/native status alone does not justify crossing an established project boundary.

  1. Does this need to exist at all? Speculative need → skip it, say so in one line. (YAGNI)
  2. Stdlib does it? Use it.
  3. Native platform feature covers it? (<input type="date"> over a picker lib, CSS over JS, a DB constraint over app code.)
  4. An already-installed dependency solves it? Use it. Never add a new dependency for what a few lines do.
  5. Can the accepted behavior safely be one line? Prefer it; do not contort control flow, validation, or errors merely to make it fit.
  6. Only then — the minimum code that works.

The ladder is a reflex, not a research project: two rungs hold → take the higher one and move on.

Intensity

  • lite — build what the user asked; mention one leaner alternative only when it materially helps. Do not pause accepted implementation for an optional choice. Ask only when an unresolved decision materially changes the requested outcome or authority.
  • full — enforce the ladder; prefer stdlib/native and the smallest sufficient, verified diff. (Default.)
  • ultra — challenge a requested mechanism, scope assumption, or speculative extension against the required outcome; do not challenge an explicit user decision merely to reduce code. Once retained, implement it without re-arguing.

When NOT to be lean (load-bearing — never simplify these away)

Input validation at trust boundaries · error handling that prevents data loss · security · accessibility · the calibration real hardware needs · anything the user explicitly asked to keep. Lean ≠ incomplete: non-trivial logic leaves one runnable check behind (assert-demo or one small test). User insists on the full version → build it, no re-arguing.

Hard boundary — lean targets OVER-building, never completeness

This is orthogonal to thoroughness. "Minimal" means less unnecessary complexity while delivering every accepted branch, not fewer branches done, a lower line count, or a shortcut. It must never excuse under-delivery, skipped verification, or a hack — see rules/finish-the-task.md (its completeness + quality pillars win) and rules/quality-code.md (the no-monkey-patch pole). Mark a deliberate shortcut with a simplification: comment naming the ceiling + upgrade path.

Output

Complete and verify the requested result first. Then use at most three short lines for what was deliberately skipped and the trigger to add it. Do not suppress an explanation needed to document a safety boundary, user decision, or upgrade path. Read the surrounding code and requirements before pruning — prune to the task, not to a blanket rule.

Why this works (evidence, not marketing)

GitClear's 2025 report observed rising copy/paste and falling moved-line rates across 211M changed lines; Faros observed higher team task/PR throughput alongside slower review and no demonstrated organization-wide gain. Those are ecosystem signals, not proof that a particular agent or diff is bloated. A "do I even need this?" check is therefore useful, but not a line-count target. GitClear · Faros

Generic prompt additions can trade one measured behavior for another in small local experiments; they do not establish a universal minimalism rule. Keep this on-demand and advisory, then evaluate its instructions on representative held-out tasks. arXiv:2601.22025

Gotchas

  • A one-liner is worse when it hides a required failure path, access need, or future-maintenance boundary.
  • ultra can question how to achieve an outcome; it cannot silently remove an outcome or override the user's retained choice.

Troubleshooting

  • The diff is short but a required behavior vanished. Restore the behavior, then remove only the unnecessary mechanism around it and run the smallest relevant check.
  • A simplification has an explicit scale or correctness ceiling. Keep the simple version only with its simplification: ceiling and upgrade trigger; otherwise implement the proper architecture now.

Frequently asked questions

What does the Lean Code AI skill do?

On-demand minimalism intensifier — find the smallest sufficient, verified implementation for the requested outcome. Use when the user says "be lazy / yagni / simplest / minimal / shortest / don't over-engineer", complains about bloat / boilerplate / unnecessary dependencies / abstraction, or before writing a substantial chunk of new code. Supports intensity: lite / full / ultra. Pairs with the always-on quality-code rule and the over-engineering-advisor hook. Do NOT use as a general code-review or bug-hunting pass — it only removes over-building and will not find unrelated correctness defec...

Why use Lean Code on TypingMind?

Because you install it once and use it with any model. Lean Code is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Lean Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/lean-code. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Lean Code?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Lean Code?

As many as you like. As long as a model supports skills, you can use Lean Code with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Lean Code AI skill free?

Yes. It is published on GitHub by AnastasiyaW under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇