api-client-patterns
Provides patterns for building robust API clients with error handling, request/response management, and axios integration.
Install this skill
Security score
The api-client-patterns skill was audited on Feb 9, 2026 and we found 14 security issues across 3 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 46 | config.headers.Authorization = `Bearer ${token}`; |
Template literal with variable interpolation in command context
| 160 | throw new Error(`Validation error: ${message}`); |
Template literal with variable interpolation in command context
| 303 | const response = await fetch(`${API_BASE}/generate/stream`, { |
Template literal with variable interpolation in command context
| 312 | throw new Error(`HTTP ${response.status}: ${response.statusText}`); |
Template literal with variable interpolation in command context
| 389 | console.log(`Retry attempt ${attempt + 1}/${maxRetries} after ${delay}ms`); |
Access to .env file
| 28 | const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:3001/api'; |
Access to .env file
| 459 | const env = import.meta.env.MODE; |
Access to .env file
| 468 | return import.meta.env.VITE_API_BASE || 'http://localhost:3001/api'; |
External URL reference
| 28 | const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:3001/api'; |
External URL reference
| 119 | const res = await axios.post('http://localhost:3001/api/auth/verify', { |
External URL reference
| 126 | const res = await axios.post('http://localhost:3001/api/generate', data); |
External URL reference
| 463 | return 'https://api.yourapp.com'; |
External URL reference
| 465 | return 'https://staging-api.yourapp.com'; |
External URL reference
| 468 | return import.meta.env.VITE_API_BASE || 'http://localhost:3001/api'; |