coding

Automate Python component implementation with DTO-based contracts.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sunbluesome/dotfiles --skill coding-sunbluesome
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding
Source: https://github.com/sunbluesome/dotfiles/tree/main/.claude/ds/skills/coding
Command: npx skills add https://github.com/sunbluesome/dotfiles --skill coding-sunbluesome

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps software engineers build clean, well-typed Python components by enforcing architectural patterns, DTO-driven data exchange, and explicit protocol contracts.

Core Features & Use Cases

  • Enforces SRP and DTO-Driven development for Processor, Transformer, Domain, Models, Pipelines, and DataIO
  • Provides a reference structure for schemas/, interface/, processor/, transformer/, domain/, models/, data_io/, pipelines/ to ensure consistent design
  • Helps design Pydantic DTOs with field validation and define I/O contracts with eight generic Protocols

Quick Start

Define a minimal Processor with a DTO schema and a matching IProcessor implementation that follows the 8-protocol pattern.

Frequently Asked Questions about coding

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

FAQPage Schema
How do I enforce DTO-driven development and protocol contracts in Python components?

To enforce DTO-driven development in Python components, define Pydantic schemas for data exchange and implement explicit interfaces using the eight generic protocols. This approach separates data shape from processing logic, ensuring clean architecture and strict type safety across modules.

What is the best way to structure a Python project for domain logic and data pipelines?

The best way to structure Python domain logic and data pipelines is to organize code into dedicated directories like schemas/, interface/, domain/, and pipelines/. This enforces the Single Responsibility Principle and creates consistent architectural boundaries for processors and transformers.

How does schema-first design work with Pydantic DTOs for data I/O?

Schema-first design with Pydantic DTOs works by defining strict data models with field validation before writing processing logic. These DTOs act as explicit data exchange contracts for DataIO operations, ensuring that only validated data enters or exits your domain logic components.

Can I use explicit protocols for both transformers and processors in Python?

Yes, you can use explicit protocols for both transformers and processors in Python. By defining matching IProcessor and ITransformer implementations that follow the eight-protocol pattern, you establish clear input-output contracts that standardize data flow across different component types.

When should I apply the Single Responsibility Principle to Python models?

You should apply the Single Responsibility Principle to Python models whenever designing domain logic or data pipelines to prevent components from handling unrelated tasks. Separating concerns into distinct processors and data I/O modules ensures components remain maintainable and testable.

Does this Python architecture pattern support inheritance for schema definitions?

The Python architecture pattern provides schema-first guidance with explicit inheritance constraints. By restricting arbitrary class hierarchies in favor of composable Pydantic DTOs and protocol contracts, it prevents deep coupling and maintains predictable data exchange boundaries.