Skip to main content
subagent CX Codex

pattern-matcher — Claude Code subagent: setup and use

The pattern-matcher subagent breaks down tasks, finds related solutions in ReasoningBank, and adapts them to a new context.

no license ★ 850 updated 2026-10-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/pattern-matcher.md
Open on GitHub

What pattern-matcher does

pattern-matcher examines a request through structural, algorithmic, domain, and functional traits. It then searches ReasoningBank for related cases, compares the matches, and reshapes a suitable approach for the current task. This makes it useful when a solution from one area needs to be applied elsewhere.

The agent file includes frontmatter with its description, priority, and ReasoningBank settings. A pre-run hook calls npx agentic-flow@latest reasoningbank retrieve to look up related patterns; a post-run hook sends extracted patterns to reasoningbank distill. Those hooks depend on npx agentic-flow@latest being available, so the ReasoningBank steps will not run without it.

What it helps with

  • break a task into reusable patterns
  • search stored experience for related solutions
  • adapt an approach from another domain
  • compare several possible solution paths
  • save patterns discovered during a task

Example prompts for the agent

  • Ask pattern-matcher to decompose this task and search ReasoningBank for related solutions.
  • Find a previous solution with a similar structure and adapt it to this project.
  • Extract reusable patterns from the completed task and store them in ReasoningBank.

How to install pattern-matcher

Manually: put the files in place

.claude/agents/pattern-matcher.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about pattern-matcher

How do I install pattern-matcher in Claude Code?

Save the subagent file at .claude/agents/pattern-matcher.md.

What does pattern-matcher do?

It breaks a task into recognizable traits, retrieves related cases through ReasoningBank, and adapts a selected approach to the current context.

What are pattern-matcher's hooks used for?

The pre-run hook retrieves related cases, while the post-run hook stores extracted patterns. Both steps call npx agentic-flow@latest.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set76

The whole set →
swarm-issue swarm-issue turns a GitHub issue into work for a swarm: splits it into subtasks, assigns agents and reports progress back inside the issue. CX Codex ★ 850repo stars performance-optimizer The performance-optimizer subagent finds system bottlenecks and helps tune resource distribution, load balancing, and computational performance. CX Codex ★ 850repo stars pseudocode A subagent for the Pseudocode stage of SPARC: it turns a finished spec into an algorithm draft and works out the complexity. CX Codex ★ 850repo stars context-synthesizer context-synthesizer synthesizes multidimensional context across task constraints, domain patterns, and past execution memory. Helps maintain clear situational awareness during complex execution. CX Codex ★ 850repo stars Verification & Quality Assurance Verification & Quality Assurance is a Claude Code skill that checks code and agent outputs with reliability scores (0–1.0), reverting failed changes. CX Codex +1 ★ 850repo stars memory-optimizer memory-optimizer is a Claude Code, Codex, and Cursor subagent that merges similar ReasoningBank memories and removes stale or conflicting patterns. It also checks memory quality. CX Codex ★ 850repo stars sync-coordinator sync-coordinator coordinates version alignment, cross-package dependencies, and documentation updates across multiple repositories using an agent swarm. CX Codex ★ 850repo stars reasoning-optimized The reasoning-optimized subagent selects a reasoning strategy based on the task and coordinates five specialist agents. Use it when a task calls for context synthesis, pattern reuse, or curation of results. CX Codex ★ 850repo stars

Project sponsors

Companies that keep this analytics open