learn
Extract and persist insights from the current conversation to the knowledge base
What this skill does
# Learn
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
1. **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)
2. **Categorize each insight** as pattern, quirk, or decision
3. **Format and append** to the appropriate file in `knowledge/learnings/`:
- `patterns.md` - What works well
- `quirks.md` - Unexpected behaviors
- `decisions.md` - Choices with rationale
4. **Update metadata** in each file's frontmatter (entry_count, last_updated)
5. **Update state** in `knowledge/state.json`:
- Set `last_extraction` to current timestamp
- Increment `extraction_count`
- Reset `queries_since_extraction` to 0
6. **Report** what was learned to the user
## Entry Format
### Pattern Entry
```markdown
## 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
```markdown
## 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
```markdown
## 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
1. Review the conversation for extractable insights
2. 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)
3. Read and update `knowledge/state.json`
4. 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:**
```markdown
## 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-on` instead
- Insights should be project-specific, not generic programming knowledge
- Avoid extracting obvious or trivial information
- When in doubt about confidence, use "medium"
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.