api-client

Create a reusable TypeScript API client with HTTP methods and token management.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/Arnutt-N/hr-ims --skill api-client-arnutt-n
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-client
Source: https://github.com/Arnutt-N/hr-ims/tree/main/.claude/skills/api-client
Command: npx skills add https://github.com/Arnutt-N/hr-ims --skill api-client-arnutt-n

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

API client utilities are needed to simplify, standardize, and type-safely perform HTTP requests across HR-IMS frontend and backend codebases, reducing boilerplate and errors.

Core Features & Use Cases

  • HTTP client wrapper with automatic token management (Bearer) and configurable timeouts
  • Unified error handling and retry/interceptor architecture, compatible with React Query
  • Type-safe API interactions and helper utilities for prefetching and optimistic updates

Quick Start

Install the package, import the api client in your service layer, and start making typed API calls immediately.

Frequently Asked Questions about api-client

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

FAQPage Schema
How do I make type-safe API calls in a TypeScript HR application?

Type-safe API calls in a TypeScript HR application are streamlined using a reusable client wrapper providing typed endpoints, automatic Bearer token management, and configurable timeouts to execute reliable HTTP requests.

What's the best way to handle API error handling and retries with React Query?

API error handling and retries with React Query are managed via a unified interceptor architecture that standardizes error responses and integrates seamlessly with React Query's data fetching and caching lifecycle.

How do I set up automatic Bearer token management for frontend HTTP requests?

Automatic Bearer token management for frontend HTTP requests is built into the API client wrapper, handling token attachment and expiration automatically so you can make authenticated requests without manual header configuration.

Can I use this API client for both frontend and backend TypeScript codebases?

Yes, the API client is designed for both frontend and backend TypeScript contexts, providing core HTTP methods, helper utilities, and type-safe interactions that reduce boilerplate across your entire HR-IMS codebase.

How do I implement optimistic updates and prefetching with a TypeScript API client?

Optimistic updates and prefetching with a TypeScript API client are implemented using built-in helper utilities that integrate directly with React Query, allowing you to manage data fetching and UI state efficiently.

Why do I need a wrapper for HTTP requests instead of using standard fetch in React Query?

A wrapper for HTTP requests is needed to eliminate boilerplate, enforce type safety, and standardize error handling and timeouts across your codebase, providing a more reliable structure than raw fetch within React Query.