python-debug-execution-911f17

python-debug-execution-911f17 is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 23 tokens per session (824 once invoked), scanned A, original, MIT.

A method for diagnosing failed Python scripts by capturing the full error traceback, exit code, and working directory.

In plain words
What is it for?
It is for investigating Python execution errors and file-operation problems.
Why use it?
It replaces vague failure messages with the details needed to identify whether the script or its file paths caused the problem.

Skill for Claude CodeCodex

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

Good fit It is for investigating Python execution errors and file-operation problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/python-debug-execution-911f17
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,931 stars · on GitHub

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 HKUDS/OpenSpace --skill python-debug-execution-911f17
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

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-debug-execution-911f17

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/python-debug-execution-911f17/github.svg)](https://agentmods.dev/skills/hkuds/openspace/python-debug-execution-911f17)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/python-debug-execution-911f17"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/python-debug-execution-911f17/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-debug-execution-911f17

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/python-debug-execution-911f17"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/python-debug-execution-911f17.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 824 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.00023 $0.00824
Opus 5.5 $0.00009 $0.00330
Sonnet 5.5 $0.00005 $0.00165
Haiku 4.5 $0.00002 $0.00082

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

Security

Grade A, and why

python-debug-execution-911f17 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 2mo 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.

benchmarks/gdpval/skills/python-debug-execution-911f17/SKILL.md · 129 lines

How it starts

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

Python Debug Execution

This skill provides a pattern for debugging Python script execution failures. It ensures you capture actual tracebacks instead of opaque errors and verifies the working directory before file operations.

Core Pattern

1. Execute with Full Traceback Capture

Always run Python scripts with stderr redirected and exit code reported:

python3 script.py 2>&1 ; echo Exit code: $?

This pattern:

  • 2>&1 - Redirects stderr to stdout so all output (including tracebacks) is captured together
  • echo Exit code: $? - Reports the exit code to distinguish between successful runs and failures

Why this matters: Opaque errors without tracebacks make it impossible to identify the root cause. The exit code tells you if the script succeeded (0) or failed (non-zero).

2. Verify Working Directory Before File Operations

Before any file read/write operations in your Python script, add:

import os
print(f"Current working directory: {os.getcwd()}")

Or for debugging, add at the start of your script:

import os
import sys

# Debug: show execution context
print(f"Script path: {__file__}")
print(f"Working directory: {os.getcwd()}")
print(f"Python version: {sys.version}")

Why this matters: File operations often fail due to incorrect assumptions about the current working directory. Verifying os.getcwd() helps diagnose path-related errors.

Usage Examples

Example 1: Running a Script with Debug Output

# Instead of:
python3 analyze.py

# Use:
python3 analyze.py 2>&1 ; echo Exit code: $?

Example 2: Script with Directory Verification

#!/usr/bin/env python3
import os
import pandas as pd

# Verify execution context
print(f"Working directory: {os.getcwd()}")

# Now safe to do file operations
data_path = "data/input.csv"
print(f"Attempting to read: {data_path}")

# Check if file exists before reading
if os.path.exists(data_path):
    df = pd.read_csv(data_path)
    print(f"Successfully loaded {len(df)} rows")
else:
    print(f"ERROR: File not found at {os.path.abspath(data_path)}")
    print(f"Directory contents: {os.listdir('.')}")

Read the full file on GitHub · 129 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 129 lines · 23 tokens per session scan A 61612d9de0cb

Subscribe to this mod's changes

python-debug-execution-911f17 is a skill published in the GitHub repository HKUDS/OpenSpace (7,931 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 824 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-09-03.

Related

python-debug-execution-911f17 compared with skills from other repositories

python-debug-execution-911f17 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-debug-execution-911f17HKUDS/OpenSpaceSkill7.9kyesterdayMITA23Claude Code, Codex
python-code-qualitymicrosoft/agent-frameworkSkill15kyesterdayMITA40Claude Code, Codex
plugin-architecture-patternsxberg-io/xbergSkill9.6ktodayMITA15Claude Code
test-corpusxberg-io/xbergSkill9.6ktodayMITA15Claude Code, Codex
stack-trace-python-probeopensquilla/opensquillaSkill7.1k2d agoApache-2.0A40Claude Code
idapythonmrexodia/ida-pro-mcpSkill13k1mo agoMITA77Claude Code
memory-optimizationbenchflow-ai/skillsbenchSkill1.9k4d agoApache-2.0A60Claude Code, Codex