# pattern-matcher

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

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/agents/reasoning/pattern-matcher.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/pattern-matcher

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/pattern-matcher.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/pattern-matcher.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/pattern-matcher.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/agents/reasoning/pattern-matcher.md

## When to use it
- 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
- 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.

## Similar
- [dart-use-pattern-matching](https://affpapa.org/en/nevibecode/skills/dart-use-pattern-matching.md) — skill · 20800 installs
- [carbon-factor-matcher](https://affpapa.org/en/nevibecode/mcp/carbon-factor-matcher.md) — MCP server · 3609 installs
- [resume-to-jobdescription-matcher](https://affpapa.org/en/nevibecode/mcp/resume-to-jobdescription-matcher.md) — MCP server · 119 installs
- [python-development](https://affpapa.org/en/nevibecode/skills/laurigates-python-development.md) — skill · 192 installs
- [dart-matcher-best-practices](https://affpapa.org/en/nevibecode/skills/dart-matcher-best-practices.md) — skill · 269 installs
- [regex-builder](https://affpapa.org/en/nevibecode/plugins/regex-builder.md) — plugin · ★ 2858 repo stars

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
