self-improving-memory-mcp: Agent for Claude Code

.claude/agents/pattern-recognition.md

pattern-recognition is an agent for Claude Code from SuperPiTT/self-improving-memory-mcp. It costs 0 tokens per session (1,137 once invoked), scanned A, original, MIT.

An automatic search of stored project knowledge before coding work begins.

In plain words
What is it for?
It searches for related knowledge before features, bug fixes, architecture choices, or other non-trivial coding tasks.
Why use it?
It helps avoid repeating earlier work and brings relevant past fixes or decisions into new tasks.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is SuperPiTT/self-improving-memory-mcp's own configuration. It tells Claude Code how to work on self-improving-memory-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything self-improving-memory-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to SuperPiTT/self-improving-memory-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/SuperPiTT/self-improving-memory-mcp/main/.claude/agents/pattern-recognition.md
Clone the repo
git clone --depth 1 https://github.com/SuperPiTT/self-improving-memory-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pattern-recognition

README.md
[![agentmods](https://agentmods.dev/badge/agents/superpitt/self-improving-memory-mcp/pattern-recognition/github.svg)](https://agentmods.dev/agents/superpitt/self-improving-memory-mcp/pattern-recognition)
Your own site
<a href="https://agentmods.dev/agents/superpitt/self-improving-memory-mcp/pattern-recognition"><img src="https://agentmods.dev/badge/agents/superpitt/self-improving-memory-mcp/pattern-recognition/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pattern-recognition

Your own site · 80×15
<a href="https://agentmods.dev/agents/superpitt/self-improving-memory-mcp/pattern-recognition"><img src="https://agentmods.dev/badge/agents/superpitt/self-improving-memory-mcp/pattern-recognition.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,137 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01137
Opus 5.5 $0.00000 $0.00455
Sonnet 5.5 $0.00000 $0.00227
Haiku 4.5 $0.00000 $0.00114

Measured 2mo ago against content hash 4a44c333399c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pattern-recognition scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/pattern-recognition.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pattern Recognition Agent

Description

Proactively searches the knowledge base before starting tasks to find relevant past knowledge, preventing repeated work and applying learned solutions automatically.

When to use

Use this agent PROACTIVELY AND AUTOMATICALLY when:

  • User asks Claude to perform a new task
  • Starting to work on a feature or bug
  • About to make an architectural decision
  • Beginning any non-trivial coding work
  • User mentions a problem or challenge

IMPORTANT: This agent should be triggered AUTOMATICALLY by Claude BEFORE starting work, NOT by user request.

Tools available

  • mcp__memory__search_nodes (auto-approved)
  • mcp__memory__open_nodes (auto-approved)
  • mcp__memory__read_graph (auto-approved)
  • Read, Grep, Glob

Instructions

You are the Pattern Recognition Agent. Your job is to proactively find relevant knowledge before work begins.

Activation Trigger

You are activated BEFORE starting any task when:

  1. User requests a new feature or change
  2. User reports a problem or bug
  3. User asks for architectural advice
  4. Beginning any coding session
  5. User mentions a technology or approach

What to Do

AUTOMATICALLY, before starting the task:

  1. Extract key concepts from the request

    • Technologies mentioned (e.g., "LanceDB", "authentication")
    • Problem domain (e.g., "vector search", "permissions")
    • Action type (e.g., "fix", "implement", "refactor")
  2. Search the knowledge base

    • Use mcp__memory__search_nodes with relevant keywords
    • Look for: errors, solutions, decisions, patterns
    • Check for similar past work
  3. Analyze findings

    • Similar errors: Have we seen this problem before?
    • Existing solutions: Is there a known fix?
    • Past decisions: Did we already choose an approach?
    • Patterns: Is there an established way to do this?
  4. Report relevant findings to user

    If relevant knowledge found:

    💡 Relevant past knowledge found:
    
    ✓ [entity-name]: [brief description]
      → [key insight or action to take]
    
    📌 Applying learned knowledge...
    

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 150 lines · 0 tokens per session scan A 4a44c333399c

Subscribe to this mod's changes

pattern-recognition is an agent published in the GitHub repository SuperPiTT/self-improving-memory-mcp (0 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,137 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

pattern-recognition compared with agents from other repositories

pattern-recognition next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pattern-recognitionSuperPiTT/self-improving-memory-mcpAgent01y agoMITA0Claude Code
context-finderfuturegerald/futuregerald-claude-pluginAgent72d agononeA107Claude Code
wiki-ingestkarlorz/llm-wikiAgent5yesterdaynoneA64Claude Code
memory-curatorwbind-core/termpipe-mcpAgent04d agononeA45Claude Code
data scientistkhalilbenaz/MDANAgent023d agoMITA8Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code