Skip to content
Skills Library
Programming · Building & coding

python-scripts

/python-scripts

Use when writing standalone Python scripts (one-off scripts, utilities, not part of a larger Python project with pyproject.toml or setup.py). Provides UV shebang template and best practices.

Repository
dotfiles ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when writing standalone Python scripts (one-off scripts, utilities, not part of a larger Python project with pyproject.toml or setup.py). Provides UV shebang template and best practices.

Original author description

Use when writing standalone Python scripts (one-off scripts, utilities, not part of a larger Python project with pyproject.toml or setup.py). Provides UV shebang template and best practices.

How it works

  1. UV Shebang Template
  2. Key Points
  3. When to Use
  4. Example Script
  5. Making Scripts Executable
Original SKILL.md headings · 81 lines, 220 words
SKILL.md preview
---
name: python-scripts
description: Use when writing standalone Python scripts (one-off scripts, utilities, not part of a larger Python project with pyproject.toml or setup.py). Provides UV shebang template and best practices.
---

# Standalone Python Scripts

## UV Shebang Template

For standalone Python scripts, always use the UV shebang format:

```python
#!/usr/bin/env -S uv run --script
#
# /// script
# dependencies = [
#   "requests",
#   "click",
# ]
# [tool.uv]
# exclude-newer = "2025-08-23T00:00:00Z"
# ///

import requests
import click

# Your script code here
```

## Key Points

- **Self-contained:** All dependencies declared in the file
- **No virtual env needed:** UV handles dependencies automatically
- **Execution:** Run directly with `uv run script.py` or `./script.py` (if executable)
- **Date pinning:** The `exclude-newer` ensures reproducible builds
- **PEP 723 compliant:** Uses the inline script metadata standard

## When to Use

✅ **Use this for:**

- One-off automation scripts
- CLI utilities
- Data processing scripts
- Quick prototypes
- Scripts without a containing project

❌ **Don't use this for:**

- Files in a project with `pyproject.toml` or `setup.py`
- Modules meant to be imported
- Production services/applications

## Example Script

```python
#!/usr/bin/env -S uv run --script
#
# /// script
# dependencies = [
#   "httpx",
#   "rich",
# ]
# [tool.uv]
# exclude-newer = "2025-08-23T00:00:00Z"
# ///

import httpx
from rich import print

def main():
    response = httpx.get("https://api.github.com")
    print(f"Status: {response.status_code}")

if __name__ == "__main__":
    main()
```

## Making Scripts Executable

```bash
chmod +x script.py
./script.py  # Run directly
```

Versions

The database has no other skills named python-scripts.

Database snapshot: 13.11.2026 · package version 279e775a05bb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100python-best-practices
    Use when reading or writing Python files (.py, pyproject.toml, requirements.txt).
  • 86python-best-practices
    Use when escrevendo, corrigindo ou explicando codigo Python para o usuario.
  • 100python-conventions
    Enforce Python tooling conventions for uv, ty, Ruff, pytest, and pyproject.toml. Use when working on .py files or Python project config. NOT for JS/TS, shell scripts, CI design, profiling, or test architecture.
  • 100python-expert
    Expert-level Python programming with PEP 8 standards and modern best practices. Use when writing Python code, debugging Python issues, explaining Python concepts, or reviewing Python code.
  • 95python-packaging
    Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.
  • 95python-packaging
    Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.