Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Python coding guidelines and best practices. Use when writing, reviewing, or refactoring Python code. Enforces PEP 8 style, syntax validation via py_compile, unit test execution, modern Python versions only (no EOL), uv for dependency management when available, and idiomatic Pythonic patterns.
Python coding guidelines and best practices. Use when writing, reviewing, or refactoring Python code. Enforces PEP 8 style, syntax validation via py_compile, unit test execution, modern Python versions only (no EOL), uv for dependency management when available, and idiomatic Pythonic patterns.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
4 spaces for indentation (never tabs) Max line length: 88 chars (Black default) or 79 (strict PEP 8) Two blank lines before top-level definitions, one within classes Imports: stdlib โ third-party โ local, alphabetized within groups Snake_case for functions/variables, PascalCase for classes, UPPER_CASE for constants
# Syntax check (always) python -m py_compile *.py # Run tests if present python -m pytest tests/ -v 2>/dev/null || python -m unittest discover -v 2>/dev/null || echo "No tests found" # Format check (if available) ruff check . --fix 2>/dev/null || python -m black --check . 2>/dev/null
Minimum: Python 3.10+ (3.9 EOL Oct 2025) Target: Python 3.11-3.13 for new projects Never use Python 2 syntax or patterns Use modern features: match statements, walrus operator, type hints
Check for uv first, fall back to pip: # Prefer uv if available if command -v uv &>/dev/null; then uv pip install <package> uv pip compile requirements.in -o requirements.txt else pip install <package> fi For new projects with uv: uv init or uv venv && source .venv/bin/activate
# โ List/dict comprehensions over loops squares = [x**2 for x in range(10)] lookup = {item.id: item for item in items} # โ Context managers for resources with open("file.txt") as f: data = f.read() # โ Unpacking first, *rest = items a, b = b, a # swap # โ EAFP over LBYL try: value = d[key] except KeyError: value = default # โ f-strings for formatting msg = f"Hello {name}, you have {count} items" # โ Type hints def process(items: list[str]) -> dict[str, int]: ... # โ dataclasses/attrs for data containers from dataclasses import dataclass @dataclass class User: name: str email: str active: bool = True # โ pathlib over os.path from pathlib import Path config = Path.home() / ".config" / "app.json" # โ enumerate, zip, itertools for i, item in enumerate(items): ... for a, b in zip(list1, list2, strict=True): ...
# โ Mutable default arguments def bad(items=[]): # Bug: shared across calls ... def good(items=None): items = items or [] # โ Bare except try: ... except: # Catches SystemExit, KeyboardInterrupt ... except Exception: # Better ... # โ Global state # โ from module import * # โ String concatenation in loops (use join) # โ == None (use `is None`) # โ len(x) == 0 (use `not x`)
Use pytest (preferred) or unittest Name test files test_*.py, test functions test_* Aim for focused unit tests, mock external dependencies Run before every commit: python -m pytest -v
def fetch_user(user_id: int, include_deleted: bool = False) -> User | None: """Fetch a user by ID from the database. Args: user_id: The unique user identifier. include_deleted: If True, include soft-deleted users. Returns: User object if found, None otherwise. Raises: DatabaseError: If connection fails. """
Syntax valid (py_compile) Tests pass (pytest) Type hints on public functions No hardcoded secrets f-strings, not .format() or % pathlib for file paths Context managers for I/O No mutable default args
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.