Debug logo

Debug

Organization
agentic-community
debug

Debug issues in the MCP Gateway Registry using first-principles thinking. Invoke when something is broken, timing out, returning errors, or behaving unexpectedly. Forces structured root-cause analysis before any code change is proposed.

Overview

Publisheragentic-community
Repositorymcp-gateway-registry
Skill namedebug
Stars
969
Forks
244
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by agentic-community on GitHub. Read the source before you install it.

Installation

Install the Debug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/agentic-community/mcp-gateway-registry/tree/main/.claude/skills/debug
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/agentic-community/mcp-gateway-registry.git /tmp/mcp-gateway-registry
mkdir -p .claude/skills
cp -r /tmp/mcp-gateway-registry/.claude/skills/debug .claude/skills/debug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Debug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Debug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Debug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Debug Skill

Use this skill when debugging any issue in the MCP Gateway Registry: timeouts, 5xx errors, UI failures, broken flows, unexpected behavior. Invoke this skill proactively whenever normal debugging is failing or going in circles, or use it from the start for any non-trivial issue. We are testing whether this approach should be the default for all debugging.

Expert Personas

Before starting, announce that you are consulting the following expert panel. Each persona challenges assumptions and contributes their domain expertise:

  • SRE/Infrastructure Engineer - Thinks about: single-worker bottlenecks, event loop blocking, connection pooling, DNS resolution, proxy timeouts, container resource limits, startup ordering.
  • Frontend/Browser Security Engineer - Thinks about: same-origin vs cross-origin, preflight behavior, cookie scope, session validity after restarts, browser caching of error responses, service worker interception.
  • Backend/Python Engineer - Thinks about: asyncio event loop blocking, synchronous HTTP calls on async workers, Pydantic model_dump dropping extra fields, DB write ordering, exception swallowing in try/except.
  • Senior Staff Engineer (Skeptic) - Questions EVERY theory before implementation. Asks: "If that were true, why does X work?" and "Was this working before our change?" Forces the team to prove hypotheses before writing code.

State which persona is "speaking" when presenting a theory or counter-argument. The Skeptic must challenge every theory before any code change is proposed.

First Principles Debugging

Step 1: Reproduce and observe (do NOT theorize yet)

  • What exact error does the user see? (HTTP status, error message, timing)
  • What was the user doing? (which page, which action, which persona)
  • Does the same operation work via curl from the command line?
  • If curl works but browser doesn't: the difference is timing or session, NOT the backend logic.

Step 2: Check what the worker is DOING right now

This is the single most important step. The registry runs a single uvicorn worker. If a request times out, the worker is busy doing something else.

bash
docker compose logs registry --since=30s 2>&1 | tail -30

Read what the logs say at the EXACT timestamp of the failure. Do NOT filter by keywords related to your bug. Look at EVERYTHING the worker is doing. Common blockers:

  • GoDaddy ANS API pagination (hundreds of sequential HTTP GETs)
  • Federation sync (AgentCore, peer registries)
  • Health checks pinging 30+ MCP servers
  • Vector index processing (embedding generation, index updates)
  • Security scans (yara, spec analyzers take 3-8 seconds each)

If the worker is busy with a background task, your request is queued. The fix is to make that task non-blocking, NOT to change the endpoint code.

Step 3: Is this new or pre-existing?

Before touching ANY code, answer:

  • Was this working before on the current branch?
  • Was this working on main / the last release tag?
  • Did a recent restart, rebuild, or config change cause it?

If the issue exists on the baseline tag with zero changes, it is pre-existing and unrelated to whatever PR you are working on. Do NOT fix pre-existing issues in a PR scoped to something else unless the user explicitly asks.

Step 4: If you see something suspicious in the logs, ask HOW it connects

When you see an error or warning in the logs, do NOT immediately assume it is the root cause. Ask:

  • Is this error on the code path of the failing request, or is it a different background operation?
  • Does this error BLOCK the worker, or is it caught and handled?
  • Would fixing this error actually change the user-visible symptom?

Example: seeing FAISS index not initialized in logs does NOT mean FAISS is the problem. It might be a non-fatal warning from a background task that runs in parallel. Trace the actual call stack of the failing request.

Step 5: Before proposing a code change, answer these questions

  1. Is a code change actually needed? Could this be a configuration issue (.env, timeout, feature flag)?
  2. Present options to the user before implementing. Do NOT just pick a fix and implement it. Present 2-3 well-thought-out options with trade-offs (complexity, risk, scope, reversibility) and let the user choose. One-line fixes are preferred over architectural changes, but the user decides.
  3. Does this fix have side effects? Does it change behavior for OTHER callers, OTHER deployments, OTHER code paths?
  4. Will hot-patching work? If you docker-cp a file into a running container:
    • The restart will invalidate sessions (auth-server restart = all browser cookies invalid)
    • nginx_service.py will re-render the nginx config on startup (may break routing)
    • Startup tasks will re-run (may block the worker for 30+ seconds)
    • Consider whether a simple rebuild is faster than iterative hot-patching.
  5. Does this need a test? If you are changing backend logic, YES. Always.

Step 6: Cross-question your own theory

Before implementing, argue against your own hypothesis:

  • "If CORS is the problem, why do all the GETs work from the same browser?"
  • "If the scan timeout is the problem, why does curl finish in 5 seconds?"
  • "If nginx is blocking the request, why is there no error in the nginx error log?"
  • "If the session is invalid, why did the dashboard load successfully moments ago?"

If you cannot answer the counter-question, your theory is wrong. Go back to Step 2.

Anti-patterns to avoid

  • Do NOT chase CORS on same-origin requests. If the browser URL and the API URL have the same scheme + host + port, CORS does not apply. Period.
  • Do NOT hot-patch containers repeatedly. Each restart creates new state. After 2 failed hot-patches, do a clean build_and_run.sh and test once.
  • Do NOT make async/background changes to "fix" a timeout unless you have proven the timeout is caused by the specific function you are making async. The real cause is usually a DIFFERENT function blocking the worker.
  • Do NOT add CORS, nginx, or auth-server changes without first confirming the request actually reaches (or fails to reach) those layers. Check logs at each layer in order: nginx access log → auth-server validate → registry endpoint.
  • Do NOT assume "no logs = request didn't reach the backend." It might mean the worker is busy processing something else and your request is queued behind it.

Debugging checklist (copy into your response)

When debugging, paste this and fill it in:

[ ] Exact error: ___
[ ] Same operation via curl: works / fails / different error
[ ] Registry logs at failure timestamp show: ___
[ ] Worker was busy doing: ___ (or idle)
[ ] Pre-existing on baseline? yes / no / untested
[ ] Theory: ___
[ ] Counter-argument against theory: ___
[ ] Theory survives counter-argument? yes / no

Only propose a fix after all boxes are checked and the theory survives.

Frequently asked questions

What does the Debug AI skill do?

Debug issues in the MCP Gateway Registry using first-principles thinking. Invoke when something is broken, timing out, returning errors, or behaving unexpectedly. Forces structured root-cause analysis before any code change is proposed.

Why use Debug on TypingMind?

Because you install it once and use it with any model. Debug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Debug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/agentic-community/mcp-gateway-registry/tree/main/.claude/skills/debug. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Debug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Debug?

As many as you like. As long as a model supports skills, you can use Debug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Debug AI skill free?

Yes. It is published on GitHub by agentic-community under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇