kata-python-implement

Implement Python backend features with FastAPI, SQLAlchemy, and pytest tests.

Updated Sep 3, 2025
One-click install
npx skills add https://github.com/guardiatechnology/design-system --skill kata-python-implement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kata-python-implement
Source: https://github.com/guardiatechnology/design-system/tree/main/.claude/skills/kata-python-implement
Command: npx skills add https://github.com/guardiatechnology/design-system --skill kata-python-implement

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you implement a requested Python backend feature from requirements through typed, reviewed, and fully tested code, reducing the risk of incomplete or fragile implementations.

Core Features & Use Cases

  • Requirement-to-code workflow: Breaks work into clear stages from clarifying ambiguities to mapping layers and files.
  • Architecture-aligned design: Creates typed domain entities, Protocol-based ports, and Pydantic boundary models.
  • Test-driven delivery: Produces unit tests, integration tests (real DB with SQLAlchemy), and HTTP endpoint tests (FastAPI).
  • Quality gate validation: Enforces Ruff formatting/linting, mypy strict typing, pytest pass criteria, and safe error handling patterns.

Quick Start

Use the kata-python-implement skill to build a complete, tested Python feature by providing the feature requirement and any related OAS or design documentation.

Frequently Asked Questions about kata-python-implement

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

FAQPage Schema
How do I implement a Python backend feature end to end with FastAPI and SQLAlchemy?

To implement a Python backend feature, you provide requirements to generate typed domain entities, Protocol ports, Pydantic schemas, SQLAlchemy 2.0 async repositories, and FastAPI endpoints. This workflow ensures architecture-consistent delivery from domain design through the HTTP layer.

What is the best way to structure a Python backend feature using typed dataclasses and Protocol ports?

Structuring a Python backend feature involves mapping layers into typed dataclasses for domain logic and Protocol ports for boundaries. Pydantic schemas validate boundary models, ensuring strict typing and clean separation between domain logic and infrastructure adapters.

Does this workflow generate integration tests for SQLAlchemy 2.0 async repositories?

Yes, the workflow generates integration tests for SQLAlchemy 2.0 async repositories using a real database. It also produces pytest unit tests for domain logic and HTTP endpoint tests for FastAPI, ensuring comprehensive test-driven delivery.

How do I validate a Python feature implementation with mypy and ruff?

You validate a Python feature implementation by running ruff for formatting and linting, and mypy for strict typing. The workflow enforces these quality gates alongside pytest pass criteria and safe error handling patterns before finalizing the code.

Can I use this approach to add domain logic to an existing FastAPI backend?

Yes, you can use this approach to add or change domain logic, persistence behavior, and FastAPI endpoints in an architecture-consistent way. It applies to scenarios requiring modifications to existing infrastructure adapters and boundary models.