Skip to content
Skills Library
AI & agents · Automation

pattern-learn

/pattern-learn

Use when the user wants to extract a reusable pattern from recent work and store it for future use. "Save this as a pattern", "remember this approach", "learn from this commit".

Repository
sift-coder ↗
Licence
MIT
Last repository change
03.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 03.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when the user wants to extract a reusable pattern from recent work and store it for future use. "Save this as a pattern", "remember this approach", "learn from this commit".

Triggers from the description

Save this as a patternremember this approachlearn from this commit
Original author description

Use when the user wants to extract a reusable pattern from recent work and store it for future use. "Save this as a pattern", "remember this approach", "learn from this commit".

How it works

  1. Method
  2. Output shape
  3. Rules
  4. Anti-patterns
  5. When NOT to use
  6. Subagent dispatch
  7. Value over native CC
Original SKILL.md headings · 69 lines, 321 words
SKILL.md preview
---
name: pattern-learn
description: Use when the user wants to extract a reusable pattern from recent work and store it for future use. "Save this as a pattern", "remember this approach", "learn from this commit".
---

# pattern-learn

Mine a reusable pattern from concrete code. Store with provenance + searchable description.

## Method

1. **Source.** What's the source — a recent commit? A file? A PR? A code block in chat?
2. **Distil.**
   - **Pattern name** — 2-4 words, descriptive
   - **Problem it solves** — one sentence
   - **Shape** — code template (with placeholders) or structural description
   - **When to use** — explicit triggers
   - **When NOT to use** — anti-trigger
3. **Capture to memory** with `kind: pattern`. Provenance edges link to the source code.
4. **Index.** Make sure it's discoverable via `mem_search` — descriptive description + tags.

## Output shape

```
Pattern:    <name>
Problem:    <one sentence>

Shape:
  ```<language>
  <code template with placeholders>
  ```

When to use:
  - <trigger>
  - <trigger>

When NOT to use:
  - <anti-trigger>

Source:     <file:line / commit SHA>
Captured:   <memory id>  (search via mem_search { query: "<keywords>" })
```

## Rules

- **Patterns are concrete + named.** "Use a factory" is not a pattern. "TestDataFactory.createAccounts(N) returning List<Account>" is.
- **Source is mandatory.** Pattern without origin = mythology.
- **Anti-trigger required.** "Don't use when X" prevents misapplication.
- **Capture is once per pattern.** Don't re-learn the same pattern; update the existing one.

## Anti-patterns

- Generic patterns ("use SOLID")
- Patterns extracted from one-off code (need 2+ instances to be a pattern)
- Patterns without when-NOT-to-use
- Patterns no one will retrieve (description doesn't match how anyone would search)

## When NOT to use

- One-off code — not a pattern
- Pattern already documented elsewhere — link, don't duplicate
- Pre-pattern — code not yet structured enough

## Subagent dispatch

- `Explore` for finding all instances of the pattern (validates it IS a pattern)
- Memory MCP for capture
- Optional `archaeologist` for git context

## Value over native CC

CC won't naturally extract + structure + persist patterns with provenance. The capture-with-discovery-context IS the value. Future `mem_search` retrieves the pattern when relevant.

Versions

The database has no other skills named pattern-learn.

Database snapshot: 13.11.2026 · package version 341677a3400c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90learn-pattern
    Save a new error pattern to memory for future recognition. When you discover a new error pattern and its fix, use this to remember it. Saved to patterns.yaml, matched during investigate_alert and debug_prod.
  • 100learn
    /learn - Extract Reusable Patterns. After completing a complex task (5+ tool calls with cross-scenario reuse potential), suggest "/learn" to the user. When invoked, analyze the current task's approach and distill it into a reusable skill or improve an existing one. Also use when…
  • 100extract-pattern
    Use when the user wants to create templates, extract reusable patterns, document solutions, or build a pattern library from working workflows.
  • 90adev:learn
    Capture a lesson learned as a heuristic in the project's memory store. Use when the user says 'remember this', 'save this lesson', 'learn that...', 'file a heuristic', 'we learned that...', or shares a rule/pattern that should persist across sessions. In Codex, invoke with $adev:learn
  • 100self-learn
    Extract reusable patterns from recent sessions, propose framework improvements, and (with approval) update the framework docs. This is the dogfooding meta-loop — the project learns from its own usage. Use when the user says "learn from this", "what did we learn", "extract…
  • 92webnovel-learn
    从当前会话提取成功模式并写入 project_memory.json

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.