python-debugpy

python-debugpy is a skill for Claude Code from HezaoHezao/poirot. It costs 17 tokens per session (1,206 once invoked), scanned A, original, MIT.

A set of tools for finding and fixing bugs in Python programs. It includes pdb, an interactive debugger you run locally, and debugpy, which lets a separate debugger connect to a running program.

In plain words
What is it for?
Stepping through functions, examining changing values, investigating exceptions, debugging subprocesses, and attaching to long-running or headless Python processes.
Why use it?
It helps you inspect the program at the point where something goes wrong instead of guessing from error messages or adding many print statements.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: built for hermes-agent.

Good fit Stepping through functions, examining changing values, investigating exceptions, debugging subprocesses, and attaching to long-running or headless Python processes.

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

Made for: Claude Code.

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/hezaohezao/poirot/python-debugpy/github.svg)](https://agentmods.dev/skills/hezaohezao/poirot/python-debugpy)
Your own site
<a href="https://agentmods.dev/skills/hezaohezao/poirot/python-debugpy"><img src="https://agentmods.dev/badge/skills/hezaohezao/poirot/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/hezaohezao/poirot/python-debugpy"><img src="https://agentmods.dev/badge/skills/hezaohezao/poirot/python-debugpy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,206 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00017 $0.01206
Opus 5.5 $0.00007 $0.00482
Sonnet 5.5 $0.00003 $0.00241
Haiku 4.5 $0.00002 $0.00121

Measured 1mo ago against content hash 562f895cf95d, 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 1mo 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.

poirot/backend/agents/skill/builtin_skills/software-development/python-debugpy/SKILL.md · 175 lines

How it starts

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

Python Debugger (pdb + debugpy)

Overview

Three tools, picked by situation:

Tool When
breakpoint() + pdb Local, interactive, simplest. Add breakpoint() in source, run, get REPL.
python -m pdb Launch script under pdb with no source edits.
debugpy Remote / headless / attach to running process. DAP, scriptable.

Start with breakpoint(). It's the cheapest thing that works.

When to Use

  • A test fails and the traceback doesn't reveal why a value is wrong
  • You need to step through a function and watch a collection mutate
  • A long-running process misbehaves and you can't restart it
  • Post-mortem: an exception fired and you want to inspect locals at crash site
  • A subprocess is the actual bug site

Don't use for: things print() / logging.debug solve in under a minute, or things pytest -vv --tb=long --showlocals already reveals.

pdb Quick Reference

Inside any pdb prompt ((Pdb)):

Command Action
h / h cmd help
n next line (step over)
s step into
r return from current function
c continue
unt N continue until line N
j N jump to line N (same function only)
b N set breakpoint at line N
b file:N set breakpoint in another file
b func set breakpoint at function
cl N clear breakpoint N
l list 11 lines around current
ll list whole function
w / where show call stack
u / d move up/down stack frame
p expr print expression
pp expr pretty-print expression
a print args of current function
args same as a
display expr watch expression (re-eval each step)
interact drop into interactive Python REPL

Using breakpoint()

def process(data):
    result = transform(data)
    breakpoint()  # Execution pauses here, pdb REPL opens
    return result

Run normally:

python script.py
# Pauses at breakpoint(), (Pdb) prompt appears

Read the full file on GitHub · 175 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. 1mo ago First seen · 175 lines · 17 tokens per session scan A 562f895cf95d

Subscribe to this mod's changes

python-debugpy is a skill published in the GitHub repository HezaoHezao/poirot (251 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 1,206 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-30.