What problem does it solve?
Adopting @data-client/rest in an existing project requires manually rewriting axios, fetch, ky, superagent, or got calls and reimplementing shared concerns like authentication, base URLs, and error handling. This Skill automates detection of existing HTTP patterns and guides the migration to declarative RestEndpoint definitions.
Core Features & Use Cases
- HTTP Library Detection: Scans package.json and source imports to identify axios, raw fetch, ky, superagent, or got usage, including mixed codebases.
- Guided Migration References: Provides per-library migration guides covering interceptors, error handling, timeouts, cancellation, CSRF, upload progress, and pagination.
- Custom Base Class Generation: Creates a project-specific RestEndpoint subclass with urlPrefix, getHeaders, getRequestInit, process, and searchToString overrides based on detected patterns.
- Use Case: A React app using axios with interceptors and bearer tokens can be migrated by running the included codemod, then generating a BaseEndpoint class that centralizes auth headers and error handling.
Quick Start
Ask the assistant to set up @data-client/rest in this project and migrate the existing HTTP client code.