Skip to content
Agentmart
Submit a tool

encode-lessons

Use when a correction, failure, workaround, or instruction recurs, or when a costly mistake could be prevented structurally.

Skill by AnthonyPoschen

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/anthonyposchen-encode-lessons

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when a correction, failure, workaround, or instruction recurs, or when a costly mistake could be prevented structurally. Encode the lesson in the smallest durable guard instead of relying on someone to remember it.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/encode-lessons

What's inside

Skill name
encode-lessons
Description
Use when a correction, failure, workaround, or instruction recurs, or when a costly mistake could be prevented structurally. Encode the lesson in the smallest durable guard instead of relying on someone to remember it.
License
MIT
Instructions
70 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Encode Lessons in Structure

A repeated correction is evidence that attention is the wrong control. When a
small durable mechanism can prevent the same mistake, prefer it to another
reminder.

## Decide Whether The Lesson Is Durable

Treat a human correction, preventable failure, repeated workaround, or missed
instruction as a learning signal. Classify it before changing the system:

- **One-off:** fix the immediate problem. Do not create a permanent rule for a
  minor isolated event.
- **Recurring or costly:** find the smallest guard that prevents the pattern.
- **Requires judgment:** keep a clear instruction. Make the failure mode and
  the decision it requires obvious.

Do not confuse a vague preference with a proven pattern. A single high-risk or
high-cost mistake can still justify a durable guard.

## Choose The Strongest Suitable Guard

Prefer a mechanism that prevents the wrong path over text that asks someone not
to take it.

1. Make an invalid state impossible through data shape, types, or ownership.
2. Add a static check, lint rule, CI validation, or banned API.
3. Provide a canonical helper, template, generated structure, or safe default.
4. Validate at runtime when input is external or the condition is dynamic.
5. Use a concise rule and a concrete failure example when the decision cannot be
   enforced without judgment.

Choose the smallest mechanism that is reliable for the actual risk. Do not
build a framework, tool, or policy layer for a minor one-off preference.

## Close The Loop

When a durable guard is justified:

1. Put it in the layer that owns the failure.
2. Prove the guard catches the bad path or makes it impossible.
3. Remove or shorten any redundant reminder, while keeping useful rationale,
   exceptions, and user-facing documentation.
4. Leave the surrounding code, tooling, or skill easier to follow than before.

When the guard reaches beyond the current task's natural scope, report the
specific pattern and proposed guard. Do not start an unrelated framework or
repository-wide migration without approval.

## Avoid Weak Learning

- Do not promise to “remember” a recurring correction without recording or
  enforcing it.
- Do not fix one instance while leaving a known repeatable cause untouched.
- Do not record a lesson without giving it a concrete owner and next action.
- Do not preserve explanatory text that only repeats what a reliable mechanism
  now guarantees.

## Source

Adapted from Pstack's
[Encode Lessons in Structure principle](https://github.com/cursor/plugins/blob/main/pstack/skills/principle-encode-lessons-in-structure/SKILL.md).

## Related

- A comment that states a contract is a lesson waiting for a guard. The
  `coding` skill's comment rules and the [no-comments reference](../coding/references/no-comments.md) send those here.
- `scripted-verification` when the repeated work is judging results.

From AnthonyPoschen/agent-skills, MIT.

More from AnthonyPoschen/agent-skills

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Oct 15, 2026 (14 days ago)
Last release
Oct 14, 2026 (14 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from AnthonyPoschen

Cite this page

encode-lessons skill. Agent Mart. https://agentmart.dev/skills/anthonyposchen-encode-lessons (last updated 2026-10-24)