ワンクリックで
python-debug
Debug common Python runtime errors by reading tracebacks and applying targeted fixes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Debug common Python runtime errors by reading tracebacks and applying targeted fixes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Construct correct regular expressions for common text matching and validation challenges.
Debug common SQL query errors by identifying anti-patterns and applying targeted fixes.
Teaches agents how to use the skillforge CLI to distill procedural skills from model traces.
| name | python-debug |
| description | Debug common Python runtime errors by reading tracebacks and applying targeted fixes. |
| version | 0.1.0 |
| source_model | claude-opus-4 |
| extracted_from | {"total_traces":15,"passed_traces":13,"failed_traces":2,"extractor":"reflective@0.1","extracted_at":"2024-06-01T00:00:00+00:00"} |
| triggers | ["traceback","error","exception","TypeError","AttributeError","KeyError","IndexError"] |
| domains | ["python","debugging"] |
| license | Apache-2.0 |
Apply this skill when you encounter a Python runtime error (traceback) and need to identify the root cause and produce a minimal fix. Covers: TypeError, AttributeError, KeyError, IndexError, ImportError, ValueError, RecursionError, async misuse, off-by-one errors, and mutable default arguments.
str() or f-string to convert non-string operandsif x is not None guard or use getattr(x, attr, default)dict.get(key, default) instead of direct accessif collection before indexinglen(x) - 1 or adjust range boundsNone as default, assign inside the function bodyawait before coroutine callsrange(start, end + 1) for inclusive upper boundInput: result = "count: " + 42
Fix: result = "count: " + str(42)
Input: user['role'] when key doesn't exist
Fix: user.get('role', 'unknown')
Input: def add_item(item, lst=[])
Fix: def add_item(item, lst=None): lst = lst if lst is not None else []
Exception without re-raising or loggingtype(x) == T when isinstance(x, T) is appropriateexcept: pass blockshasattr as a substitute for understanding the data model