backend-python

Guide backend Python teams on TDD, clean architecture, and disciplined migrations.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kyle-deprow/ai_scaffolding --skill backend-python-kyle-deprow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-python
Source: https://github.com/kyle-deprow/ai_scaffolding/tree/main/skills/backend-python
Command: npx skills add https://github.com/kyle-deprow/ai_scaffolding --skill backend-python-kyle-deprow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Backend development often suffers from brittle APIs, insufficient test coverage, and chaotic migrations. This Skill provides a structured approach to building APIs, domain models, migrations, and service layers with TDD, Pydantic, Alembic, and clean architecture in mind.

Core Features & Use Cases

  • Guidance on setting up a TDD-driven workflow for API endpoints, domain models, and migrations.
  • Patterns for clean architecture, service layers, and repository boundaries with Python tooling.
  • Real-world scenarios illustrating project scaffolding, testing, and maintainable migrations.

Quick Start

Define a strict Pydantic model for your API input and write a failing test first, then implement the endpoint to pass the test.

Frequently Asked Questions about backend-python

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

FAQPage Schema
How do I build a Python backend using TDD and clean architecture?

Build a Python backend using TDD by writing failing tests first with pytest, then implementing API endpoints and service layers to pass them. This approach enforces clean architecture boundaries, strict typing, and Pydantic model usage for reliable services.

What is the best way to structure SQLAlchemy data migrations in Python?

The best way to structure SQLAlchemy data migrations is using Alembic with disciplined migration hygiene. This Skill provides patterns and rules for maintainable migrations, ensuring database schema changes align with domain models and clean architecture boundaries.

Can I use Pydantic models for API input validation in a Python backend?

Yes, you can and should use Pydantic models for API input validation. This Skill requires strict Pydantic model usage to define API inputs, enforcing strict typing and ensuring reliable data handling before requests reach your service layers.

How does test-driven development work for Python API endpoints?

Test-driven development for Python API endpoints works by defining a strict Pydantic model for your API input and writing a failing test with pytest first, then implementing the endpoint logic to pass the test.

Do I need Alembic and pytest to apply clean architecture in Python?

You need pytest for TDD workflows and Alembic for database migration hygiene to fully apply clean architecture in Python. These tools enforce testing discipline and structured data migrations across service layers and repository boundaries.

Why should I use a service layer pattern in backend Python applications?

You should use a service layer pattern in backend Python applications to separate business logic from API endpoints and repository boundaries. This clean architecture approach prevents brittle APIs and ensures maintainable, strictly typed code.