uv-script

Create runnable Python scripts with uv shebang and PEP 723 metadata.

1|Updated Nov 25, 2025
One-click install
npx skills add https://github.com/89jobrien/dotfiles --skill uv-script-89jobrien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uv-script
Source: https://github.com/89jobrien/dotfiles/tree/main/dot-claude/skills/uv-script
Command: npx skills add https://github.com/89jobrien/dotfiles --skill uv-script-89jobrien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you write standalone Python scripts and one-off utilities without resorting to python3 -c, by using a uv shebang, PEP 723 inline metadata, and explicit dependency declarations.

Core Features & Use Cases

  • Inline metadata support: declare requires-python and dependencies directly in the script header.
  • One-shot scripting workflow: run scripts with uv run --script for quick utilities and experiments.
  • Safer, maintainable scripting: avoids brittle python -c commands and promotes readable, repeatable setups.

Quick Start

Create a script that starts with #!/usr/bin/env -S uv run --script and include the inline metadata header.

Frequently Asked Questions about uv-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write standalone Python scripts with inline dependencies?

You can write standalone Python scripts by adding a uv shebang and PEP 723 inline metadata to declare dependencies directly in the script header. This allows you to run the file as a self-contained executable without needing a full module setup.

What is PEP 723 inline metadata for Python scripting?

PEP 723 inline metadata is a standard for declaring dependencies and required Python versions directly within a script's header. It enables single-file scripting workflows by embedding configuration normally found in a project file.

Do I need uv installed to run Python scripts with inline metadata?

Yes, you need the uv runtime installed to execute scripts using this method. The script relies on a uv shebang and the 'uv run --script' command to automatically process the inline metadata and manage the declared dependencies.

What is the best way to run one-off Python utilities without creating a full module?

The best way to run one-off utilities is creating a script with a uv shebang and PEP 723 metadata. This approach avoids brittle 'python -c' commands and provides a safer, maintainable, and repeatable setup for quick data transforms.

When should I not use inline metadata for Python scripting?

You should avoid using inline metadata when your project requires a full module structure or complex configuration beyond simple dependencies. This approach is specifically designed for quick utilities, exploratory scripting, and one-off data transforms rather than large applications.

How does a uv shebang work with standalone Python scripts?

A uv shebang like '#!/usr/bin/env -S uv run --script' allows the operating system to execute the Python file directly through the uv runtime. It automatically reads the inline metadata, resolves dependencies, and runs the script in an isolated environment.