Skip to content
Agentmart
Submit a tool

principle-encode-lessons-in-structure

Apply when you write the same instruction a second time or notice a recurring correction.

Skill by hellsan631

IndexedMIT
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/hellsan631-principle-encode-lessons-in-structure

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

Apply when you write the same instruction a second time or notice a recurring correction. Replace repeated text with a lint, metadata flag, runtime check, or script.

Use cases: writing

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/principle-encode-lessons-in-structure

What's inside

Skill name
principle-encode-lessons-in-structure
Description
Apply when you write the same instruction a second time or notice a recurring correction. Replace repeated text with a lint, metadata flag, runtime check, or script.
License
MIT
Instructions
38 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • openai.yaml · agents/

SKILL.md (first lines)

# Encode lessons in structure

Enforce recurring fixes with tools, code, metadata, or automation. Treat every error, human correction, and unexpected outcome as a lesson: record it, decide where it belongs, and act on it.

Textual instructions depend on the reader noticing, remembering, and following them. Lint rules, metadata flags, runtime checks, and automation scripts enforce the rule without that cooperation.

## Pattern

When you catch yourself writing the same instruction a second time:
1. Ask whether a lint rule, metadata flag, runtime check, or script can enforce it.
2. If one can, implement that mechanism and delete the instruction.
3. If the rule genuinely requires judgment, keep the instruction, make it more prominent, and add an example of the failure mode.

## Choose the mechanism

When several mechanisms would work, choose the strongest one the situation allows, in this order:
1. Make the invalid state unrepresentable so it cannot compile.
2. Add a lint or banned API that fails CI.
3. Provide a canonical helper.
4. Add a runtime check.

Agents copy what the surrounding code already does, so a weaker guard becomes the next template.

When a fix is structural, make only the structural fix and delete the textual instruction that exposed the symptom.

## Handle feedback

- When a human intervenes or a test fails, decide whether the correction is a one-off or a pattern.
- Put a one-off in a brain note, a recurring fix in a skill or lint rule, and a systemic issue in a principle.
- Apply the lesson now or create a concrete todo. Recording it alone does not close the loop.

## Failure modes

- Saying "I'll keep that in mind" without recording the correction does not persist.
- A brain note cannot enforce a lint rule. Implement the lint rule in the right layer.
- Fixing one instance while leaving the recurring pattern intact does not generalize the fix.

From hellsan631/skills, MIT.

More from hellsan631/skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Aug 29, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from hellsan631

Cite this page

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