被使用者糾正後,先分流(單純事實/偏好交給內建 auto memory,需要變成規則才進本流程),把規則寫成可長期沿用的條目記入 tasks/lessons.md。在使用者說「不對」「不是這樣」「我說過」或任何形式指出錯誤後立即使用;也用於定期把重複的 lesson 升級成 CLAUDE.md 規則、skill 或 hook。
Scanned 9/5/2026
Install to Claude Code
npx -y skills add curtischoutw/claude-institution --skill lesson --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Lesson?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/curtischoutw-lesson)More formats (shields.io, HTML) on the badges page.
---
name: lesson
description: 被使用者糾正後,先分流(單純事實/偏好交給內建 auto memory,需要變成規則才進本流程),把規則寫成可長期沿用的條目記入 tasks/lessons.md。在使用者說「不對」「不是這樣」「我說過」或任何形式指出錯誤後立即使用;也用於定期把重複的 lesson 升級成 CLAUDE.md 規則、skill 或 hook。
---
# lesson:把教訓寫成規則並升級
目的:讓每次糾正只發生一次。
## 0. 先分流:這是事實/偏好,還是規則?
- **單純事實/偏好/build 指令**(「這個專案用 pnpm」「使用者偏好簡短回報」)
→ 交給內建 auto memory(預設開啟、自動記錄,無人工步驟),不進本流程。
- **需要變成「以後都要遵守」的規則** → 走下面 A/B 節。
## A. 記錄一條新 lesson
先查重:在 `tasks/lessons.md` 搜尋關鍵字,已有同類條目 → 不新增,改走「B. 升級」。
用固定格式追加(檔案不存在才建立):
```markdown
## [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 只記一個模式;混多個就拆開。
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.
**Complete production-ready guide for Google Gemini embeddings API** This skill provides comprehensive coverage of the `gemini-embedding-001` model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering. ---
Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.