mcpField
P
python-scripting

python-scripting

github.com/89jobrienDevelopment4139 installsUpdated 10w ago
Repository

About python-scripting

A skill for creating focused, standalone Python scripts with uv and PEP 723 inline metadata. It is intended for developers handling small automation, data-processing, or command-line tasks, and includes guidance for dependencies, arguments, I/O, and reproducibility.

Key features

  1. 01Standalone Python script generation
  2. 02PEP 723 inline dependencies
  3. 03argparse command-line arguments
  4. 04Input and output handling
  5. 05Reproducible build guidance

Use cases

  1. 01Building a one-off automation script
  2. 02Processing data with a small utility
  3. 03Creating a Python command-line tool

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/89jobrien/steve --skill python-scripting

After installing, type/python-scriptingin Claude Code to confirm it loaded.

Bundled filesreferences/uv-script.template.py

Details

From the project README

Python Scripting Skill

Creates self-contained Python scripts using uv and PEP 723 inline script metadata.

What This Skill Does

  • Creates standalone Python scripts
  • Uses PEP 723 inline dependencies
  • Sets up argument parsing
  • Handles input/output
  • Configures reproducible builds

When to Use

  • Standalone utility scripts
  • One-off automation tasks
  • Quick data processing
  • CLI tools
  • Scripts that need dependencies

Reference Files

  • references/UV_SCRIPT.template.py - Python script template with PEP 723 metadata

PEP 723 Format

#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
#   "requests",
#   "rich",
# ]
# ///

Running Scripts

uv run script.py [args]

Dependencies install automatically on first run.

Best Practices

  • Use exclude-newer for reproducibility
  • Include docstring with usage examples
  • Use argparse for CLI arguments
  • Return exit codes (0 success, non-zero error)
  • Keep scripts focused on one task

Comments

Markdown supported