python-debugpy

python-debugpy is a skill for Claude Code, Codex from sairam0424/MindForge. It costs 17 tokens per session (3,554 once invoked), scanned B, a copy of python-debugpy, MIT.

A guide to debugging Python programs with pdb, an interactive command-line debugger, and debugpy, which supports remote debugging of running processes.

In plain words
What is it for?
Use it to pause at a line, launch a script under a debugger, attach to a long-running process, or inspect a subprocess after an exception.
Why use it?
It helps you inspect variables and execution step by step when an error message or test traceback does not show the real cause.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to pause at a line, launch a script under a debugger, attach to a long-running process, or inspect a subprocess after an exception.

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

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/sairam0424/mindforge/python-debugpy/github.svg)](https://agentmods.dev/skills/sairam0424/mindforge/python-debugpy)
Your own site
<a href="https://agentmods.dev/skills/sairam0424/mindforge/python-debugpy"><img src="https://agentmods.dev/badge/skills/sairam0424/mindforge/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/sairam0424/mindforge/python-debugpy"><img src="https://agentmods.dev/badge/skills/sairam0424/mindforge/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 3,554 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod 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.03554
Opus 5 $0.00009 $0.01777
Sonnet 5 $0.00003 $0.00711
Haiku 4.5 $0.00002 $0.00355

Measured 6d ago against content hash b0df0182f330, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

python-debugpy scanned grade B with 1 finding 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 6d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Origin

This is a copy

92% identical to python-debugpy — 37 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agent/skills/python-debugpy/SKILL.md · 369 lines

How it starts

The opening of the file, as written. The whole thing — 369 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 the source, run normally, get a REPL at that line.
python -m pdb Launch an existing script under pdb with no source edits. Useful for quick poking.
debugpy Remote / headless / "attach to already-running process." Talks DAP, scriptable from terminal, works for long-lived processes (gateway, daemon, PTY children).

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 (hermes gateway, tui_gateway) misbehaves and you can't restart it
  • Post-mortem: an exception fired in prod-ish code and you want to inspect locals at the crash site
  • A subprocess / child (Python _SlashWorker, PTY bridge worker) 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)
l / ll list source around current line / full function
w where (stack trace)
u / d move up / down in the stack
a print args of the current function
p expr / pp expr print / pretty-print expression
display expr auto-print expr on every stop
b file:line set breakpoint
b func break on function entry
b file:line, cond conditional breakpoint
cl N clear breakpoint N
tbreak file:line one-shot breakpoint
!stmt execute arbitrary Python (assignments included)
interact drop into full Python REPL in current scope (Ctrl+D to exit)
q quit

Read the full file on GitHub · 369 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. 6d ago First seen · 369 lines · 17 tokens per session scan B b0df0182f330

Subscribe to this mod's changes

python-debugpy is a skill published in the GitHub repository sairam0424/MindForge (0 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 3,554 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). It is 92% identical to python-debugpy, differing in 37 lines, and is treated as a copy.