home / skills / sandraschi / advanced-memory-mcp / python-debugging-expert
This skill helps you diagnose Python issues efficiently using expert debugging playbooks, tools, and best practices for reliable, faster code.
npx playbooks add skill sandraschi/advanced-memory-mcp --skill python-debugging-expertReview the files below or copy the command above to add this skill to your agents.
---
name: python-debugging-expert
description: Master debugger for Python code with expertise in common errors, performance issues, and debugging tools
license: Proprietary
---
# Python Debugging Expert
> **Status**: ✅ Research complete
> **Last validated**: 2025-11-08
> **Confidence**: 🟡 Medium — Research-backed debugging playbook – review semi-annually
## How to use this skill
1. Begin with [modules/core-guidance.md](modules/core-guidance.md) to triage the issue and plan reproduction.
2. Use [modules/diagnostics-and-tooling.md](modules/diagnostics-and-tooling.md) to select appropriate debuggers and tracing tools.
3. Resolve concurrency issues via [modules/async-and-concurrency.md](modules/async-and-concurrency.md).
4. Address hotspots and leaks with [modules/performance-and-memory.md](modules/performance-and-memory.md).
5. Stabilize reproduction pipelines through [modules/testing-and-reproduction.md](modules/testing-and-reproduction.md).
6. Track follow-ups in [modules/known-gaps.md](modules/known-gaps.md) and revisit [modules/research-checklist.md](modules/research-checklist.md) every six months.
## Module overview
- [Core guidance](modules/core-guidance.md) — intake template, triage, communication.
- [Diagnostics & tooling](modules/diagnostics-and-tooling.md) — pdb, debugpy, logging, tracing, IDE features.
- [Async & concurrency](modules/async-and-concurrency.md) — asyncio debugging, race detection, multiprocessing.
- [Performance & memory](modules/performance-and-memory.md) — profiling CPU/memory, GC, leak detection.
- [Testing & reproduction](modules/testing-and-reproduction.md) — fixtures, property-based tests, CI automation.
- [Known gaps](modules/known-gaps.md) — future research.
- [Research checklist](modules/research-checklist.md) — validation cadence.
## Research status
- Updated for Python 3.13 debugging improvements, async task diagnostics, and modern tooling.
- Next review due 2026-05-01 or sooner if CPython introduces major debugging changes.
- Known gaps capture C extension debugging and distributed tracing coverage pending further work.
This skill is a master debugger for Python code that codifies a repeatable playbook for diagnosing errors, performance issues, and concurrency bugs. It consolidates triage templates, recommended tooling, and focused modules for async, memory, and reproduction workflows. The playbook is kept current with Python releases and recommends a semi-annual review cadence.
The skill guides you through an intake and triage process to capture reproduction steps and scope the problem. It recommends specific diagnostics—pdb, debugpy, logging, tracers, profilers—and hands-on techniques for async and multiprocessing issues. For performance and memory problems it prescribes profiling, GC inspection, and leak detection; for stability it provides testing and CI reproduction patterns. Known gaps and a research checklist help prioritize further investigation.
Which debuggers and profilers are recommended?
Use pdb or debugpy for step-debugging; combine logging and structured traces for production. Use cProfile, py-spy, or scalene for CPU; tracemalloc and objgraph for memory analysis.
How often should the playbook be reviewed?
Review the playbook at least every six months or sooner when Python or major tooling introduces relevant changes.