Python Standards

Automate Python tooling standards using uv, pytest, ruff, and basedpyright.

13|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/phenobarbital/antigravity-config --skill python-standards-phenobarbital
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Python Standards
Source: https://github.com/phenobarbital/antigravity-config/tree/main/backend/.agent/skills/python-standards
Command: npx skills add https://github.com/phenobarbital/antigravity-config --skill python-standards-phenobarbital

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python projects often drift from consistent tooling standards, causing flaky tests, inconsistent formatting, and hard-to-maintain code. This skill defines a canonical approach to package management, testing, linting, type checking, and documentation practices to keep backend Python code clean and reliable.

Core Features & Use Cases

  • Enforces uv-based package management for deterministic environments and faster installs.
  • Standardizes testing with pytest, including unit/integration separation and coverage checks.
  • Applies Ruff for linting/formatting and basedpyright for type checking to ensure code quality.
  • Encourages concise, self-documenting code with one-line docstrings and clear imports.
  • Use case: On a new Python backend project, apply this skill to set up tooling scaffolding and validate existing code against it.

Quick Start

Install project dependencies, run tests, and apply code quality checks using uv, pytest, and ruff.

Frequently Asked Questions about Python Standards

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

FAQPage Schema
How do I enforce Python tooling standards for clean code in a backend project?

You can enforce Python tooling standards by applying a canonical approach to package management, testing, linting, and type checking. This ensures consistent formatting, deterministic environments, and high-quality code across your backend project.

What's the best way to set up Python linting and type checking for a new project?

The best way to set up Python linting and type checking is to standardize on Ruff for formatting and linting alongside basedpyright for type checking. This combination ensures code quality and consistent adherence to tooling standards.

Does this Python tooling approach work with uv for package management?

Yes, this approach explicitly requires uv for package management operations. Using uv provides deterministic environments and faster installs, which are foundational for maintaining reliable Python backend projects.

How do I standardize Python testing and coverage checks using pytest?

You can standardize Python testing by using pytest to separate unit and integration tests while enforcing coverage checks. This approach ensures reliable test suites and prevents flaky tests in your backend codebase.

Can I automate docstring creation and import organization for Python code?

Yes, you can automate documentation and import standards by enforcing concise, one-line docstrings and clear import organization. This encourages self-documenting code and maintains consistent readability across the project.

Why do Python projects drift from consistent tooling standards and how do I fix it?

Python projects drift from tooling standards due to inconsistent formatting and lack of canonical practices, causing flaky tests and hard-to-maintain code. You fix it by applying standardized tooling for testing, linting, and package management.