dev-create-service

Generate API-aligned types, contracts, adapter, and service files.

20|3|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/HerbertJulio/specialist-agent --skill dev-create-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-create-service
Source: https://github.com/HerbertJulio/specialist-agent/tree/main/packs/svelte/skills/dev-create-service
Command: npx skills add https://github.com/HerbertJulio/specialist-agent --skill dev-create-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of a complete data layer when integrating APIs into a module, generating type definitions, API contracts, an adapter, and a service layer to wire client code to backend services.

Core Features & Use Cases

  • Generates types in types/[resource].types.ts that mirror API payloads (snake_case) and app contracts in types/[resource].contracts.ts (camelCase, correctly typed).
  • Scaffolds an adapter in adapters/[resource]-adapter.ts that implements pure, side-effect-free mappings between inbound API payloads and app models, as well as outbound transformations.
  • Creates a production-ready service in services/[resource]-service.ts that uses native fetch, with no try/catch blocks and no data transformations, suitable for deterministic API calls.
  • Produces a clear separation of concerns: types, contracts, adapters, and services aligned to docs/ARCHITECTURE.md sections 4.1-4.3.

Quick Start

Provide the base API URL and a sample response shape, then run this skill to generate the full data layer.

Frequently Asked Questions about dev-create-service

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

FAQPage Schema
How do I generate an API data layer with types, contracts, and services?

Generating an API data layer requires a base API URL and a sample response shape to automate creation of types, contracts, adapters, and services. It scaffolds distinct files like [resource].types.ts and [resource]-adapter.ts for separation of concerns.

What is the best way to separate API contracts from data fetching in a module?

Separating API contracts from data fetching involves mapping inbound snake_case payloads to camelCase app contracts in pure adapters, while services handle native fetch calls exclusively. This architecture prevents data transformation logic inside fetching blocks.

Does the generated service layer use native fetch without try/catch blocks?

The generated service layer uses native fetch without try/catch blocks to ensure deterministic API calls. It excludes data transformations entirely, relying on pure adapters to implement side-effect-free mappings between API payloads and app models.

How do I map snake_case API payloads to camelCase app contracts?

Mapping snake_case API payloads to camelCase app contracts is handled by pure adapter files like [resource]-adapter.ts. These adapters implement side-effect-free inbound and outbound transformations between the API and app models.

Do I need try/catch blocks for API calls in the generated service?

You do not need try/catch blocks in the generated service because the architecture explicitly omits them to maintain deterministic fetch execution. All data mapping and side-effect handling is pushed entirely to pure adapter files.

Can I use this to scaffold types and adapters for frontend-backend communication?

You can use this to scaffold types and adapters for frontend-backend communication by generating API-aligned types in [resource].types.ts and pure adapters in [resource]-adapter.ts. This conforms to separation of concerns architecture guidelines.