api-and-typing

Official

Streamline API typing and DTO usage in UI.

AuthormassCodeIO
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The massCode UI often encounters the need to work with API types that originate from generated sources or DTOs. Duplicating or re-creating these shapes in renderer code leads to drift, maintenance burden, and inconsistent behavior. This skill emphasizes reusing existing generated types, and introduces guidelines for deriving narrow local types for UI models, while keeping API shapes intact.

Core Features & Use Cases

  • Reuse existing generated API types from renderer/services/api/generated or DTOs from src/main/api/dto, avoiding manual duplicates.
  • Create narrow, UI-only or derived display models using TypeScript utilities like Pick, Omit, Parameters, ReturnType, Awaited, and NonNullable.
  • Apply rules to determine when a local type is appropriate (UI-only models, form models, or derived views) and how to safely adapt API shapes.

Quick Start

Review a renderer component and replace any copied API shape with a narrow derived type based on the existing generated type.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: api-and-typing
Download link: https://github.com/massCodeIO/massCode/archive/main.zip#api-and-typing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.