create-service

Generate a multi-provider service layer with HTTP, Firebase, and Mock implementations.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/alejandro-technology/react-native-template --skill create-service-alejandro-technology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-service
Source: https://github.com/alejandro-technology/react-native-template/tree/main/.claude/skills/generation/create-service
Command: npx skills add https://github.com/alejandro-technology/react-native-template --skill create-service-alejandro-technology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a complete infrastructure for feature services that can switch between HTTP, Firebase, and Mock implementations via a single factory.

Core Features & Use Cases

  • 4-service pattern: repository interface, 3 concrete implementations, and a factory that selects the active provider based on CONFIG.SERVICE_PROVIDER.
  • Consistency: ensures all providers implement the same interface with methods returning Promise<T | Error>.
  • Use Case: when adding a new feature, generate all required service scaffolding and wiring in one step.

Quick Start

Run the generator to create a new feature service with HTTP, Firebase, and Mock providers and a provider-switching factory.

Frequently Asked Questions about create-service

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

FAQPage Schema
How do I generate a multi-provider service layer with HTTP, Firebase, and Mock implementations in TypeScript?

To generate a multi-provider service layer, run the service generator to create a repository interface, three concrete implementations for HTTP, Firebase, and Mock, and a factory. This scaffolds all required service wiring in one step for interchangeable data providers.

How does environment-based provider switching work for TypeScript service factories?

Environment-based provider switching uses a CONFIG.SERVICE_PROVIDER setting to select the active implementation. The factory pattern reads this configuration at runtime and returns the corresponding HTTP, Firebase, or Mock provider instance to the calling code.

What is the factory pattern for interchangeable data providers in TypeScript infrastructure design?

The factory pattern for interchangeable data providers defines a single repository interface that all implementations share. A factory function then dynamically instantiates and returns either the HTTP, Firebase, or Mock provider based on environment configuration, ensuring consistent data access.

Can I use a mock service provider for local development and switch to Firebase or HTTP in production?

Yes, you can switch between Mock, Firebase, and HTTP providers by changing the CONFIG.SERVICE_PROVIDER value. This setup is designed specifically for environment-based switching, allowing local development with Mock while deploying production builds with HTTP or Firebase.

Does a generated TypeScript service repository interface require all methods to return Promise<T | Error>?

Yes, all methods generated within the repository interface must return Promise<T | Error>. This consistency requirement ensures that every concrete HTTP, Firebase, and Mock implementation handles asynchronous operations and error states uniformly across the service layer.