wp-types

Generate TypeScript interfaces and error unions from WordPress REST API docs and PHP controllers.

1|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/kizlo-io/kizlo --skill wp-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-types
Source: https://github.com/kizlo-io/kizlo/tree/main/.claude/skills/wp-types
Command: npx skills add https://github.com/kizlo-io/kizlo --skill wp-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual, error-prone process of mapping WordPress REST API documentation to TypeScript interfaces, ensuring your frontend types perfectly match the backend API surface.

Core Features & Use Cases

  • Automated Type Generation: Converts WordPress REST API reference pages into fully typed TypeScript interfaces including response schemas and endpoint parameters.
  • Error Code Mapping: Automatically extracts and maps WordPress error codes from controller PHP files to provide robust type-safe error handling.
  • Use Case: When building a new feature that interacts with the WordPress Comments API, use this Skill to instantly generate the WP_Comment type and all associated input/error types, ensuring your code is type-safe from day one.

Quick Start

Use the wp-types skill to generate TypeScript interfaces for the WordPress comments API by providing the URL to the official developer documentation page.

Frequently Asked Questions about wp-types

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

FAQPage Schema
How do I generate TypeScript types from a WordPress REST API?

To generate TypeScript types from a WordPress REST API, you provide the official developer documentation URL or controller PHP source code to automatically extract response schemas, endpoint parameters, and error codes into strict TypeScript interfaces.

What is the best way to handle WordPress REST API error codes in TypeScript?

Handling WordPress REST API error codes in TypeScript is done by automatically extracting error codes from controller PHP files and mapping them into type-safe error code unions for robust frontend error handling.

Can I use this WordPress type generation for a headless CMS setup?

Yes, this WordPress type generation is designed specifically for headless WordPress development workflows, ensuring strict type safety for API requests and responses between your headless CMS backend and frontend.

How does codegen handle field optionality and WP_ naming conventions?

This codegen handles field optionality and WP_ naming conventions by adhering strictly to WordPress REST API documentation, ensuring correct optional fields and verbatim JSDoc documentation for generated TypeScript interfaces.

Do I need to manually map WordPress REST API documentation to TypeScript interfaces?

No, you do not need to manually map WordPress REST API documentation to TypeScript interfaces, as this automated codegen eliminates that error-prone process by perfectly matching your frontend types to the backend API surface.