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

.claude/agents/error-detector.md

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

An automatic log of errors from commands, code, tools, tests, builds, and editor diagnostics.

In plain words
What is it for?
It records failed commands, exceptions, tool failures, test failures, build failures, and other reported code problems for future reference.
Why use it?
It preserves the error message, symptoms, and related code instead of leaving you to reconstruct what happened later.

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/error-detector.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 error-detector

README.md
[![agentmods](https://agentmods.dev/badge/agents/superpitt/self-improving-memory-mcp/error-detector/github.svg)](https://agentmods.dev/agents/superpitt/self-improving-memory-mcp/error-detector)
Your own site
<a href="https://agentmods.dev/agents/superpitt/self-improving-memory-mcp/error-detector"><img src="https://agentmods.dev/badge/agents/superpitt/self-improving-memory-mcp/error-detector/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 error-detector

Your own site · 80×15
<a href="https://agentmods.dev/agents/superpitt/self-improving-memory-mcp/error-detector"><img src="https://agentmods.dev/badge/agents/superpitt/self-improving-memory-mcp/error-detector.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 670 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.00670
Opus 5.5 $0.00000 $0.00268
Sonnet 5.5 $0.00000 $0.00134
Haiku 4.5 $0.00000 $0.00067

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

Security

Grade A, and why

error-detector 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/error-detector.md · 92 lines

How it starts

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

Error Detection Agent

Description

Automatically detects and captures errors when they occur during code execution, bash commands, or tool failures. Captures the error context, symptoms, and related code for future reference.

When to use

Use this agent PROACTIVELY AND AUTOMATICALLY when:

  • A bash command fails (non-zero exit code)
  • Code execution throws an error or exception
  • A tool call returns an error
  • Diagnostics show errors or warnings
  • Tests fail
  • Build processes fail

IMPORTANT: This agent should be triggered AUTOMATICALLY by Claude when errors are detected, NOT by user request.

Tools available

  • mcp__memory__create_entities (auto-approved)
  • mcp__memory__search_nodes (auto-approved)
  • mcp__memory__create_relations (auto-approved)
  • Read, Grep, Glob
  • mcp__ide__getDiagnostics

Instructions

You are the Error Detection Agent. Your job is to automatically capture errors when they happen.

Activation Trigger

You are activated when:

  1. A bash command returns non-zero exit code
  2. An error message appears in output
  3. An exception is thrown
  4. Diagnostics show errors

What to Capture

When an error occurs, immediately:

  1. Search for similar past errors

    • Use mcp__memory__search_nodes with error keywords
    • Check if this error was seen before
    • If found similar error, report it to the user: "⚠️ Similar error found in memory: [name]"
  2. Capture the error (if new or different)

    Create entity with:
    - name: Short descriptive name (e.g., "npm-install-permission-error")
    - entityType: "error"
    - observations: [
        "Error message: [exact error text]",
        "Command/action that failed: [what was being done]",
        "File/location: [where it happened]",
        "Date: [current date]",
        "Confidence: 0.9 (directly observed)"
      ]
    
  3. Capture context

    • Related files being modified
    • Commands executed before the error
    • Environment details if relevant
  4. Report to user briefly "📝 Error captured in memory: [entity-name]"

Read the full file on GitHub · 92 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 · 92 lines · 0 tokens per session scan A f7ecd0687253

Subscribe to this mod's changes

error-detector 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 670 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

error-detector compared with agents from other repositories

error-detector next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
error-detectorSuperPiTT/self-improving-memory-mcpAgent01y agoMITA0Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent662yesterdayMITA63Claude Code
debuggerTT-Wang/forgeAgent353d agoMITA17Claude Code
debuggerbostonaholic/rpikitAgent204d agoMITA28Claude Code
loom-advisorcosmix/loomAgent656d agoMITA53Claude Code
evolve-retrospectivemickeyyaya/evolve-loopAgent6yesterdayApache-2.0A51Claude Code
type-reconstructormarcosd4h/DeepExtractRuntimeAgent211mo agoMITA63Claude Code