python-run

python-run is a skill for Claude Code from congchuanling-dot/Cohort. It costs 56 tokens per session (587 once invoked), scanned A, original, MIT.

A workflow for running and debugging Python scripts in a project. It checks the Python version, syntax, imported packages, program output, and error messages before or during execution.

In plain words
What is it for?
Use it when you need to run, lint, or debug a .py file. It can verify dependencies, compile-check the file, execute it, and interpret a traceback if it fails.
Why use it?
It catches syntax and dependency problems before a script is run and explains failures in plain language. It also avoids silently changing the script when the cause is unclear.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when you need to run, lint, or debug a .py file. It can verify dependencies, compile-check the file, execute it, and interpret a traceback if it fails.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/congchuanling-dot/cohort/python-run
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 congchuanling-dot/Cohort --skill python-run
Clone the repo
git clone --depth 1 https://github.com/congchuanling-dot/Cohort

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-run

README.md
[![agentmods](https://agentmods.dev/badge/skills/congchuanling-dot/cohort/python-run/github.svg)](https://agentmods.dev/skills/congchuanling-dot/cohort/python-run)
Your own site
<a href="https://agentmods.dev/skills/congchuanling-dot/cohort/python-run"><img src="https://agentmods.dev/badge/skills/congchuanling-dot/cohort/python-run/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-run

Your own site · 80×15
<a href="https://agentmods.dev/skills/congchuanling-dot/cohort/python-run"><img src="https://agentmods.dev/badge/skills/congchuanling-dot/cohort/python-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 587 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 59
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00056 $0.00587
Opus 5.5 $0.00022 $0.00235
Sonnet 5.5 $0.00011 $0.00117
Haiku 4.5 $0.00006 $0.00059

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

Security

Grade A, and why

python-run 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.

.cohort/skills/python-run/SKILL.md · 82 lines

What it actually says

You are a Python engineer running scripts with discipline.

Rules

  • Check Python version first — always run python3 --version before anything
  • Check dependencies — if the script imports packages, verify they're installed via python3 -c "import ..."
  • Dry-run lint before execution — python3 -m py_compile script.py catches syntax errors
  • Never run a script as root or with sudo
  • Timeout — scripts that run longer than 30s should be flagged, ask user before extending
  • Error output — when a script fails, read the traceback and explain it in plain language
  • Never modify the script without user approval unless it's a trivial syntax fix

Process

Step 1 — Pre-flight

python3 --version
python3 -m py_compile <script>

If py_compile fails, report the syntax error with line number and stop.

Step 2 — Dependency check

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.

Step 3 — Execute

python3 <script> [args...]

Capture stdout and stderr. If it succeeds, report the output. If it fails, go to Step 4.

Step 4 — Error analysis

For any traceback:

  • Identify the error type (SyntaxError, ImportError, TypeError, etc.)
  • Point to the exact line
  • Explain why it likely happened
  • Propose a fix (but don't apply without asking)

Examples

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`
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 · 82 lines · 56 tokens per session scan A c7e352abdbaa

Subscribe to this mod's changes

python-run is a skill published in the GitHub repository congchuanling-dot/Cohort (183 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 587 once invoked, about $0.0002 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.