self-contained-python-scripts

Create self-contained Python scripts with PEP 723 inline metadata.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/boazy/skills --skill self-contained-python-scripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-contained-python-scripts
Source: https://github.com/boazy/skills/tree/main/skills/self-contained-python-scripts
Command: npx skills add https://github.com/boazy/skills --skill self-contained-python-scripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, rich, alive-progress, questionary, iterfzf, cyclopts, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables the creation of Python scripts that are fully self-contained, runnable with a single command without manual environment setup.

Core Features & Use Cases

  • PEP 723 Compliance: Scripts include inline metadata for dependency management and Python version requirements.
  • Ergonomic CLIs: Supports argparse for simple scripts and Cyclopts for complex command-line interfaces.
  • Rich Output & Progress: Integrates rich for formatted output and alive-progress for visual progress tracking.
  • Interactive Prompts: Uses questionary for user input and iterfzf for fuzzy selection.
  • Use Case: Develop a Python script to automate a data processing task, including user prompts for configuration and progress bars for long-running operations, all packaged as a single executable file.

Quick Start

Create a Python script that takes a list of GitHub repositories as input and displays their star counts and forks using the self-contained-python-scripts skill.

Frequently Asked Questions about self-contained-python-scripts

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

FAQPage Schema
How do I create self-contained Python scripts without manual environment setup?

To create self-contained Python scripts, you use inline metadata for dependency management, allowing the script to run via a single command without external environment setup. This eliminates the need to manually install packages or configure virtual environments before execution.

What is PEP 723 and how does it help with Python script packaging?

PEP 723 is a standard for inline metadata that allows Python scripts to declare their dependencies and Python version requirements directly within the script file. This mechanism simplifies script distribution by enabling tools to automatically resolve and fetch necessary packages.

Can I build ergonomic command-line interfaces with argparse and Cyclopts in a single file?

Yes, you can build ergonomic command-line interfaces in a single file by using argparse for simple scripts or Cyclopts for complex command-line interfaces. This approach allows you to create user-friendly CLIs while maintaining a self-contained script structure.

Does this approach support rich output and interactive prompts for automation tasks?

Yes, the self-contained script approach supports rich output formatting with rich, progress bars via alive-progress, interactive prompts using questionary, and fuzzy selection with iterfzf. These integrations enhance the user experience for data processing and automation tasks.

What is the best way to distribute a Python script with complex dependencies like httpx and rich?

The best way to distribute a Python script with complex dependencies like httpx and rich is to use PEP 723 inline metadata. By declaring dependencies within the script itself, users can execute it directly without manually installing packages or managing separate environment files.