Pattern Matcher

Classifies extracted lessons against existing memory to detect duplicates and contradictions.

1|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/htxryan/claude-code-config-profiles --skill pattern-matcher-htxryan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Pattern Matcher
Source: https://github.com/htxryan/claude-code-config-profiles/tree/main/.agents/skills/compound/agents/pattern-matcher
Command: npx skills add https://github.com/htxryan/claude-code-config-profiles --skill pattern-matcher-htxryan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When capturing lessons learned into a persistent memory system, teams risk storing duplicate entries, missing contradictions with prior knowledge, or bloating the knowledge base with redundant items. This Skill compares each extracted lesson against existing memory so only genuinely new knowledge gets stored. ## Core Features & Use Cases - Lesson Classification: Labels each lesson as New, Duplicate, Reinforcement, or Contradiction by searching existing memory with the ca search command. - Deduplication Gate: Recommends storing only New lessons and flags Contradictions for human review before they corrupt the knowledge base. - Team Collaboration: Operates as an AgentTeam member in the compound phase, sharing classifications with the solution-writer agent via direct messages. - Use Case: After a debugging session yields five candidate lessons, run this Skill to discover that two are already captured, one reinforces an existing item, one contradicts a prior assumption, and only one is truly new and worth storing. ## Quick Start Compare these extracted lessons against existing memory and classify each one as New, Duplicate, Reinforcement, or Contradiction with a store or skip recommendation.

Frequently Asked Questions about Pattern Matcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I avoid storing duplicate lessons in a knowledge base?▼

Search existing memory for each candidate lesson before storing it, then classify it as New, Duplicate, Reinforcement, or Contradiction. Only lessons classified as New should be stored; duplicates are skipped and contradictions are flagged for human review.

How to deduplicate lessons learned in an AI agent workflow?▼

Run a pattern-matching step after lesson extraction that queries the memory store with a search command like ca search. Each lesson gets a classification and a store, skip, or review recommendation, which downstream agents use to decide what to persist.

What happens when a new lesson contradicts existing memory?▼

Contradicting lessons are classified as Contradiction and flagged for user review rather than stored automatically. This prevents conflicting knowledge from silently overwriting or corrupting the existing knowledge base.

Can pattern matching detect lessons that reinforce existing knowledge?▼

Yes, lessons that strengthen an existing memory item are classified as Reinforcement with the matching item's ID recorded. They are not stored as new entries but signal that the existing knowledge is repeatedly validated.

What are the limitations of automated lesson deduplication?▼

Deduplication quality depends on the search coverage of the underlying memory store, so loosely worded matches may be missed. Borderline cases and contradictions still require human review rather than fully automated resolution.