/pattern-capture

> Extract and store reusable patterns from completed tasks.

170 stars

Best use case

/pattern-capture is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> Extract and store reusable patterns from completed tasks.

Teams using /pattern-capture should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pattern-capture/SKILL.md --create-dirs "https://raw.githubusercontent.com/Miosa-osa/canopy/main/library/skills/learning/pattern-capture/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pattern-capture/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How /pattern-capture Compares

Feature / Agent/pattern-captureStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> Extract and store reusable patterns from completed tasks.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# /pattern-capture

> Extract and store reusable patterns from completed tasks.

## Usage
```
/pattern-capture [--domain <domain>] [--from-session] [--list]
```

## What It Does
Analyzes completed work to extract reusable patterns: code patterns, debugging approaches, architectural decisions, process improvements. Stores them in the pattern library indexed by domain and task type, with usage count and success rate tracking.

## Implementation
1. **Analyze** -- review the current session's tool executions and outcomes.
2. **Extract** -- identify repeatable patterns (code structures, debugging steps, decision frameworks).
3. **Classify** -- domain (frontend, backend, devops, etc.), type (code_pattern, process, decision), confidence.
4. **Deduplicate** -- check against existing patterns, increment usage count if duplicate.
5. **Store** -- write to pattern library with metadata (domain, confidence, usage_count, success_rate).

Pattern format:
```json
{
  "id": "pattern-id",
  "domain": "backend",
  "type": "code_pattern",
  "title": "Pattern name",
  "description": "When and how to use",
  "confidence": 0.85,
  "usage_count": 5
}
```

## Examples
```bash
# Capture patterns from current session
/pattern-capture --from-session

# Capture patterns for a specific domain
/pattern-capture --domain backend

# List all stored patterns
/pattern-capture --list
```