Skip to content

aiskillstore/marketplace / skills/89jobrien/python-scripting

python-scripting

Unverified

Python scripting with uv and PEP 723 inline dependencies. Use when creating standalone Python scripts with automatic dependency management.

FileKindSize
SKILL.mdskill md1.3 KB
references/uv-script.template.pyscript1.4 KB
skill-report.jsonconfig12.8 KB

references/uv-script.template.py

View on GitHub
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
#   "{{DEPENDENCY_1}}",
#   "{{DEPENDENCY_2}}",
# ]
# [tool.uv]
# exclude-newer = "{{ISO_DATE}}"
# ///
"""{{SCRIPT_DESCRIPTION}}

Usage:
    uv run {{SCRIPT_NAME}}.py [OPTIONS] [ARGUMENTS]

Examples:
    uv run {{SCRIPT_NAME}}.py --help
    uv run {{SCRIPT_NAME}}.py input.txt
    uv run {{SCRIPT_NAME}}.py --verbose --output results.json

Requirements:
    - uv (https://docs.astral.sh/uv/)
    - Python 3.12+

The script will automatically install dependencies on first run.
"""

import argparse
import sys
from pathlib import Path


def parse_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(
        description="{{SCRIPT_DESCRIPTION}}",
        formatter_class=argparse.RawDescriptionHelpFormatter,
    )
    parser.add_argument(
        "input",
        type=Path,
        nargs="?",
        help="Input file path",
    )
    parser.add_argument(
        "-o",
        "--output",
        type=Path,
        help="Output file path",
    )
    parser.add_argument(
        "-v",
        "--verbose",
        action="store_true",
        help="Enable verbose output",
    )
    return parser.parse_args()


def main() -> int:
    args = parse_args()

    if args.verbose:
        print(f"Input: {args.input}")
        print(f"Output: {args.output}")

    # {{MAIN_LOGIC}}

    return 0


if __name__ == "__main__":
    sys.exit(main())
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 318kUpdated Claude CodeCodexUnverifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 318kUpdated Claude CodeCodexUnverifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 318kUpdated Claude CodeCodexUnverifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 318kUpdated Claude CodeCodexUnverifiedInstall