What problem does it solve?
This Skill provides a robust and type-safe way to interact with backend APIs, handling common challenges like authentication, token refresh, and error management automatically.
Core Features & Use Cases
- Type Safety: Ensures requests and responses are correctly typed, reducing runtime errors.
- Automatic Token Refresh: Handles expired access tokens by refreshing them in the background without interrupting the user.
- Request Deduplication: Prevents multiple identical requests from being sent simultaneously, especially during token refresh.
- TanStack Query Integration: Seamlessly integrates with TanStack Query for efficient data caching and state management.
- Use Case: When building a dashboard that fetches user data, posts updates, and requires authentication, this client ensures a smooth and secure experience by managing API calls and token validity.
Quick Start
Use the api-client skill to fetch the current user's profile.