python-debugpy

python-debugpy is a skill for Claude Code, Codex from subhansh-dev/agent-maxxing. It costs 23 tokens per session (697 once invoked), scanned A, original, MIT.

A set of instructions for debugging Python programs with built-in tools such as pdb and breakpoint(), plus debugpy for connecting to a running or remote process.

In plain words
What is it for?
Use it to investigate failing tests, confusing state changes, subprocesses, long-running services, unhandled exceptions, or Python programs running without a visible terminal.
Why use it?
It helps you inspect variables, follow program execution, and stop at the code causing a failure instead of guessing from error messages alone.

Skill for Claude CodeCodex

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

Good fit Use it to investigate failing tests, confusing state changes, subprocesses, long-running services, unhandled exceptions, or Python programs running without a visible terminal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/subhansh-dev/agent-maxxing/26-python-debugpy
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 subhansh-dev/agent-maxxing --skill 26-python-debugpy
Clone the repo
git clone --depth 1 https://github.com/subhansh-dev/agent-maxxing

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 python-debugpy

README.md
[![agentmods](https://agentmods.dev/badge/skills/subhansh-dev/agent-maxxing/26-python-debugpy/github.svg)](https://agentmods.dev/skills/subhansh-dev/agent-maxxing/26-python-debugpy)
Your own site
<a href="https://agentmods.dev/skills/subhansh-dev/agent-maxxing/26-python-debugpy"><img src="https://agentmods.dev/badge/skills/subhansh-dev/agent-maxxing/26-python-debugpy/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 python-debugpy

Your own site · 80×15
<a href="https://agentmods.dev/skills/subhansh-dev/agent-maxxing/26-python-debugpy"><img src="https://agentmods.dev/badge/skills/subhansh-dev/agent-maxxing/26-python-debugpy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 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.00023 $0.00697
Opus 5.5 $0.00009 $0.00279
Sonnet 5.5 $0.00005 $0.00139
Haiku 4.5 $0.00002 $0.00070

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

Security

Grade A, and why

python-debugpy 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 3mo 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.

engineering/26-PYTHON-DEBUGPY/SKILL.md · 74 lines

How it starts

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

Python Debugpy

Use when Python code needs interactive debugging: hidden locals, confusing state mutation, failing tests, subprocesses, long-running services, or remote/headless attach.

Pick the smallest debugger that reaches the bad frame.

Choose

  • breakpoint(): local code, source edits ok, fastest path.
  • python3 -m pdb: no source edit, launch from the beginning.
  • python3 -m pdb -c continue: stop at an unhandled exception.
  • debugpy: remote/headless process, DAP client, already-running PID, or service startup race.

Commands

python3 -m pdb path/to/script.py arg1
python3 -m pdb -c continue path/to/script.py
python3 -c "import debugpy" || python3 -m pip install debugpy
python3 -m debugpy --listen 127.0.0.1:5678 --wait-for-client path/to/script.py
python3 -m debugpy --listen 127.0.0.1:5678 --wait-for-client -m package.module
python3 -m debugpy --listen 127.0.0.1:5678 --pid <pid>

For source-edit attach:

import debugpy

debugpy.listen(("127.0.0.1", 5678))
debugpy.wait_for_client()
debugpy.breakpoint()

For post-mortem:

import pdb, sys

try:
    run()
except Exception:
    pdb.post_mortem(sys.exc_info()[2])
    raise

pdb

  • Flow: n, s, r, c, q.
  • Stack/source: w, u, d, a, l, ll.
  • Values: p expr, pp expr, display expr.
  • Breakpoints: b file.py:42, b func, b file.py:42, condition, cl <num>.
  • Mutate/evaluate: !statement; full REPL: interact.

Rules

  • Reproduce with the smallest command/test first.
  • Disable parallel test workers for pdb; interactive stdin usually breaks inside worker pools.
  • Keep debugpy in the active env; do not add it as a project dependency unless the project already wants it.
  • Bind debug servers to 127.0.0.1; do not expose 0.0.0.0 unless isolated or tunnelled.
  • Use unique ports for parallel sessions.
  • Treat debugpy --pid as injection; avoid security-sensitive or production targets unless explicitly approved.
  • If PID attach fails on Linux, check ptrace/container privileges before changing the target.
  • Cleanup before commit: rg -n 'breakpoint\\(|pdb\\.set_trace|debugpy\\.' --type py.
  • Rerun the normal project test/gate without the debugger.
  • PYTHONBREAKPOINT=0 disables breakpoint().
  • If a process is stuck after debugger detach, confirm it is not still paused at a breakpoint.

Read the full file on GitHub · 74 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. 3mo ago First seen · 74 lines · 23 tokens per session scan A e3897c602f5b

Subscribe to this mod's changes

python-debugpy is a skill published in the GitHub repository subhansh-dev/agent-maxxing (4 stars, last pushed 4mo ago), licensed MIT. It adds 23 tokens to every session and 697 once invoked, about $0.0001 per session on Opus 5.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

python-debugpy compared with skills from other repositories

python-debugpy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-debugpysubhansh-dev/agent-maxxingSkill44mo agoMITA23Claude Code, Codex
rust-checkHmbown/CodeWhaleSkill41k2d agoMITA15Claude Code, Codex
autofixQwenLM/qwen-codeSkill31ktodayApache-2.0C30Claude Code
smellsmallnest/pigoSkill50613d agoMITA97Claude Code
design-reviewdimetron/pi-goSkill232yesterdayMITA30Claude Code, Codex
pi-loop-forensicsdimetron/pi-goSkill232yesterdayMITA65Claude Code, Codex
nightly-session-watchdimetron/pi-goSkill232yesterdayMITA78Claude Code, Codex