.claude/skills/skill-builder-generic/examples/api-client-skill/SKILL.md
REST API client builder with authentication, error handling, retry logic, and request management. Supports OAuth, JWT, API keys. Use when building API integrations, creating API clients, or working with REST services.
npx skillsauth add adaptationio/skrillz api-clientInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build robust REST API clients with authentication, comprehensive error handling, automatic retries, and request/response management.
const client = new APIClient({
baseURL: 'https://api.example.com',
apiKey: process.env.API_KEY
});
const response = await client.get('/users');
console.log(response.data);
Create client with base configuration:
const client = new APIClient({
baseURL: 'https://api.example.com',
timeout: 5000,
retries: 3
});
See references/authentication-guide.md for all methods.
API Key:
client.setAuth({
type: 'apiKey',
key: process.env.API_KEY
});
OAuth 2.0:
client.setAuth({
type: 'oauth',
clientId: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET
});
// GET request
const users = await client.get('/users');
// POST request
const newUser = await client.post('/users', {
name: 'John Doe',
email: '[email protected]'
});
// PUT request
const updated = await client.put('/users/123', {
name: 'Jane Doe'
});
// DELETE request
await client.delete('/users/123');
try {
const response = await client.get('/users');
console.log(response.data);
} catch (error) {
if (error.status === 401) {
console.error('Authentication failed');
} else if (error.status === 429) {
console.error('Rate limit exceeded');
} else {
console.error('Request failed:', error.message);
}
}
const client = new APIClient({
// Base configuration
baseURL: 'https://api.example.com',
timeout: 5000, // Request timeout (ms)
// Retry configuration
retries: 3, // Number of retries
retryDelay: 1000, // Initial retry delay (ms)
retryMult iplier: 2, // Exponential backoff multiplier
// Authentication (see references/authentication-guide.md)
auth: {
type: 'apiKey',
key: process.env.API_KEY
},
// Headers
headers: {
'Content-Type': 'application/json',
'Custom-Header': 'value'
},
// Logging
logging: true, // Enable request/response logging
logLevel: 'info' // debug, info, warn, error
});
See templates/api-config-template.json for complete configuration template.
client.setAuth({
type: 'apiKey',
key: process.env.API_KEY,
header: 'X-API-Key' // Optional, default: 'Authorization'
});
See references/authentication-guide.md#oauth for complete OAuth flow.
See references/authentication-guide.md#jwt for JWT implementation.
Errors are classified into categories for appropriate handling:
| Status Code | Category | Retry? | Action | |-------------|----------|--------|--------| | 400 | Client Error | No | Fix request | | 401 | Auth Error | No | Refresh token | | 403 | Permission | No | Check permissions | | 404 | Not Found | No | Check endpoint | | 429 | Rate Limit | Yes | Wait and retry | | 500 | Server Error | Yes | Retry | | 503 | Unavailable | Yes | Retry |
See references/error-handling.md for complete error handling strategies.
Validate API configuration before using:
python scripts/validate-config.py config.json
Copy templates from templates/ directory:
api-config-template.json - Complete configurationerror-handler-template.js - Error handling coderetry-logic-template.js - Retry implementationVersion: 1.0 Last Updated: October 25, 2025 Example Type: Complex skill (full structure)
development
Setup secure web-based terminal access to WSL2 from mobile/tablet via ttyd + ngrok/Cloudflare/Tailscale. One-command install, start, stop, status. Use when you need remote terminal access, web terminal, browser-based shell, or mobile access to WSL2 environment.
development
Complete development workflows where Claude writes the code while Gemini and Codex provide research, planning, reviews, and different perspectives. Claude remains the main developer. Use for complex projects requiring expert planning and multi-perspective reviews.
development
Systematic progress tracking for skill development. Manages task states (pending/in_progress/completed), updates in real-time, reports progress, identifies blockers, and maintains momentum. Use when tracking skill development, coordinating work, or reporting progress.
testing
Comprehensive testing workflow orchestrating functional testing, example validation, integration testing, and usability assessment. Sequential workflow for complete skill testing from examples through scenarios to integration validation. Use when conducting thorough testing, pre-deployment validation, ensuring skill functionality, or comprehensive quality checks.