Agent skill · Backend & API

api-client-patterns

HTTP client patterns, API integration, request/response handling, error handling, retry logic, axios usage. Use when building API clients, integrating external services, handling API errors, or making HTTP requests.

majiayu000github.com/majiayu000GitHub ↗
claude-coderead-onlyMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-client-patterns-bpmstc-websiteagent --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 13 KB
Bundled scripts: none
Allowed tools: ReadGrepGlob
Path: skills/api/api-client-patterns-bpmstc-websiteagent/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# API Client Patterns ## Core Principles 1. **Single Responsibility** - One client per service 2. **Centralized Configuration** - Base URL, headers, timeouts in one place 3. **Comprehensive Error Handling** - Catch and transform errors appropriately 4. **Type Safety** - Define request/response interfaces 5. **Retry Logic** - Handle transient failures gracefully --- ## API Client Structure ### CORRECT: Well-Structured API Client ```javascript // client/src/utils/api.js import axios from 'axios'; // Configuration const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:3001/api'; const TIMEOUT = 30000; // 30 seconds // Create axios instance with defaults const apiClient = axios.create({ baseURL: API_BASE, timeout: TIMEOUT, headers: { 'Content-Type': 'application/json' } }); // Request interceptor (optional - for auth, logging, etc.) apiClient.interceptors.request.use( (config) => { // Add auth token if available const token = localStorage.getItem('token'); if (token) { config.headers.Authorization = `Bearer ${token}`; } return config; }, (error) => Promise.reject(error) ); // Response interceptor (optional - for error transformation) apiClient.interceptors.response.use( (r

What's inside
Steps it walks through
  1. Core Principles
  2. API Client Structure
  3. CORRECT: Well-Structured API Client
  4. WRONG: Scattered API Calls
  5. Error Handling Patterns
  6. CORRECT: Comprehensive Error Handling
  7. Component Error Handling
  8. Request Configuration Patterns
  9. With Timeout
  10. With Abort Controller (Cancellation)
  11. Streaming Responses Pattern
  12. Retry Logic Pattern
  13. File Upload Pattern
  14. With Progress Tracking
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-client-patterns skill do?

HTTP client patterns, API integration, request/response handling, error handling, retry logic, axios usage. Use when building API clients, integrating external services, handling API errors, or making HTTP requests.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-client-patterns-bpmstc-websiteagent --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going