agentsclimarketplace

Python uv

Skill mdonmez/skills/python-uv

A curated list of skills designed to enhance AI Agents' capabilities across a range of instructions.

Install
npx -y skills add mdonmez/skills --skill python-uv

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

REMINDER - For any Python-related thing, load this skill first and use `uv` instead of pip/python. (no -> python -c "print(5+5)", yes -> uv run python -c "print(5+5)") Even a small code snippet, load this skill first and use. This is comprehensive Python skill covering package management with uv, modern 3.10+ syntax and typing, and ecosystem best practices including Ruff, FastAPI, Loguru, and async programming.

SKILL.md

3.0 KB, 635 tokens by cl100k_base, as published. Nobody here has run it

Python-UV

Package and Environment Management (uv)

Always use uv for all package management and script execution tasks.

  • Use uv add <package> to install dependencies.
  • Use uv remove <package> to uninstall dependencies.
  • Use uv sync to install dependencies from lockfiles or requirements.
  • Use uv venv to manage virtual environments automatically.
  • Execute all Python scripts using uv run <script.py>.
  • Execute tools (like pytest, ruff, mypy) using uv run <tool>.
  • Never use pip, poetry, pip-tools, or virtualenv commands directly.

Type Annotations

Always explicitly annotate function return types, including -> None.

Import from typing only for advanced features not available in built-ins (e.g., Any, Callable, Self, Literal, overload).

Built-in Collections

Use built-in lowercase types for hints (list[int], dict[str, int], tuple[str, int], type[MyClass]). Do not use typing.List, typing.Dict, typing.Tuple, or typing.Type.

Unions and Optionals

Use the pipe operator | for unions and optionals (e.g., int | None, str | int) instead of typing.Union or typing.Optional.

Type Aliases (3.12+)

Use the type keyword for type aliases (e.g., type UserID = int).

Modern Syntax (3.10+)

File System Interactions

Use pathlib.Path for all file system interactions. Avoid os.path and os.walk.

Structural Pattern Matching

Use match and case statements over complex if/elif/else chains or isinstance checks.

String Formatting

Use f-strings for all string formatting. Avoid % formatting and .format().

Assignment Expressions

Use the walrus operator := for assignment expressions inside conditions.

Classes and Data Structures

Use @dataclass (with slots=True when possible) for classes that primarily store data. Use enum.StrEnum or enum.IntEnum for constant enumerations.

Best Practices

Code Quality

Assume the use of Ruff for linting and formatting. Write code that complies with standard Ruff rules (sorted imports, standard whitespace).

Documentation

Use Google-style docstrings for all complex functions and classes.

Library Selections

  • Web APIs: Use FastAPI. Avoid Flask or Django for new projects.
  • Logging: Use loguru instead of the built-in logging module.

Performance and Architecture

  • Use async and await for I/O-bound operations. Use asyncio.run() for entry points.
  • Manage resources (files, sockets, locks) using with statements (context managers).
  • Prefer generators and iterators over creating large lists in memory for data processing.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.