add-use-case

Generate use case protocols, implementations, and factory wiring for the Popcorn SwiftUI architecture.

1|Updated Dec 8, 2025
One-click install
npx skills add https://github.com/adamayoung/popcorn --skill add-use-case
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-use-case
Source: https://github.com/adamayoung/popcorn/tree/main/.claude/skills/add-use-case
Command: npx skills add https://github.com/adamayoung/popcorn --skill add-use-case

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexity of maintaining clean architecture in the Popcorn codebase by providing a standardized, step-by-step workflow for adding new use cases.

Core Features & Use Cases

  • Architectural Consistency: Ensures all new use cases follow the established protocol, implementation, and error-handling patterns.
  • Dependency Injection: Guides the integration of new use cases into the existing factory and composition layers.
  • Use Case: When adding a new feature like FetchUserWatchHistory, use this Skill to generate the required protocol, implementation, error types, and factory wiring to ensure it integrates seamlessly with the AppServices graph.

Quick Start

Use the add-use-case skill to generate the boilerplate for a new FetchUserWatchHistory use case within the PopcornMovies context.

Frequently Asked Questions about add-use-case

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

FAQPage Schema
How do I standardize use case implementation in a modular SwiftUI architecture?

Standardize use case implementation by following a structured workflow to generate protocols, implementation classes, error types, and factory methods across domain and application layers. This ensures consistent dependency injection and seamless integration with your existing AppServices composition layer.

What's the best way to add a new use case while maintaining clean architecture in Swift?

The best way to maintain clean architecture is to generate boilerplate for protocols, error types, and factory wiring through a standardized step-by-step process. This enforces consistent architectural patterns and dependency injection across domain and application layers.

How does dependency injection work when creating new use cases in a SwiftUI application?

Dependency injection for new use cases works by wiring generated factory methods into the existing AppServices composition layer. This approach integrates domain and application layers seamlessly, ensuring all use case dependencies are consistently resolved within the architecture.

Can I use this approach to generate boilerplate for fetching user watch history in a movies app?

Yes, you can generate the required boilerplate for a use case like FetchUserWatchHistory. The workflow produces the necessary protocol, implementation, error types, and factory wiring to ensure the new feature integrates seamlessly with the AppServices graph.

When do I need to generate protocol and error type boilerplate for a Swift use case?

You need to generate protocol and error type boilerplate whenever adding a new feature that requires architectural consistency. This standardizes implementation patterns and ensures the new use case integrates properly with existing factory and composition layers.