AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Unlicense Self-run

Coding In Python

skill-yale-som-hpc-claude-code-marketplace-coding-in-python · by yale-som-hpc

How to write Python well — uv environments, formatting, CLI scripts, logging, seeds. TRIGGER when authoring or editing .py files. For running Python on the Yale SOM HPC cluster (sbatch, Slurm, uv on /gpfs), use running-python instead.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-yale-som-hpc-claude-code-marketplace-coding-in-python

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access Used
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-yale-som-hpc-claude-code-marketplace-coding-in-python)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Coding In Python? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Coding in Python

Rule: locked env, portable paths, thin notebooks, runnable scripts.

For cluster execution, also load [running Python](../running-python/SKILL.md).

Defaults

  • uv for envs and lockfiles. Commit pyproject.toml and uv.lock; ignore .venv/.
  • ruff for format + lint.
  • pathlib for paths.
  • argparse for scripts. Use click only for real subcommands.
  • logging, not scattered print(), for long runs.
  • pytest for reusable logic; smoke tests for analysis scripts.
uv init --app
uv add polars pyarrow duckdb pandas statsmodels
uv add --dev ruff pytest
uv sync --frozen

On HPC: sync/setup before large jobs. For long Slurm jobs call .venv/bin/python directly; see [running Python](../running-python/SKILL.md).

Layout

project/
├── pyproject.toml
├── uv.lock
├── README.md
├── scripts/       # entry points
├── src/           # shared helpers, or lib.py for tiny projects
├── notebooks/     # exploration
├── data/raw/      # immutable; usually ignored
├── data/derived/  # rebuildable
└── results/       # figures/tables/logs

Paths

Never commit laptop/user paths: /Users/..., C:\Users\..., /home/netid/..., /gpfs/scratch60/netid/....

from pathlib import Path

REPO = Path(__file__).resolve().parents[1]
DATA = REPO / "data" / "raw" / "panel.parquet"

For scripts, accept paths as args:

import argparse
from pathlib import Path

parser = argparse.ArgumentParser()
parser.add_argument("--input", type=Path, required=True)
parser.add_argument("--output", type=Path, required=True)
args = parser.parse_args()

Style

  • f-strings.
  • Imports at top.
  • Type hints on public/helper function signatures.
  • @dataclass(frozen=True) for small immutable records.
  • pydantic only for external/untrusted input.
  • Context managers for every file/network/DB handle.
  • Early returns to reduce nesting.
  • Fixed seeds: rng = np.random.default_rng(42); pass rng through.

Logging

import logging

log = logging.getLogger(__name__)

def main() -> None:
    logging.basicConfig(
        level=logging.INFO,
        format="%(asctime)s %(levelname)s %(name)s: %(message)s",
    )
    log.info("starting")

Log rows loaded, files written, model dimensions, task IDs.

Notebooks

  • Notebook for exploration/figures.
  • Script for batch/rebuild/Slurm.
  • Cell >30 lines: move to src/ or lib.py.
  • Do not import from notebooks.

Checks

uv run ruff format .
uv run ruff check .

Checklist

  • [ ] Ruff clean
  • [ ] No hardcoded personal paths
  • [ ] Seeds set
  • [ ] uv.lock updated if deps changed
  • [ ] Small smoke test run
  • [ ] HPC long jobs use .venv/bin/python

Further reading

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.