learn
npx machina-cli add skill aiskillstore/marketplace/learn --openclawLearn
Extract insights from the current conversation and persist them to the project's knowledge base.
What This Does
Analyzes the conversation context to identify:
- Patterns: Approaches that worked well in this project
- Quirks: Project-specific oddities or non-standard behaviors discovered
- Decisions: Architectural or implementation choices made with their rationale
These insights survive session boundaries and context compaction, building a persistent understanding of the project over time.
Instructions
-
Analyze the conversation looking for:
- Successful problem-solving approaches that could apply again
- Unusual behaviors or gotchas discovered about the codebase
- Decisions made and why (architectural choices, library selections, patterns chosen)
-
Categorize each insight as pattern, quirk, or decision
-
Format and append to the appropriate file in
knowledge/learnings/:patterns.md- What works wellquirks.md- Unexpected behaviorsdecisions.md- Choices with rationale
-
Update metadata in each file's frontmatter (entry_count, last_updated)
-
Update state in
knowledge/state.json:- Set
last_extractionto current timestamp - Increment
extraction_count - Reset
queries_since_extractionto 0
- Set
-
Report what was learned to the user
Entry Format
Pattern Entry
## Pattern: [Short descriptive title]
- **Discovered:** [ISO date]
- **Context:** [What task/problem led to this discovery]
- **Insight:** [What approach works well and why]
- **Confidence:** high|medium|low
Quirk Entry
## Quirk: [Short descriptive title]
- **Discovered:** [ISO date]
- **Location:** [File/module/area where this applies]
- **Behavior:** [What's unusual or unexpected]
- **Workaround:** [How to handle it]
- **Confidence:** high|medium|low
Decision Entry
## Decision: [Short descriptive title]
- **Made:** [ISO date]
- **Context:** [What prompted this decision]
- **Choice:** [What was decided]
- **Rationale:** [Why this choice over alternatives]
- **Confidence:** high|medium|low
Confidence Levels
- high: Clear, verified insight with strong evidence
- medium: Reasonable inference, likely correct
- low: Tentative observation, needs validation
Only high and medium confidence insights influence routing decisions.
Steps
- Review the conversation for extractable insights
- For each insight found:
- Read the target file (patterns.md, quirks.md, or decisions.md)
- Check for duplicates (skip if similar insight exists)
- Append new entry in the format above
- Update frontmatter (increment entry_count, set last_updated)
- Read and update
knowledge/state.json - Report summary to user:
Knowledge Extraction Complete ───────────────────────────── Extracted: [Pattern] "Title of pattern learned" [Quirk] "Title of quirk discovered" [Decision] "Title of decision recorded" Knowledge base now contains: - X patterns - Y quirks - Z decisions
Example Extraction
From a conversation where we debugged an auth issue:
Quirk extracted:
## Quirk: Auth tokens require base64 padding
- **Discovered:** 2026-01-08
- **Location:** src/auth/tokenService.ts
- **Behavior:** JWT tokens in this codebase use non-standard base64 without padding, causing standard decoders to fail
- **Workaround:** Use the custom `decodeToken()` helper instead of atob()
- **Confidence:** high
Notes
- This command extracts insights from the CURRENT conversation
- For continuous extraction, use
/learn-oninstead - Insights should be project-specific, not generic programming knowledge
- Avoid extracting obvious or trivial information
- When in doubt about confidence, use "medium"
Source
git clone https://github.com/aiskillstore/marketplace/blob/main/skills/0xrdan/learn/SKILL.mdView on GitHub Overview
Learn analyzes the current conversation to identify patterns that worked, quirks observed, and key decisions made. It then persists these insights into the project's knowledge base, categorizing them into patterns, quirks, and decisions, and updates metadata so insights endure across sessions.
How This Skill Works
The skill scans the dialogue to surface patterns, quirks, and decisions, formats each insight into the appropriate Markdown entry, and appends it to knowledge/learnings/patterns.md, knowledge/learnings/quirks.md, or knowledge/learnings/decisions.md. It then updates the frontmatter (entry_count, last_updated) and adjusts knowledge/state.json (last_extraction, extraction_count, queries_since_extraction). Finally, it reports the learned items back to the user.
When to Use It
- After completing a project phase to capture reusable patterns and decisions
- When you notice unusual or brittle behaviors (quirks) in the codebase
- During architectural planning to document rationale behind choices
- When onboarding new team members to share established practices
- After solving a tricky bug or refactor to codify the approach
Quick Start
- Step 1: Run the learn skill on the current conversation to extract insights
- Step 2: Review the surfaced insights and verify they are project-specific and actionable
- Step 3: Let Learn format and append entries to knowledge/learnings (patterns.md, quirks.md, decisions.md) and update knowledge/state.json
Best Practices
- Identify concrete, repeatable insights with dates
- Categorize each insight strictly as Pattern, Quirk, or Decision
- Avoid generic knowledge; focus on project-specific learnings
- Check for duplicates before appending to files
- Use ISO-formatted dates and clear rationale for confidence levels
Example Use Cases
- Pattern: Reuse the same error-handling wrapper across modules to unify retries
- Quirk: Some utils rely on non-standard behavior from an external lib and require a shim
- Decision: Adopt strict TypeScript config to catch type issues early
- Pattern: Centralized logging improves debuggability in prod-like environments
- Decision: Prefer functional components to reduce nested state in UI layers