architecting-python

Architect Python code with functional core and imperative shell boundaries.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/nicolaei/claude-plugins --skill architecting-python-nicolaei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecting-python
Source: https://github.com/nicolaei/claude-plugins/tree/main/programmer/skills/architecting-python
Command: npx skills add https://github.com/nicolaei/claude-plugins --skill architecting-python-nicolaei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a practical guide for architecting Python applications by applying the functional-core/imperative-shell pattern and Pydantic patterns, helping teams design scalable, maintainable codebases.

Core Features & Use Cases

  • Functional Core (Business Logic): emphasize pure functions, validated inputs, testability, and minimal side effects.
  • Imperative Shell (External World): coordinates IO, enforces boundaries, and orchestrates domain components.
  • Pydantic Patterns: define immutable Value Objects and clear Request/Response models to validate and translate inputs to domain concepts.
  • Hexagonal Architecture Guidance: organize code with ports/adapters, enabling plug-and-play infrastructure.
  • Type Safety & Best Practices: modern typing, explicit return types, top-level imports, and self/cls annotations for clarity.
  • Documentation & Quality: emphasizes self-documenting code, avoid anti-patterns, and maintainable design.

Quick Start

Apply the architectural patterns to a Python module by separating domain logic from IO and wiring components through ports and adapters.

Frequently Asked Questions about architecting-python

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

FAQPage Schema
What is functional core and imperative shell in Python architecture?

Functional core and imperative shell is an architectural pattern that separates pure business logic from side effects, allowing Python domain logic to remain highly testable while the outer shell coordinates IO operations and enforces boundaries.

How do I structure a Python project using hexagonal architecture?

Structure Python projects using hexagonal architecture by organizing code into ports and adapters, enabling plug-and-play infrastructure components that connect to the central domain through explicit boundaries and Pydantic request-response models.

How do I use Pydantic for domain modeling in Python?

Use Pydantic for domain modeling in Python by defining immutable Value Objects and clear Request/Response models to validate inputs, translate external data into domain concepts, and enforce type safety across architectural boundaries.

When should I separate business logic from IO in Python applications?

Separate business logic from IO in Python applications when you need scalable, maintainable codebases with clear boundaries between domain and infrastructure, ensuring pure functions remain testable without external dependencies.

Does Python functional core architecture work for large projects?

Python functional core architecture works for large projects by applying hexagonal architecture guidance and explicit typing, enabling teams to design scalable codebases with plug-and-play infrastructure and disciplined module structuring.

What are the limitations of functional core in Python?

Limitations of functional core in Python include the discipline required to maintain pure functions without side effects and the overhead of mapping external IO through imperative shell boundaries and Pydantic models for every domain interaction.