The rules

38 rules in four skills. Each rule file says how to detect the problem in code (Python, TypeScript and Go), the smallest fix, what the fix must not break, and how to verify it. Your assistant loads a rule only when its skill points at it.

prefill-cache

Makes prompts that the provider's cache can reuse, so the app stops paying full price to prefill the same tokens on every call. Twelve rules, LP-PC-01 to LP-PC-12, each in its own file under rules/, each with a way to detect it in code, the smallest fix, what the fix must not break, and how to verify it.

generation-economy

Stops paying to generate, or to prefill again, what one call could have produced. Seventeen rules, LP-GE-01 to LP-GE-17, each in its own file under rules/, each with a way to detect it in code, the smallest fix, what the fix must not break, and how to verify it.

RuleTitleSavesSeverity
LP-GE-01n samples in one requestPrefillmedium
LP-GE-02Batch independent questions about one contextPrefill and generationmedium
LP-GE-03Output and thinking budgets that fit the taskGenerationhigh
LP-GE-04Stream long outputs; timeouts that match generation timePrefill and generationhigh
LP-GE-05Retry only retryable errors; never retry a truncation unchangedPrefill and generationhigh
LP-GE-06Cache exact responses for deterministic requestsPrefill and generationmedium
LP-GE-07Batch API for work that can waitPrefill and generationmedium
LP-GE-08Route trivially small calls to a small modelPrefill and generationmedium
LP-GE-09Predicted outputs for mostly unchanged textGenerationlow
LP-GE-10Structured output instead of parse-and-re-askGenerationhigh
LP-GE-11Meter every billed token, cached and unfinished ones tooNo tokens: a correctness rule, recorded as a notemedium
LP-GE-12Read the finish reason before using an answerNo tokens: a correctness rule, recorded as a notehigh
LP-GE-13Default to a model the provider still servesNo tokens: a correctness rule, recorded as a notehigh
LP-GE-14Build both sides of a cache or change key the same wayPrefill and generationhigh
LP-GE-15Give each timeout one meaning, and set oneNo tokens: a correctness rule, recorded as a notemedium
LP-GE-16Fall back to another model only on errors it can fixNo tokens: a correctness rule, recorded as a notemedium
LP-GE-17Send the output cap the owner set, on every pathNo tokens: a correctness rule, recorded as a notemedium

prompt-diet

Cuts dead weight from what each call sends: tools the call cannot use, instructions said twice, reminders sent on every turn, tool results and retrieved context passed whole, old turns that no longer bear on the answer, and data serialised with more characters than it needs. Six rules, LP-PD-01 to LP-PD-06, each in its own file under rules/, each with a way to detect it in code, the smallest fix, what the fix must not break, and how to verify it.

lmwarden

What to do when the model runs on your own hardware: when that is the right choice, which engine settings change prefix-cache reuse, how to keep a conversation on the replica that holds its cache, and how to share one server between apps without mixing their usage or their caches. Three rules, LP-LW-01 to LP-LW-03, each in its own file under rules/.