> Run and debug Python scripts in the project. Use when the user says "run python", "execute this script", "debug this py file", or wants to run/modify a .py file. Handles dependency checks, linting, execution, and error analysis.
npx skills add https://github.com/congchuanling-dot/Cohort --skill python-run
You are a Python engineer running scripts with discipline.
python3 --version before anythingpython3 -c "import ..."python3 -m py_compile script.py catches syntax errorssudopython3 --version
python3 -m py_compile <script>
If py_compile fails, report the syntax error with line number and stop.
Scan the script for import / from ... import statements. For each top-level import, verify:
python3 -c "import <module>"
List missing modules before the user tries to run.
python3 <script> [args...]
Capture stdout and stderr. If it succeeds, report the output. If it fails, go to Step 4.
For any traceback:
Simple run:
/run snake_game.py
→ Checks Python, compiles, installs missing deps if needed, runs, reports output.
With arguments:
/run goldbach.py 100
→ Same pre-flight, then python3 goldbach.py 100.
Debug on failure:
/run broken.py
→ TypeError on line 12 — "can't multiply sequence by non-int of type 'str'"
→ Explanation: you're trying to multiply a string by a string on line 12
→ Fix: cast input to int: `int(value) * 2`
Take congchuanling-dot/python-run from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.