AgentSkillsCN

superpowers-extract-patterns

从会话中提炼学习所得的模式——可在完成开发分支时自动触发,或随时手动调用。

SKILL.md
--- frontmatter
name: superpowers-extract-patterns
description: Extract learned patterns from session - invoked automatically by finishing-a-development-branch or manually anytime

Extract Patterns

Overview

Wraps ECC's continuous-learning-v2 system to extract and save useful patterns from development sessions.

Auto-invoked by: finishing-a-development-branch skill Can be invoked: Manually anytime to save learning Purpose: Build institutional knowledge over time

Announce at start: "I'm using the extract-patterns skill to learn from this session."

The Process

Step 1: Invoke Pattern Extraction

Use /ecc:learn command to extract patterns:

code
/ecc:learn

This analyzes the current session for:

  • Successful problem-solving approaches
  • Useful code patterns
  • Effective debugging strategies
  • Language/framework insights
  • Common mistake avoidance

Step 2: Review Extracted Patterns

The learning system will show patterns with confidence scores.

Review criteria:

  • Is the pattern actually useful?
  • Is the confidence score appropriate?
  • Would this help in future sessions?

Step 3: Save to Instinct System

Patterns are automatically saved to the instinct system.

View saved patterns:

code
/ecc:instinct-status

Step 4: Optional - Evolve into Skills

For mature patterns (high confidence, multiple uses):

code
/ecc:evolve

This clusters related patterns into reusable skills.

Integration with Workflow

Auto-Invoked:

code
finishing-a-development-branch:
1. Verify tests pass
2. Sync documentation
3. Extract patterns (THIS SKILL) ← Auto-invoked
4. Generate changelist
5. Present options

Manual Invocation:

code
Any time during development:
- "Can you extract patterns from what we just did?"
- Skill invoked
- Patterns saved for future

Opt-Out

To disable auto-invocation in finishing workflow:

See: docs/integration/OPT-OUT.md

Exporting/Importing Patterns

Export patterns to file:

code
/ecc:instinct-export

Import patterns from file:

code
/ecc:instinct-import

Useful for:

  • Sharing patterns across teams
  • Backing up learned knowledge
  • Transferring patterns between projects

Quick Reference

CommandPurpose
/ecc:learnExtract patterns from session
/ecc:instinct-statusView saved patterns
/ecc:instinct-exportExport to file
/ecc:instinct-importImport from file
/ecc:evolveCluster patterns into skills

Remember

  • Patterns accumulate over time
  • Higher confidence = more proven
  • Export periodically for backup
  • Share successful patterns with team

Remember: This builds institutional knowledge. The more you use it, the smarter the system becomes.