bp-python

Enforce Python 3.14+ coding standards with Ruff, pyrefly, and pytest.

9|4|Updated May 30, 2025
One-click install
npx skills add https://github.com/Kaikei-e/Alt --skill bp-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bp-python
Source: https://github.com/Kaikei-e/Alt/tree/main/.claude/skills/bp-python
Command: npx skills add https://github.com/Kaikei-e/Alt --skill bp-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill reduces bugs, inconsistent style, and architecture drift by enforcing a consistent set of Python best practices and tool-based checks across the codebase.

Core Features & Use Cases

  • Enforces type hints for public APIs, meaningful exception handling, and Clean Architecture layering to improve maintainability.
  • Integrates tool-driven checks with Ruff and pyrefly rules, recommends Pydantic v2 or frozen dataclasses for boundaries, and prescribes pytest TDD and resource-safe async patterns.
  • Ideal for code authors and reviewers working on Python services such as news-creator, tag-generator, metrics, recap-subworker, and recap-evaluator.

Quick Start

Read docs/best_practices/python.md and apply its rules when writing or reviewing any Python files in the repository.

Frequently Asked Questions about bp-python

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

FAQPage Schema
How do I enforce Python type hints and best practices across my repository?

To enforce Python best practices, apply consistent type hints for public APIs and run static analysis tools like Ruff and pyrefly during code edits and reviews to reduce bugs and prevent architecture drift.

What is the recommended way to define boundary objects in Python 3.14+ services?

The recommended way to define boundary objects is using Pydantic v2 or frozen dataclasses, which ensures immutability and validation at system boundaries to maintain Clean Architecture layering and improve maintainability.

Does this Python code review approach work with pytest TDD workflows?

Yes, this Python code review approach integrates directly with pytest TDD workflows by prescribing test-driven development practices and context managers for resource handling, ensuring safe async patterns and meaningful exception handling.

Can I use Ruff and pyrefly static analysis for Python 3.14+ code?

Yes, you can use Ruff and pyrefly for Python 3.14+ code to perform tool-driven checks that enforce consistent coding standards, helping catch type errors and style issues during file creation and review.

Why does my Python service need frozen dataclasses instead of regular classes?

Your Python service needs frozen dataclasses or Pydantic v2 to enforce immutability at boundaries, which prevents unexpected state mutations, reduces bugs, and maintains consistent architecture across services like news-creator and tag-generator.