lesson

lesson is a skill for Claude Code, Codex from curtischoutw/claude-institution. It costs 111 tokens per session (783 once invoked), scanned A, original, MIT.

A workflow for turning corrections into written rules that can be reused in later coding sessions. It records the situation, the mistake, the correct action, and a clear if-then test.

In plain words
What is it for?
Use it after a user points out an error, to check for duplicate lessons, add a dated entry to tasks/lessons.md, and decide whether a repeated rule belongs in configuration or project guidance.
Why use it?
It helps prevent the same mistake from happening repeatedly and can promote recurring lessons into project rules, skills, or automated checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it after a user points out an error, to check for duplicate lessons, add a dated entry to tasks/lessons.md, and decide whether a repeated rule belongs in configuration or project guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/curtischoutw/claude-institution/lesson
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 curtischoutw/claude-institution --skill lesson
Clone the repo
git clone --depth 1 https://github.com/curtischoutw/claude-institution

Made for: Claude Code, Codex.

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 lesson

README.md
[![agentmods](https://agentmods.dev/badge/skills/curtischoutw/claude-institution/lesson/github.svg)](https://agentmods.dev/skills/curtischoutw/claude-institution/lesson)
Your own site
<a href="https://agentmods.dev/skills/curtischoutw/claude-institution/lesson"><img src="https://agentmods.dev/badge/skills/curtischoutw/claude-institution/lesson/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 lesson

Your own site · 80×15
<a href="https://agentmods.dev/skills/curtischoutw/claude-institution/lesson"><img src="https://agentmods.dev/badge/skills/curtischoutw/claude-institution/lesson.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 783 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.00111 $0.00783
Opus 5 $0.00056 $0.00392
Sonnet 5 $0.00022 $0.00157
Haiku 4.5 $0.00011 $0.00078

Measured 9d ago against content hash 2afde190f9c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

lesson 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 9d 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.

institution/skills/lesson/SKILL.md · 49 lines

What it actually says

lesson:把教訓寫成規則並升級

目的:讓每次糾正只發生一次。

0. 先分流:這是事實/偏好,還是規則?

  • 單純事實/偏好/build 指令(「這個專案用 pnpm」「使用者偏好簡短回報」) → 交給內建 auto memory(預設開啟、自動記錄,無人工步驟),不進本流程。
  • 需要變成「以後都要遵守」的規則 → 走下面 A/B 節。

A. 記錄一條新 lesson

先查重:在 tasks/lessons.md 搜尋關鍵字,已有同類條目 → 不新增,改走「B. 升級」。

用固定格式追加(檔案不存在才建立):

## [YYYY-MM-DD] <一行標題:動詞開頭>
- 觸發情境:<具體到下一個 session 能比對,含檔名/指令/使用者原話>
- 錯誤行為:<我實際做了什麼>
- 正確行為:<應該做什麼,可執行的一步步>
- 判準:<一句 if-then,讓弱模型能機械式套用>
- 狀態:first-hit

判準欄位不可空白:寫不出 if-then 表示還沒想清楚,再想。太抽象等於沒寫—— 壞例「要更小心測試」對照好例「改任何公開函式簽名前先 grep 所有呼叫端」,差別在 後者具體到下一個 session 能直接比對情境,不是換個說法重複同一句空話。

B. 升級(同一 lesson 第 2 次被觸發時)

  1. 把該條目的 狀態:first-hit 改為 狀態:promoted-to:<位置>
  2. 依「制度分層」選升級目的地:
    • 規則可用程式判定(如「禁止 commit 含 console.log」)→ 用 /update-config 做成 hook。最優先。
    • 1–2 行寫得完、每次都適用 → 加進 CLAUDE.md 的「硬規則」,加一條前先看能否刪一條。
    • 多步驟程序 → 寫成 skill,CLAUDE.md 留一行觸發指引。
  3. lessons.md 的原條目保留(作為升級紀錄),不刪除。

鐵則

  • 糾正發生的當下就記,不要等任務結束(會忘)。
  • 一條 lesson 只記一個模式;混多個就拆開。
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. 9d ago First seen · 49 lines · 111 tokens per session scan A 2afde190f9c6

Subscribe to this mod's changes

lesson is a skill published in the GitHub repository curtischoutw/claude-institution (5 stars, last pushed 9d ago), licensed MIT. It adds 111 tokens to every session and 783 once invoked, about $0.0006 per session on Opus 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-08-31.

Related

Other skills, from other repositories

handoff

Write a compact, decision-ready handoff so the next session (or the user) can continue without reconstructing the current one. Use when the session is ending, context is running low, the user asks for a handoff / "pass the baton" / "hand off", or a long-running operation needs a durable state checkpoint.

Hmbown/CodeWhale · 70 tokens

create-notes

Write a note to {shareddir}/notes/ that future agents can actually act on. Use after every coral eval, when a heartbeat (reflect / consolidate / pivot) asks for a note, or when you discover a grader / build / runtime issue that future agents will hit. Covers 4 note variants (experiment / infra / focus / synthesis)…

Human-Agent-Society/CORAL · 217 tokens

fable-method

A step-by-step problem-solving loop (classify the ask, define done, gather evidence, decide, act surgically, verify by observation, report outcome-first). Use when the user says "/fable-method", "use the fable method", or "approach this like Fable", or proactively when starting any multi-step task that no…

Sahir619/fable-method · 105 tokens

fable-domain

Discuss a domain with the user, research it from real sources, then generate a trusted skill bundle for it - a step-by-step workflow with a flowchart, a domain adapter, a trap fixture, and a smoke eval. Use when the user says "/fable-domain ", "make a skill for ", "add a domain to the fable method", or "give a lesser…

Sahir619/fable-method · 115 tokens

general

Handle everyday conversation, answer questions, manage files, take notes, run scripts, and maintain persistent memory across sessions. Use when the user asks a general question, requests file operations, wants to brainstorm ideas, needs to-do tracking, asks you to remember something, or requests skill search and…

0xranx/golembot · 61 tokens

kb-guide

Search, read, create, and update knowledge base entries via MCP-connected KB tools. Use when the user asks to look up documentation, find existing articles, check if docs exist on a topic, create a new KB entry, update an existing document, or when domain questions should be answered from the knowledge base first.

0xranx/golembot · 66 tokens