lesson

A project memory tool that records mistakes, cautions, and useful patterns in `.claude/lessons.md` for later work sessions.

In plain words
What is it for?
Use it to add lessons by category, list saved lessons, and review or remove lessons older than 90 days or repeated entries.
Why use it?
It helps prevent repeated mistakes and keeps practical lessons from getting lost between sessions. It can also find duplicate or outdated lessons for cleanup.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/hyperaiteam/clitrigger/lesson
Any agent
npx skills add HyperAITeam/CLITrigger --skill lesson
Clone the repo
git clone --depth 1 https://github.com/HyperAITeam/CLITrigger

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 768 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.00768
Opus 5 $0.00017 $0.00384
Sonnet 5 $0.00007 $0.00154
Haiku 4.5 $0.00003 $0.00077

Measured 2d ago against content hash c15a5b968c93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

.claude/skills/lesson/SKILL.md · 87 lines

What it actually says

교훈 캡처

목적

작업 중 발견한 실수, 주의사항, 유용한 패턴을 .claude/lessons.md에 기록하여 다음 세션에서 반복을 방지합니다.

카테고리

카테고리 키워드 용도
실수 (Mistakes) 실수, mistake, 금지, 하지마 반복하면 안 되는 실수
주의 (Cautions) 주의, caution, 조심, 확인 작업 시 주의할 점
패턴 (Patterns) 패턴, pattern, 순서, 방법 따라야 할 올바른 패턴

워크플로우

Step 1: 인수 파싱

사용자 인수를 분석합니다:

  • 카테고리: 내용 형식이면 카테고리를 직접 사용
  • 카테고리 없이 내용만 있으면 키워드 기반으로 자동 판별:
    • "~하지 마", "금지", "실수" → 실수
    • "조심", "확인", "주의" → 주의
    • "순서", "방법", "패턴", "~할 때" → 패턴
  • 판별이 모호하면 AskUserQuestion으로 질문

인수가 비어있으면 AskUserQuestion으로 교훈 내용을 질문합니다.

Step 2: 중복 확인

.claude/lessons.md를 읽고 비슷한 교훈이 이미 있는지 확인합니다.

  • 핵심 키워드가 70% 이상 겹치는 항목이 있으면 사용자에게 알림
  • 기존 항목을 업데이트할지 새로 추가할지 AskUserQuestion으로 질문

Step 3: 교훈 추가

.claude/lessons.md의 해당 카테고리 섹션에 추가합니다:

형식:

- [YYYY-MM-DD] 교훈 내용

규칙:

  • 오늘 날짜를 자동으로 삽입
  • 한 줄로 간결하게 작성 (필요하면 뒤에 이유 추가)
  • 해당 카테고리의 마지막 항목 뒤에 추가

Step 4: 확인

추가된 교훈을 사용자에게 보여줍니다:

교훈이 추가되었습니다:
- 카테고리: {카테고리}
- 내용: {내용}
- 파일: .claude/lessons.md

다음 세션부터 자동으로 컨텍스트에 포함됩니다.

서브커맨드

/lesson list

현재 등록된 모든 교훈을 카테고리별로 보여줍니다.

/lesson clean

오래된(90일+) 교훈이나 중복 항목을 찾아 정리를 제안합니다. AskUserQuestion으로 각 항목의 삭제 여부를 확인합니다.

File Purpose
.claude/lessons.md 교훈 저장 파일
.claude/hooks/load-recent-changes.sh SessionStart 훅 (lessons.md를 컨텍스트에 로드)
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. 2d ago First seen · 87 lines · 34 tokens per session scan A c15a5b968c93

Subscribe to this mod's changes

lesson is a skill published in the GitHub repository HyperAITeam/CLITrigger (13 stars, last pushed 8d ago), licensed MIT. It adds 34 tokens to every session and 768 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

design-retrospective

Analyze design session feedback, extract aesthetic lessons into .design-system/lessons-learned.md, promote recurring patterns to design-principles.md, write taste-profile and cross-project experience, generate context-free next-session prompt. Use when: "дизайн ретроспектива", "design retrospective", "уроки дизайна"…

stepanenkoviktor0110-boop/ai-dev-methodology-codex · 103 tokens

skill-trainer

Embeds accumulated triads from quick-learning into target skills as permanent instructions. Reads triads with Adapted=— from triad-index.md, analyzes each skill's existing logic, auto-applies new rules when no coverage exists, proposes refinements when partial coverage found. After embedding, updates Adapted field and…

stepanenkoviktor0110-boop/ai-dev-methodology-codex · 155 tokens

quick-learning

Owner of the unified methodology knowledge system: format, triad structure, similarity check, Seen counters, and Adapted tracking. Signal-gated: skips clean sessions automatically (zero cost). Automatic trigger: called by feature-execution, do-task, and design-generate (context exhaustion). Use when: "quick learning"…

stepanenkoviktor0110-boop/ai-dev-methodology-codex · 105 tokens

oma-explanation

Turn a code change (diff, PR, branch, commit range) into a rich, self-contained interactive HTML explainer with Background / Intuition / Code / Quiz sections. Use for explain, walkthrough, code-change explanation, diff/PR/branch explainer requests — 설명서, 해설, コード解説, 代码讲解. Produces a single offline-capable HTML file…

first-fluke/oh-my-agent · 94 tokens

paper-graph

Use this skill to map the genealogical lineage and historical progression of a research field. It is designed to visualize the evolutionary path of ideas, showing how technical challenges in earlier works were addressed by subsequent research improvements. The final deliverable is a Markdown file with embedded Mermaid…

CamusGIT/EvoQuant · 197 tokens

map-understand

Interactive deep-understanding and quiz mode for MAP sessions. Use when the user wants to understand code, a diff, workflow result, debugging cause, or architecture and be checked with restatements or quizzes.

azalio/map-framework · 45 tokens