search-before-debugging

search-before-debugging is a skill for Claude Code, Codex from hifriendbot/cogmemai-mcp. It costs 82 tokens per session (1,167 once invoked), scanned A, original, MIT.

A debugging workflow that searches CogmemAi for an existing solution before investigating a new error or unexpected behavior. CogmemAi is a memory store for fixes and patterns from earlier sessions.

In plain words
What is it for?
Use it when you see an error, failed test, regression, confusing output, build failure, or report that something broke. Search with the most distinctive symptom before running diagnostic commands or reading code.
Why use it?
It helps avoid repeating investigations for bugs that may already have a known solution. Searching first can make debugging faster and preserve earlier lessons.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when you see an error, failed test, regression, confusing output, build failure, or report that something broke. Search with the most distinctive symptom before running diagnostic commands or reading code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hifriendbot/cogmemai-mcp/search-before-debugging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hifriendbot/cogmemai-mcp --skill search-before-debugging
Clone the repo
git clone --depth 1 https://github.com/hifriendbot/cogmemai-mcp

Made for: Claude Code, Codex.

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 search-before-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/hifriendbot/cogmemai-mcp/search-before-debugging/github.svg)](https://agentmods.dev/skills/hifriendbot/cogmemai-mcp/search-before-debugging)
Your own site
<a href="https://agentmods.dev/skills/hifriendbot/cogmemai-mcp/search-before-debugging"><img src="https://agentmods.dev/badge/skills/hifriendbot/cogmemai-mcp/search-before-debugging/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 search-before-debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/hifriendbot/cogmemai-mcp/search-before-debugging"><img src="https://agentmods.dev/badge/skills/hifriendbot/cogmemai-mcp/search-before-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,167 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.00082 $0.01167
Opus 5 $0.00041 $0.00583
Sonnet 5 $0.00016 $0.00233
Haiku 4.5 $0.00008 $0.00117

Measured 9d ago against content hash b03d406a8dad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

search-before-debugging 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 9d 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.

skill/search-before-debugging/SKILL.md · 127 lines

How it starts

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

Search Before Debugging with CogmemAi

The single highest-leverage debugging habit: search for an existing fix before debugging from scratch. Most bugs in established codebases are repeats. Someone (you, a teammate, a past version of you) has already solved it. CogmemAi makes those fixes instantly findable.

This skill is the recall half of the bugfix loop. Pair it with the save-bugfix skill which captures fixes for future sessions to find.

When to Use

Trigger before any debugging action when you encounter:

  • An error message or stack trace
  • A failing test (especially flaky or new failures)
  • Unexpected behavior or output
  • A regression after a recent change
  • A user report of "it broke" or "this doesn't work"
  • Confusing log output
  • A build failure

The rule: search first, debug second. Always.

Call recall_memories with the most distinctive part of the symptom as the query. Pass context_type: "debugging" to bias the ranker toward bug and pattern memories.

recall_memories({
  query: "Cannot read properties of undefined Stripe webhook",
  context_type: "debugging",
  limit: 10
})

If the literal error string is too generic, also try:

  • The component name + the error type ("auth jwt token expired")
  • The library name + the symptom ("postgres connection pool exhausted")
  • The recent change that may have triggered it ("after migrating to Next 15, hydration mismatch")

Run two or three queries with different phrasings if the first returns nothing relevant. CogmemAi's semantic search will catch reformulations the keyword wouldn't.

What to Do With Results

A high-relevance match exists

Stop. Read the memory carefully. It contains the symptom, root cause, fix, and why-it-works that a past debugging session captured. Verify:

  1. The symptom in the memory matches your current bug closely
  2. The file path or component named in the fix still exists in the codebase
  3. The fix is still applicable (the underlying library, version, or architecture hasn't changed in a way that invalidates it)

Read the full file on GitHub · 127 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. 9d ago First seen · 127 lines · 82 tokens per session scan A b03d406a8dad

Subscribe to this mod's changes

search-before-debugging is a skill published in the GitHub repository hifriendbot/cogmemai-mcp (7 stars, last pushed 8d ago), licensed MIT. It adds 82 tokens to every session and 1,167 once invoked, about $0.0004 per session on Opus 5. 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-08-31.

Related

Other skills, from other repositories

mem0-status

Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, addmemory errors occur, or to verify the plugin is working correctly.

mem0ai/mem0 · 44 tokens

ai4j-app-builder

Use this skill when helping users build applications with AI4J in their own Java or Spring Boot projects, including first chat, streaming, tool/function calls, MCP, RAG, memory, Agent runtime, Coding Agent CLI embedding, FlowGram integration, provider configuration, dependency selection, and troubleshooting. It guides…

LnYo-Cly/ai4j · 120 tokens

honcho-cli

Inspect and debug Honcho workspaces via the honcho CLI. Use when investigating peer representations, memory state, session context, or dialectic quality — any task that requires introspection of a Honcho deployment, including verifying that a recall/record memory loop is actually working.

plastic-labs/honcho · 61 tokens

upload-debug-memory

Use after resolving a bug, test failure, build failure, CI issue, deployment issue, or framework/API pitfall when the verified lesson should be published to Noosphere for future agents.

JinNing6/Noosphere · 41 tokens

yesmem-remember

Use after ANY decision, correction, gotcha, or discovery worth preserving. Also on task completion — resolve open tasks via resolvebytext() after commits, "fertig", or confirmed fixes. Trigger on "remember this"/"merk dir das", confirmed approaches, debugging surprises, and relatelearnings() for connecting insights.

carsteneu/yesmem · 70 tokens

agent-debug-memory

Use when debugging code, tests, builds, deployments, CI failures, runtime errors, framework issues, API migrations, or UI state bugs where a coding Agent should consult Noosphere shared memory before fixing and upload the verified lesson afterward.

JinNing6/Noosphere · 50 tokens