一键导入
lessons
Capture and integrate lessons learned. Two modes — capture (single lesson) and scan (mine session files or extended JSONL logs for skill-change proposals).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Capture and integrate lessons learned. Two modes — capture (single lesson) and scan (mine session files or extended JSONL logs for skill-change proposals).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Definitive reference for how Claude Code works — disambiguates skills vs hooks vs subagents vs MCPs vs slash commands vs memory vs settings. Use when asked "how does Claude Code X work", "what's the difference between X and Y", "where should this live", "build me a [skill|hook|agent|mcp|slash command]", "configure Claude Code", or when picking the right surface for a new capability.
Scribe — the project-documentation skill. Generate or maintain a project's Claude-facing documentation (CLAUDE.md, .claude/docs/*, project-context.md, README) from verified facts. Use when the user says "document this project", "write the docs for X", "the docs are stale", "fill in the .claude docs", or "/scribe". Detects existing doc state and routes between from-scratch and update. Verify-before-assert is the core discipline — confirmed facts go to committed docs, inferred/uncertain ones go to a separate hazards artifact, never silently into the repo.
Speak content aloud via Kokoro neural TTS (local, offline). Use when the user says "read it for me", "read it to me", "play it in audio", "say it", "speak it", "read that aloud", "/say-it", or asks to hear something spoken instead of reading it.
Install a local neural voice interface for Claude Code on macOS Apple Silicon. Wires mlx-whisper (STT) + Kokoro TTS (offline neural voices) into voice-claude and vtranscribe CLI scripts. Two voice contexts — personal (af_heart) and tech (af_bella). Multi-session safe — concurrent sessions speak in turn (global lock) and announce their name. No cloud APIs, no API keys.
Collect the user's daily work activity from Slack, Jira, Confluence, GitHub, and Google Drive with source links
Collect a team member's daily work activity from Slack, Jira, Confluence, and GitHub
| name | lessons |
| description | Capture and integrate lessons learned. Two modes — capture (single lesson) and scan (mine session files or extended JSONL logs for skill-change proposals). |
| user_invocable | true |
| args | Optional. Free-text lesson, OR `scan` (default scan of session files), OR `scan --deep` (deep scan of JSONL transcripts). |
You operate in one of two modes, dispatched by the first argument:
| First token | Mode |
|---|---|
scan | Scan mode (default depth) — read recent session markdown summaries |
scan --deep | Scan mode (deep) — read recent JSONL extended transcripts |
| anything else (or empty) | Capture mode — record a single lesson |
Before dispatching to a mode, locate the workspace and resolve scope from the active session marker.
The skill's base directory is <workspace>/.claude/skills/lessons/; resolve <workspace> by walking up three directory levels and validate that <workspace>/.claude/.workspace exists.
Scan active markers from <workspace>/sessions/active/*.md and <workspace>/projects/*/sessions/active/*.md. Parse frontmatter (project_slug, workstream_slug, session_id).
<workspace> if project_slug = workspace, else <workspace>/projects/<project_slug>.1 matches → ask the user which session this invocation is scoped to.
project_slug and session_id were passed as context from /bye. If yes, derive scope from project_slug (<workspace> if project_slug = workspace, else <workspace>/projects/<project_slug>) and proceed. If no context was passed, surface as a bug and abort (manual invocation: ask the user for scope instead).Modes A and B use <scope> for input/output paths. Mode C is workspace-wide; the marker is read for scope-attribution decoration only.
Triggered when the arg is absent or is free text (not starting with scan).
Lessons in capture mode come from:
/bye skill passing identified lessons/lessons "description of what was learned"/lessons (ask the user what was learned)Gather lessons: If lessons were passed as input, use those. If invoked manually without input, ask the user what they learned.
Categorize each lesson into one of:
convention — code style, naming, project patternsbug-pattern — common mistakes, gotchas, debugging insightspreference — user preferences for tools, workflow, communicationarchitecture — structural decisions, design patternstool-usage — tips for tools, CLIs, MCP servers, frameworksAppend to lessons file: Read <scope>/.claude/memory/lessons-learned.md with mtime capture, then append each lesson under the appropriate category section with this format:
- **[YYYY-MM-DD]** Description of the lesson
Store in cognee (if available): If the cognee MCP is healthy, call cognee_add with the lesson text (prefixed with its category), then call cognee_cognify to integrate it into the knowledge graph.
Trigger skills-manager: Invoke the /skills-manager skill to assess whether the lessons warrant updates to any skill files. Pass the lessons as context.
Report:
Lessons captured: [count]
Categories: [list]
Cognee: stored / skipped (MCP unavailable)
Skills review: [triggered / no changes needed]
Triggered by /lessons scan (no --deep flag).
Input source: <scope>/sessions/*.md — markdown summaries written by /bye. (Working state lives at scope root, not under .claude/memory/.)
Select window: list files modified in the last 7 days. If fewer than 3 exist, expand to the last 14 days. Cap at 20 files — prefer the most recent.
Read each file and extract signals:
Cluster signals by target skill: for each signal, identify which skill should have prevented or handled it. Group by skill name. Signals with no clear target go into a cross-cutting bucket.
Draft skill-change proposals. For each cluster of 2+ related signals, draft one entry:
- **skill:** <name>
- **change:** <what to add, remove, or rewrite>
- **why:** <one-sentence rationale>
- **evidence:** <session-file refs, e.g. `session-2026-04-19_144813.md:L42`>
Write proposal file to <workspace>/contributions/lessons-scan-<YYYY-MM-DD>-default.md (mtime-check on write):
# Lessons scan — default mode — <YYYY-MM-DD>
Window: <N> session files, <start-date> to <end-date>
Signals found: <count>
Proposals: <count>
## Proposed skill changes
<proposals>
## Cross-cutting observations
<any signals that don't map to a single skill>
Hand off to skills-manager: Invoke /skills-manager with the proposal file path as context. Skills-manager runs its own holistic-review → approval-gate → apply workflow.
Report to the user:
Scan mode: default
Window: <N> files
Proposals written: <count> → <workspace>/contributions/lessons-scan-<date>-default.md
Skills-manager: triggered
Triggered by /lessons scan --deep.
Input source: ~/.claude/projects/<your-project>/*.jsonl — raw harness transcripts (one file per session, turn-by-turn).
Select window: list JSONL files modified in the last 3 days. Note the unbounded count first — if >20, use Opus model for this scan. Then cap at 15 files, preferring the most recent.
Scan each JSONL. Each line is a JSON object representing one turn (user message, assistant response, tool call, tool result). Look for signals the markdown summary could have missed:
Cluster signals by target skill — same as default scan, but the signal vocabulary is richer (raw tool errors, turn-level sentiment, not just end-of-session summary).
Draft skill-change proposals — same format as default scan, but evidence refs point to JSONL files and line numbers:
- **evidence:** `010cbd9d-adb5-4730-8121-64c158238a39.jsonl:L1247`
Write proposal file to <workspace>/contributions/lessons-scan-<YYYY-MM-DD>-deep.md (mtime-check on write; same structure as default-mode proposal, with Mode: deep and Scope attribution: <workspace | projects/<slug> from marker> in the header).
Hand off to skills-manager — same as default scan.
Report to the user:
Scan mode: deep
Window: <N> JSONL files (<total line count>)
Proposals written: <count> → <workspace>/contributions/lessons-scan-<date>-deep.md
Skills-manager: triggered
For every shared-file write (Mode A append; Mode B/C proposal write):
On retry exhaustion (>3 conflicts), prompt the user.
This skill detects (finds what needs to change). skills-manager governs (decides and applies changes). Never edit skill files from within lessons — always hand off.
contribute operates on captured lessons to prepare upstream Memnyx contributions. Downstream of this skill.