debug
Skill956 starsChanged 56 days agoApache-2.0View on GitHub
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.
- Reads credentials
144 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- prathish-ks/isthmustheir own version, first seen Oct 6, 2026
- muon-m2/magento2-toolstheir own version, first seen Oct 4, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- nanocoai/nanoclawtheir own version, first seen Oct 4, 2026
- LuisUrrutia/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use add-ollama-tool, add-slack and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilladd-ollama-tool
Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.
Also in 6 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 6 projects that use this
sskarzSkilladd-telegram-swarm
Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".
Also in 5 projects that use this
- +9 more from microsoft
Other versions144 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 144
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- nanocoai/nanoclaw★ 31ksame name
- openai/symphony★ 28ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- NVIDIA/Model-Optimizer★ 5.2ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- jsmastery-pro/skills★ 1.4ksame name
- suboss87/FDEOps★ 950same name
- kdlbs/kandev★ 899same name
- cyrusagents/cyrus★ 846same name
134 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- agentcore-registerSkill
- benchmark-reportSkill
- create-milestoneSkill
- explainerSkill
- generate-agent-cardSkill
- generate-server-cardSkill
- infra-syncSkill
- macos-setupSkill
- new-feature-designSkill
- pr-reviewSkill
- release-notesSkill
- search-benchmarkSkill
- search-registrySkill
- terraform-setupSkill
- usage-reportSkill
- usage-report-v0Skill
- writingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 16 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 127 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Before starting, announce that you are consulting the following expert panel.
- Distinctive: line 32
If curl works but browser doesn't: the difference is timing or session, NOT the backend logic.
- Distinctive: line 42
Read what the logs say at the EXACT timestamp of the failure.
- Distinctive: line 49
If the worker is busy with a background task, your request is queued.
- Distinctive: line 53
Before touching ANY code, answer:
- Distinctive: line 58
If the issue exists on the baseline tag with zero changes, it is pre-existing and unrelated to whatever PR you are working on.
- Distinctive: line 62
When you see an error or warning in the logs, do NOT immediately assume it is the root cause.
- Distinctive: line 72
Present options to the user before implementing: Do NOT just pick a fix and implement it.
- Distinctive: line 74
Will hot-patching work?: If you docker-cp a file into a running container:
- Distinctive: line 78
Consider whether a simple rebuild is faster than iterative hot-patching.
- Distinctive: line 79
Does this need a test?: If you are changing backend logic, YES.
- Distinctive: line 83
Before implementing, argue against your own hypothesis:
- Distinctive: line 89
If you cannot answer the counter-question, your theory is wrong.
- Distinctive: line 93
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.
- Distinctive: line 101
When debugging, paste this and fill it in:
- Distinctive: line 114
Only propose a fix after all boxes are checked and the theory survives.
“Common” is measured: kept by at least 6 in 10 of the 127 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
docker compose logs registry --since=30s 2>&1 | tail -30Read 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
- Is a code change actually needed? Could this be a configuration issue (.env, timeout, feature flag)?
- 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.
- Does this fix have side effects? Does it change behavior for OTHER callers, OTHER deployments, OTHER code paths?
- 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.
- 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.shand 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 / noOnly propose a fix after all boxes are checked and the theory survives.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

