backend-use-case

Create backend use cases, controllers, and repositories with Python.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jzallen/dashboard-chat --skill backend-use-case
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-use-case
Source: https://github.com/jzallen/dashboard-chat/tree/main/.claude/skills/backend-use-case
Command: npx skills add https://github.com/jzallen/dashboard-chat --skill backend-use-case

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexity of backend development by providing clear patterns and tools for creating and modifying backend use cases, controllers, and repositories.

Core Features & Use Cases

  • Decorator Stack Order: Ensures correct decorator order for error handling and transaction management.
  • RepositoryContainer Usage: Simplifies repository access and transaction handling.
  • org_id Scoping: Enforces proper scoping of operations to prevent data leaks.
  • Error Handling: Offers structured error handling with domain exceptions.
  • Test Setup: Provides a pattern for setting up tests with mock repositories and sessions.

Quick Start

To use the backend-use-case skill, first create a new backend use case by following the decorator stack order and repository container usage guidelines.

Frequently Asked Questions about backend-use-case

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

FAQPage Schema
How do I structure backend use cases, controllers, and repositories in Python?

To structure backend use cases in Python, apply a defined decorator stack order for error handling and transactions, use a repository container for data access, and enforce org_id scoping. This pattern separates business logic from data persistence and ensures controlled transaction management.

What is the correct decorator stack order for backend error handling and transaction management?

The correct decorator stack order layers transaction management and error handling decorators systematically around backend use cases. Applying these decorators in the specified sequence ensures domain exceptions are caught and database transactions are managed predictably during execution.

How do I enforce org_id scoping in backend repositories to prevent data leaks?

Enforce org_id scoping in backend repositories by routing data access through a repository container. This mechanism automatically filters queries and restricts operations to the correct organizational boundary, preventing cross-tenant data leaks during use case execution.

How do I set up tests for backend use cases with mock repositories?

Set up tests for backend use cases by initializing mock repositories and mock database sessions using the provided test setup pattern. This approach isolates business logic during testing by substituting actual repository container dependencies with controlled mock objects.

Do I need Python to use this backend development pattern?

Yes, you need Python to execute this backend development pattern. The structured approach for creating use cases, managing the repository container, and handling the decorator stack requires a Python execution environment to function.