rdc-rest

Define type-safe REST APIs with schema-driven normalization and caching.

2.0k|99|Updated Feb 15, 2019
One-click install
npx skills add https://github.com/reactive/data-client --skill rdc-rest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rdc-rest
Source: https://github.com/reactive/data-client/tree/main/.cursor/skills/rdc-rest
Command: npx skills add https://github.com/reactive/data-client --skill rdc-rest

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

REST APIs are often modeled ad hoc, leading to inconsistencies and boilerplate. This skill provides a schema-driven, type-safe approach to declare resources and endpoints, automating normalization and client-side caching.

Core Features & Use Cases

  • Resource() to declare CRUD-enabled collections of RestEndpoints for a given schema
  • Automatic data normalization via schemas and RestEndpoint integration
  • Built-in caching and URL/path parameter handling, with optional urlPrefix and query params
  • Examples: fetch lists and single items, perform mutations, and extend endpoints

Quick Start

Create a Todo REST resource using resource() with a defined schema and then fetch data via TodoResource.getList.

Frequently Asked Questions about rdc-rest

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

FAQPage Schema
How do I define type-safe REST APIs in a React TypeScript project?

You can define type-safe REST APIs in a React TypeScript project by using the resource() function to declare schemas and RestEndpoint instances, which automatically handle URL prefixes and path parameters for secure data fetching.

What is the best way to normalize and cache REST API responses automatically?

Automatic normalization and caching of REST API responses is achieved through schema-driven endpoint definitions, ensuring data consistency and reducing redundant network requests across your application's data models.

How do I perform CRUD operations on a REST resource using TypeScript?

To perform CRUD operations on a REST resource using TypeScript, define a schema using resource() to generate collection endpoints, enabling you to seamlessly fetch lists, retrieve single items, and execute mutations.

Does this REST client approach require manual data normalization for list and item fetching?

No, this REST client approach does not require manual data normalization for list and item fetching, as RestEndpoint integration automatically normalizes data models and manages client-side caching internally.

Can I extend REST endpoints with custom query parameters and URL prefixes?

You can extend REST endpoints with custom query parameters and URL prefixes by defining them within your RestEndpoint and schema configurations, allowing flexible integration with various REST API structures.