coding-python-backend

Implement Python backend APIs with route-service-domain separation and pytest coverage.

10|1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/marcocello/dot-codex --skill coding-python-backend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-python-backend
Source: https://github.com/marcocello/dot-codex/tree/main/skills/coding-python-backend
Command: npx skills add https://github.com/marcocello/dot-codex --skill coding-python-backend

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement or bootstrap Python backend features without blurring the boundaries between routes, services, domain logic, and persistence. It is designed to keep backend work organized, testable, and aligned with repo conventions.

Core Features & Use Cases

  • Layered backend implementation: Build or extend API and application code with route-service-domain-infra separation.
  • Pytest-driven changes: Add or update tests that fail before the change and pass after the implementation.
  • Repo-native setup: Follow the existing backend layout, environment, and tooling conventions instead of inventing new ones.
  • Use case: When a product needs a new FastAPI endpoint, this Skill guides the implementation, test coverage, and architecture boundaries needed to ship it safely.

Quick Start

Use the coding-python-backend skill to implement this backend change with route-service-domain boundaries and pytest coverage.

Frequently Asked Questions about coding-python-backend

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

FAQPage Schema
How do I structure a FastAPI backend with clear layered architecture?

FastAPI backend architecture should separate routes, services, domain logic, and persistence into clear layers. This approach keeps API endpoints organized, testable, and aligned with existing repo conventions without blurring boundaries between different functional areas.

How do I use pytest for red-green validation in Python backend development?

Pytest red-green validation requires writing tests that fail before implementing backend changes and pass after the implementation is complete. This disciplined approach ensures feature proof for black-box or internal behavior through test-driven development cycles.

What is the best way to add a new FastAPI endpoint without breaking existing backend logic?

Adding a FastAPI endpoint safely requires maintaining route-service-domain separation and adding pytest coverage. Following existing repo-native conventions and tooling layouts ensures the new endpoint integrates without disrupting current server-side behavior or architecture boundaries.

Does this Python backend approach work with existing repository conventions and environments?

Python backend implementation follows existing repository layouts, environments, and tooling conventions rather than inventing new ones. This repo-native setup ensures new API endpoints and backend logic integrate smoothly with established project structures and development workflows.

Why do I need route-service-domain separation for Python API endpoints?

Route-service-domain separation prevents blurring boundaries between API endpoints, business logic, and data persistence in Python backends. This layered architecture keeps backend work organized, testable, and aligned with repo conventions, making features easier to maintain and debug.

When should I avoid using layered architecture for Python backend applications?

Layered architecture for Python backends may be unnecessary for simple scripts or prototypes where route-service-domain separation adds overhead without proportional benefit. However, for production APIs and applications requiring test coverage, this approach ensures maintainable and disciplined feature implementation.