gen-api

Regenerate TypeScript API client types from a Django OpenAPI schema.

Updated Sep 21, 2025
One-click install
npx skills add https://github.com/jammindev/house --skill gen-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gen-api
Source: https://github.com/jammindev/house/tree/main/.claude/skills/gen-api
Command: npx skills add https://github.com/jammindev/house --skill gen-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill keeps frontend TypeScript API types aligned with the Django backend, preventing stale client contracts after serializer, model, or viewset changes.

Core Features & Use Cases

  • OpenAPI-driven regeneration: Rebuilds generated TypeScript types from the Django schema endpoint.
  • Frontend contract validation: Helps verify that React code still matches the latest backend endpoints and payloads.
  • Change workflow support: Useful after adding or modifying API routes, serializers, or response fields in Django.
  • Quality check: Includes a follow-up type check to catch integration issues early.

Quick Start

Use the gen-api skill to refresh the generated frontend API types from the running Django schema and check that the TypeScript build still passes.

Frequently Asked Questions about gen-api

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

FAQPage Schema
How do I regenerate TypeScript API types from a Django OpenAPI schema?

To regenerate TypeScript API types from a Django OpenAPI schema, use a tool that rebuilds generated client contracts from your running schema endpoint, ensuring frontend types match backend changes. This synchronizes your frontend payloads automatically.

When do I need to refresh frontend API types after Django backend changes?

You need to refresh frontend API types after modifying serializers, models, viewsets, or endpoints in Django. Regenerating types prevents stale client contracts and ensures your TypeScript code accurately reflects the latest backend payloads.

Does OpenAPI type regeneration require a running Django server?

OpenAPI type regeneration requires a running Django server on 127.0.0.1:8001 to access the schema endpoint. This local connection allows the tool to fetch the latest OpenAPI schema and rebuild the TypeScript types.

How do I verify TypeScript frontend contracts after updating Django API routes?

To verify TypeScript frontend contracts after updating Django API routes, run a TypeScript type-check verification step immediately after regeneration. This catches integration issues early by validating that React code matches the new endpoints.

What is the best way to keep TypeScript types synchronized with a Django backend?

The best way to keep TypeScript types synchronized with a Django backend is using an OpenAPI-driven regeneration workflow. Rebuilding types directly from the schema endpoint after backend changes ensures your frontend contracts never go stale.

Why does my TypeScript type-check fail after modifying Django serializers?

Your TypeScript type-check fails after modifying Django serializers because your generated frontend API types are stale. Regenerating the OpenAPI schema types and running a follow-up type check will resolve the integration mismatch.