api-client-services

Centralizes backend communication with Axios clients, HMAC signing, and encrypted token authentication.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/wonkpentink/agent-skills-fe --skill api-client-services
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-client-services
Source: https://github.com/wonkpentink/agent-skills-fe/tree/main/skills/api-client-services
Command: npx skills add https://github.com/wonkpentink/agent-skills-fe --skill api-client-services

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

API-driven frontend applications often require repetitive boilerplate to configure Axios clients for multiple backend services, manage per-domain API calls, and implement consistent authentication and request signing. This skill provides a cohesive pattern for building and organizing API clients and service functions in src/lib/api/.

Core Features & Use Cases

  • Axios Client Setup: Factory function to create domain-specific Axios instances configured for different microservices
  • Service Functions: Async functions organized by domain that perform API calls (fetch, create, update, delete)
  • Authentication & Signatures: Token retrieval, decryption, and inclusion in requests with HMAC-based signatures; support for multiple authentication patterns across services
  • Domain Organization: Group API calls by domain (contacts, employees, IDM, MDM) to improve maintainability
  • Use Case: When adding a new microservice, wire a new Axios client and corresponding service module quickly without duplicating logic

Quick Start

Create a new domain service by adding a dedicated folder, a factory Axios client, and a service file that implements at least one authenticated endpoint.

Frequently Asked Questions about api-client-services

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

FAQPage Schema
How do I set up Axios clients for multiple microservices with different base URLs?

Setting up Axios clients for multiple microservices is done using a factory function that creates domain-specific instances with environment-driven base URLs. This pattern centralizes configuration and avoids duplicating client setup logic across your application.

What's the best way to add HMAC request signing to API calls?

Adding HMAC request signing to API calls is handled by generating signatures and including them in your requests. This skill integrates signature generation directly into the Axios client setup, ensuring all outgoing domain requests are automatically signed.

How do I organize API service functions by domain in a microservices architecture?

Organizing API service functions by domain involves grouping async calls into dedicated modules under src/lib/api/. This pattern improves maintainability by separating contacts, employees, IDM, and MDM logic into distinct service files.

Can I use encrypted tokens for authentication across different backend services?

Using encrypted tokens for authentication across different backend services is fully supported. The system retrieves and decrypts tokens before inclusion in requests, allowing you to apply multiple authentication patterns across your various microservices.

How do I handle errors consistently across multiple Axios API clients?

Handling errors consistently across multiple Axios API clients is achieved by centralizing error handling logic within the factory function. This ensures every domain-specific client processes and surfaces request failures uniformly.