Add /learn skill — per-project operational knowledge#47
Conversation
Plain markdown learnings system that persists across Claude Code sessions. Five categorized files (index, patterns, pitfalls, operational, decisions) stored alongside project memory. Session-end reflection captures what was learned; index.md provides session-start briefing. Complements the memory system: memory = cross-project user prefs, learnings = project-specific operational knowledge. Inspired by gstack's learnings JSONL and Hermes' three-tier memory, adapted to plain markdown for human readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review —
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67cc4fccf9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
plugins/core/skills/learn/SKILL.md
Outdated
|
|
||
| ## Usage | ||
|
|
||
| - `/learn` — Show the index (quick reference of all learnings) |
There was a problem hiding this comment.
Replace nonexistent /learn command references
This skill advertises /learn and /learn ... subcommands, but the commit only adds a skill definition and does not add a corresponding slash-command file (there is no plugins/core/commands/learn.md). In this repo, slash commands come from files in plugins/core/commands/, so users following this usage section will hit an unknown command instead of the new feature. Either wire a real command entrypoint or document invocation via the existing skill mechanism.
Useful? React with 👍 / 👎.
- Add color: magenta to frontmatter - Fix "auto-loaded at session start" claim — document CLAUDE.md workaround instead - Clarify /learn is a skill trigger, not a slash command - Rename usage commands to natural language phrases - Fix prune: use which/ls instead of running commands - Add Stats section with example output - Add Export section with example output format - Fix bootstrapping contradiction: create on first use, not empty files upfront - Clarify project hash always starts with leading hyphen Co-Authored-By: Claude <noreply@anthropic.com>
Code Review —
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| description: "Use when managing project learnings - view, add, search, prune, or export operational knowledge that persists across sessions" | ||
| version: 1.1.0 | ||
| category: meta | ||
| color: magenta |
There was a problem hiding this comment.
Skill frontmatter includes agent-only color field
Low Severity
The color: magenta frontmatter field is specific to agent definitions, not skills. No other skill in the repo uses color, the skill creation guide in plugins/core/skills/CLAUDE.md doesn't list it as a valid field, and validate-frontmatter.py only validates color for agents (where it's required). This appears to be mistakenly carried over from an agent template.
| ### Decisions | ||
|
|
||
| [contents of decisions.md] | ||
| ``` |
There was a problem hiding this comment.
Export template creates inverted markdown heading hierarchy
Medium Severity
The export template uses ### (H3) for category headers like ### Patterns, but the entry format specifies each entry as an ## (H2) heading. When file contents are inlined into the export, each entry's H2 heading outranks its parent H3 category, producing a broken and misleading markdown heading hierarchy. The categories and the top-level ## Project Learnings heading would effectively be swallowed by the first entry's H2.


Summary
/learnskill for managing project-specific operational knowledge across sessionsChanges
plugins/core/skills/learn/SKILL.md— new skill (164 lines)/learn— show index,/learn add— add entry,/learn search— search all files/learn prune— find stale entries,/learn export— format for CLAUDE.mdDesign decisions
Test plan
/learn add— verify file creation in learnings directory/learn search <term>— verify search across all files/learn prune— verify stale detection works🤖 Generated with Claude Code