minimalist
它能做什么
在编写任何新代码之前,它会应用一份简短的检查清单,例如询问该功能是否真的需要,以及标准库是否已经能实现它。适合希望代码精简、依赖较少的人。
适用场景
- ✓当你希望智能体不要把一个小任务过度设计时。
- ✓当你想减少项目中的依赖时。
- ✓当你要求用最少的代码解决某个问题时。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/minimalist/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用尽可能少的代码解决这个问题;如果标准库能完成,就不要添加新的软件包。”
每周 5 个新技能,1 分钟读完。
工作原理
在写任何内容之前,智能体会按照一个由易到难的选项阶梯逐步推进,从询问功能是否真的需要,到复用现有代码,然后才编写最小的可用版本。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Minimalist
You are highly efficient. The best code is the code never written.
Overview
Use this skill whenever the goal is to solve a problem with the least code possible. It prevents common AI failure modes: inventing helper classes for single-use logic, installing packages for one-line operations, and producing boilerplate that the user will never need.
The Efficiency Ladder
Before writing any new code, stop at the first rung that holds:
- YAGNI — Does this need to be built at all? If the user hasn't asked for it, don't build it.
- Reuse — Does it already exist in this codebase? Find the helper, util, or pattern and reuse it.
- Standard Library — Does the standard library already do this? Use it directly.
- Native Platform — Does a native platform feature cover it? Use it.
- Existing Dependency — Does an already-installed dependency solve it? Use it.
- One-Liner — Can this be one line? Make it one line.
- Minimum Code — Only then, write the minimum code that works.
Rules of Engagement
- No unrequested abstractions: Do not invent interfaces, base classes, or generics for future-proofing unless the user explicitly asks.
- No unnecessary dependencies: If the standard library can do it cleanly, do not install a package.
- No boilerplate: Deletion over addition. Boring over clever. Fewest files possible.
- Question complex requests: Ask "Do you actually need X, or does Y cover it?" before building X.
- Shortest working diff wins: But only once you understand the problem. The smallest change in the wrong place isn't lazy — it's a second bug.
Workflow
When asked to implement something:
- Pause before writing code.
- Walk the ladder — can rungs 1–6 resolve this without new code?
- State your decision — "Using stdlib
pathlibinstead of a custom file helper." - Write minimum code only if the ladder doesn't resolve it.
- Do not add comments, logging, or error handling that wasn't asked for.
Anti-Patterns
| Anti-Pattern | What to do instead |
|---|---|
| Installing a package for a one-liner | Use the standard library |
| Writing a class for a single function | Write the function |
| Adding a config file for a single hardcoded value | Hardcode it until there are 2+ uses |
| Creating a utility module before it's reused anywhere | Write inline, extract later |
| Adding docstrings/comments the user didn't ask for | Skip them |
| Building error handling for errors that can't happen | Skip it |
| Adding logging before the code works | Ship the code first |
Cross-References
- Related:
engineering/strict-api— prevents hallucinated APIs when writing minimal code; use together. - Related:
engineering/zero-hallucination-coder— enforces verified-only API usage. - Related:
engineering/karpathy-coder— Karpathy-inspired behavioral guidelines for LLM-assisted coding.
常见问题
它会跳过我要求的功能吗?
不会。它避免你没有要求的功能,但仍会交付任务所需的内容。
它会安装软件包吗?
当标准库或现有依赖能完成工作时,它会避免使用新的软件包。
它问的第一个问题是什么?
这项工作是否真的需要做。因为最好的代码,就是从未被编写的代码。
详情
作者的原始描述
Use when asked to avoid over-engineering, cut dependencies or write the least code. Applies a strict ladder before any new code: YAGNI, reuse, stdlib, native platform, existing deps.
热度
- GitHub 星标
- 29k
- 排名
- #9568
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。