new-service

Scaffold API service modules with request functions, Zod schemas, and MSW mock handlers.

21|4|Updated Sep 4, 2024
One-click install
npx skills add https://github.com/gaia-react/gaia --skill new-service-gaia-react
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-service
Source: https://github.com/gaia-react/gaia/tree/main/.claude/skills/new-service
Command: npx skills add https://github.com/gaia-react/gaia --skill new-service-gaia-react

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual overhead and boilerplate associated with creating new API services, ensuring consistent architecture across your GAIA project.

Core Features & Use Cases

  • Automated Scaffolding: Generates request functions, Zod schemas, and URL constants in the correct directory structure.
  • Mock Integration: Optionally creates MSW mock handlers to enable immediate frontend development and testing.
  • Use Case: When you need to add a new user management module, use this skill to instantly generate the service layer, validation schemas, and test mocks in one command.

Quick Start

Ask the AI to scaffold a new service named users with endpoints for get and post and a schema containing id as a string and name as a string.

Frequently Asked Questions about new-service

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

FAQPage Schema
How do I scaffold a new API service with Zod schemas and MSW mock handlers?

To scaffold a new API service, this Skill generates request functions, Zod schemas, URL constants, and optional MSW mock handlers within the GAIA project structure. It requires the GAIA CLI to execute file generation and validation routines based on provided endpoint and schema definitions.

What is the best way to automate boilerplate creation for TypeScript API services?

Automating boilerplate creation for TypeScript API services is handled by this Skill, which eliminates manual overhead by generating standardized request functions and validation schemas. It ensures consistent architecture across your GAIA project by targeting the app/services/gaia/ directory.

Can I generate MSW mock handlers alongside Zod schemas for frontend testing?

Yes, you can generate MSW mock handlers alongside Zod schemas. This Skill optionally creates MSW mock handlers during the API service scaffolding process, enabling immediate frontend development and testing without waiting for a live backend implementation.

Do I need the GAIA CLI to scaffold API service modules?

Yes, you need the GAIA CLI to scaffold API service modules. The Skill relies on the GAIA CLI to execute file generation and validation routines, ensuring the new service directories and associated Zod schemas are correctly placed under app/services/gaia/.

How do I create a new user management service with specific endpoints and schemas?

To create a new user management service, ask the AI to scaffold a service named users with desired endpoints like get and post, and define schemas such as id and name as strings. The Skill instantly generates the service layer, validation schemas, and test mocks.