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
- 01Standalone Python script generation
- 02PEP 723 inline dependencies
- 03argparse command-line arguments
- 04Input and output handling
- 05Reproducible build guidance
Use cases
- 01Building a one-off automation script
- 02Processing data with a small utility
- 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-scriptingAfter installing, type/python-scriptingin Claude Code to confirm it loaded.
Bundled filesreferences/uv-script.template.py
Details
From the project READMEPython 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-newerfor 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