principle-encode-lessons-in-structure

principle-encode-lessons-in-structure is a skill for Claude Code from watt-mind/factory. It costs 46 tokens per session (160 once invoked), scanned A, original, Apache-2.0.

A method for turning repeated rules and lessons into automatic checks, such as a lint rule, schema check, or CI check. CI means automated checks that run when code changes.

In plain words
What is it for?
Use it to prevent recurring bugs, enforce data formats, add code-quality rules, and make build checks stricter over time.
Why use it?
Written instructions can be forgotten or applied inconsistently; a check can detect the same mistake every time and explain how to fix it.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the core plugin — 38 skills, 22 commands, 5 agents, 1 hook shipped together

Good fit Use it to prevent recurring bugs, enforce data formats, add code-quality rules, and make build checks stricter over time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/watt-mind/factory/principle-encode-lessons-in-structure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add watt-mind/factory --skill principle-encode-lessons-in-structure
Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 38 skills, 22 commands, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for principle-encode-lessons-in-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/watt-mind/factory/principle-encode-lessons-in-structure/github.svg)](https://agentmods.dev/skills/watt-mind/factory/principle-encode-lessons-in-structure)
Your own site
<a href="https://agentmods.dev/skills/watt-mind/factory/principle-encode-lessons-in-structure"><img src="https://agentmods.dev/badge/skills/watt-mind/factory/principle-encode-lessons-in-structure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for principle-encode-lessons-in-structure

Your own site · 80×15
<a href="https://agentmods.dev/skills/watt-mind/factory/principle-encode-lessons-in-structure"><img src="https://agentmods.dev/badge/skills/watt-mind/factory/principle-encode-lessons-in-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00160
Opus 5.5 $0.00018 $0.00064
Sonnet 5.5 $0.00009 $0.00032
Haiku 4.5 $0.00005 $0.00016

Measured 14d ago against content hash 528b3cbcdcc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

principle-encode-lessons-in-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/core/skills/principle-encode-lessons-in-structure/SKILL.md · 13 lines

What it actually says

Encode Lessons in Structure

Prose rules decay; mechanical checks compound. When a mistake recurs or a post-mortem reveals a sharp edge, encode the invariant in structure:

  • Deterministic checks over warnings: Add an ESLint rule, AST/script check, JSON schema constraint, CI --check gate, or baseline ratchet.
  • Teach in the error message: Make the failing check explain why it failed and point directly to the root-cause fix.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago First seen · 13 lines · 46 tokens per session scan A 528b3cbcdcc6

Subscribe to this mod's changes

principle-encode-lessons-in-structure is a skill published in the GitHub repository watt-mind/factory (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 46 tokens to every session and 160 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-16.

Related

principle-encode-lessons-in-structure compared with skills from other repositories

principle-encode-lessons-in-structure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
principle-encode-lessons-in-structurewatt-mind/factorySkill24yesterdayApache-2.0A46Claude Code
ap-depth-proberSpielewoy/autoprompt-skillSkill1.3k1mo agoMITA22Claude Code
ap-preflight-probeSpielewoy/autoprompt-skillSkill1.3k1mo agoMITA23Claude Code
reengineering-vibe-coderichfrem/agent-plugins-skillsSkill82d agoMITA124Claude Code
mutation-testingvmobifystudio/app-dev-teamSkill56d agoMITA65Claude Code
performance-reviewvmobifystudio/app-dev-teamSkill56d agoMITA54Claude Code
Systematic debuggingKilbex/ViglaSkill1142mo agoApache-2.0A26Claude Code, Codex