# Fix a repeated mistake in structure, not with one more instruction

When the same correction comes up a second time, it picks the cheapest guard that holds it (a type, a lint rule, a hook or a script) instead of adding another line of text.

Free, to use and to change. What it can see: only the chat you add it to.

Its short name: encode-lessons. [Source on GitHub](https://github.com/mbsi-labs/skills/tree/main/plugins/encode-lessons/skills/encode-lessons).

## Who it helps

> **Helps:** "I told my agent the same thing twice and it did it again."

> **Does not help:** A lesson that needs judgement and no guard can hold, which stays a prominent line with one real example.

## Install

Pick the one you use.

### Claude Code

> **Tested:** This install worked when we tried it.

```
/plugin marketplace add mbsi-labs/skills
/plugin install encode-lessons@skills
```


## Changelog

- 2026-10-28 (2dbcdfa): dig-apc and encode-lessons: each step stands alone for a reader without our other skills
- 2026-10-16 (6f94f8b): Start mbsi-skills with five short-name skills adapted from pstack

Licence: MIT.

## The skill itself

The second time a lesson comes up, the text failed. Hold it with structure instead.

- Pick the cheapest guard that holds it: a type, then a lint rule, then a hook or mod, then a script or test step.
- If the fix is structural, ship only the structural fix. Delete the instruction it replaces; the instruction was the symptom.
- If the lesson needs judgement and no guard can hold it, make the line more prominent and add one real example of the failure.
- Record the lesson's origin (the user's words, with the time) on the ticket, not in the guard.

Example: "never auto-compact" was a habit to remember. It became `DISABLE_AUTO_COMPACT` in settings.

---

First published 2026-10-16, updated 2026-10-28. Web page: https://www.mackenziebowes.com/skills/encode-lessons Part of [Skills](https://www.mackenziebowes.com/skills).
