Install
openclaw skills install @escoffier-labs/demiUse before implementing, scaffolding, prototyping, or adding a feature when the work should start with the smallest useful code path, avoid speculative architecture, or prevent overbuilding before reduce would be needed.
openclaw skills install @escoffier-labs/demiA demi-glace starts concentrated. Nothing extra goes in just because the kitchen has it nearby. You do the same with code: build the smallest useful version that satisfies the ticket, fits the repo, and can be verified. Complexity has to earn its way into the pan.
Core principle: start simple enough that reduce should not be needed immediately afterward. Small means understandable and verifiable, not cramped. The shortest version that hides intent is not demi; it is just dense.
Before writing custom code, stop at the first rung that holds:
The ladder is quick. Do not turn it into a research project. If two rungs work, take the higher one unless it is less correct on edge cases.
Run this before editing:
Before adding a new layer, answer these. If any answer is no, keep it local.
Prefer these moves:
Do not build these unless the current task proves they are needed:
demi is not permission to be careless. Never simplify away:
A simple implementation without a check is not finished. Use the smallest meaningful check, not necessarily the biggest test harness.
If the small version has a known ceiling, name it in the plan or final report. Add an inline comment only when future maintainers would otherwise mistake the simplification for ignorance.
Examples:
Global lock is fine for single-user CLI; move to per-account locks if concurrent accounts matter.Linear scan is fine below the current file sizes; index when measured input size makes it hot.Native date input is enough here; custom picker only if design or browser support requirements change.For non-trivial work, write this before editing:
## demi: <task>
Actual ask: <one sentence>
Smallest useful slice: <what will work when done>
Highest rung that holds: existing behavior | repo primitive | stdlib | platform | installed dependency | local change | custom code
Existing pattern to follow: <file/helper/test/component>
Cut from scope: <what is intentionally not being built>
Growth trigger: <what would justify expanding later>
Verification: <command/check/user-visible proof>
Keep it short. This is a guardrail, not a design doc.
demi is apply-by-default. After the quick pass, implement the smallest slice unless the task is architectural, public-interface-heavy, security-sensitive, under-specified in a way that changes the outcome, or the user explicitly asks for options first. In those cases, report the demi plan and wait.
For large work, combine with recipe: use demi to keep each recipe task small, vertical, and verifiable.
| Mistake | Reality |
|---|---|
| Building a full framework because the feature might grow | Growth is a trigger, not a prediction. Ship the slice. |
| Adding config before there are real variants | One value can be code. Two may still be code. Three starts a conversation. |
| Creating a generic utility from one use | That is not reuse, it is disguise. Keep it local. |
| Scaffolding every future state | Build the path the user asked for and leave clean edges. |
| Calling fewer files "less complex" | A thousand-line god file is not demi. Small means understandable, not cramped. |
| Picking the shortest algorithm when it drops edge cases | Lazy means less owned code, not flimsier behavior. Correctness wins ties. |
| Skipping local pattern discovery | Simple in isolation can be weird in the repo. Match the kitchen. |
| Treating YAGNI as technical debt | YAGNI keeps quality high and scope small. Skimping leaves a mess for later. |