api-integration

Centralize HTTP client management with a single Axios instance and interceptors.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill api-integration-saurav-snapwork
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-integration
Source: https://github.com/Saurav-snapwork/NewAppTemplate/tree/main/.github/skills/api-integration
Command: npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill api-integration-saurav-snapwork

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes HTTP client logic to ensure a single, consistent Axios instance is used across all features, providing uniform authentication, error handling, and retry behavior.

Core Features & Use Cases

  • Single shared axios instance (apiClient) used by all data sources
  • Centralized request/response interceptors for injecting tokens and handling token refresh
  • Unified retry logic and error normalization across features
  • Validation workflow against README endpoints and Flutter source to catch path and configuration issues

Quick Start

Configure your project to use the single shared Axios instance and run the API integration workflow to generate and validate all interceptors.

Frequently Asked Questions about api-integration

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

FAQPage Schema
How do I centralize Axios interceptors for token refresh in TypeScript?

Centralize Axios interceptors by enforcing a single shared API client instance across all features. This instance manages request and response interceptors to inject bearer tokens and handle token refresh logic uniformly.

What is the best way to manage environment-based baseUrl for an Axios API client?

Environment-based baseUrl management is handled by configuring the shared Axios instance. The API integration workflow validates endpoints against README and Flutter sources to prevent path configuration issues across different environments.

How do I implement unified retry logic and error normalization across Axios features?

Implement unified retry logic and error normalization by routing all HTTP requests through a single centralized Axios instance. This enforces consistent retry behavior and standardizes error handling across all data sources.

Can I use a centralized API client for projects using API keys instead of bearer tokens?

Yes, the centralized API client applies to projects using either bearer tokens or API keys. It abstracts token storage and uses interceptors to inject the appropriate authentication credentials into requests.

How do I validate API endpoints against README and Flutter sources to prevent path mistakes?

Validate API endpoints by running the API integration workflow, which cross-references configured paths against README and Flutter source files. This validation process catches path and configuration issues before deployment.