Controller Builder

Community

Build clean, testable API controllers.

Authorjzallen
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you construct controller classes that act as clean public interfaces for your application's use cases, strictly adhering to clean architecture and dependency injection principles. It ensures your API layer is lean, testable, and free of business logic, promoting maintainability and scalability.

Core Features & Use Cases

  • Dependency Injection: Use dataclasses to define and inject use case functions into controllers.
  • Factory Method Pattern: Generate create_default_controller methods for easy instantiation with all required dependencies.
  • Clean Public Interfaces: Expose use cases through clear, business-oriented public methods, abstracting underlying logic.
  • Use Case: Create a Python UserController that exposes methods like register_user and get_user_profile, injecting register_user_use_case and get_user_use_case functions via a UserDependencies dataclass.

Quick Start

Generate a Python OrderController class with a create_default_controller factory method, injecting create_order_use_case and get_order_details_use_case functions.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Controller Builder
Download link: https://github.com/jzallen/fred_simulations/archive/main.zip#controller-builder

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository