python

Enforce Python best practices with type hints, ruff, mypy, and pytest.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/AdigunQ/ralph-smart --skill python-adigunq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/AdigunQ/ralph-smart/tree/main/knowledges/bootstrap_skills/python
Command: npx skills add https://github.com/AdigunQ/ralph-smart --skill python-adigunq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines Python development by enforcing best practices in type safety, linting, formatting, and testing, leading to more robust and maintainable code.

Core Features & Use Cases

  • Type Safety: Ensures code correctness through strict type hinting and static analysis with mypy.
  • Code Quality: Maintains high code standards with automated linting and formatting using ruff.
  • Testing: Facilitates Test-Driven Development (TDD) with pytest, including coverage reporting.
  • CI/CD Integration: Provides configurations for GitHub Actions to automate quality checks.
  • Pre-Commit Hooks: Sets up local hooks to catch issues before committing.

Quick Start

Configure your Python project with the provided pyproject.toml and pre-commit configurations.

Frequently Asked Questions about python

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

FAQPage Schema
How do I set up Python type checking and linting with mypy and ruff?

To set up Python type checking and linting, configure ruff for automated formatting and mypy for static analysis directly within your project's pyproject.toml file. This enforces strict type hints and maintains high code standards.

What is the best way to automate Python testing and coverage reporting in CI?

The best way to automate Python testing is by using pytest for Test-Driven Development and integrating it with GitHub Actions. This setup runs automated quality checks and facilitates coverage reporting during your CI workflow.

How do I configure pre-commit hooks to catch Python code quality issues?

You can configure pre-commit hooks to catch Python code quality issues locally before committing. By setting up the provided pre-commit configurations, ruff formatting and mypy analysis run automatically on changed files.

Can I enforce strict type hints and TDD practices in a new Python project?

Yes, you can enforce strict type hints and TDD practices in a new Python project. The setup uses mypy for type correctness and pytest to facilitate Test-Driven Development, ensuring robust and maintainable code from the start.

Does ruff replace other Python linters for static analysis?

Ruff maintains high code standards by providing automated linting and formatting. While it handles code style and quality checks, mypy is used alongside it specifically for strict static analysis and type correctness.

Why do I need pyproject.toml for Python development tooling?

You need pyproject.toml to centralize Python development tooling configuration. It allows you to define project structure and settings for ruff, mypy, and pytest together, streamlining your development environment setup.