api-integration-builder
Generates production-ready API clients with TypeScript types, retry logic, rate limiting, authentication (OAuth, API keys), error handling, and mock responses. Use when user says "integrate API", "API client", "connect to service", or requests third-party service integration.
What this skill does
# API Integration Builder
## Purpose
Generates complete, production-ready API clients with all the boilerplate handled: TypeScript types, authentication, retry logic, rate limiting, and error handling.
**For ADHD users**: Instant integration - no need to read API docs and implement everything manually.
**For all users**: Saves hours of boilerplate code, type-safe, production-ready from day one.
## Activation Triggers
- User says: "integrate API", "API client", "connect to service", "create SDK"
- Requests for: Stripe integration, SendGrid, Twilio, any third-party API
- "Set up OAuth" or "implement API authentication"
## Core Workflow
### 1. Gather Requirements
Ask user for:
```javascript
{
api_name: "Stripe",
api_base_url: "https://api.stripe.com/v1",
auth_type: "api_key|oauth|bearer|basic",
endpoints: [
{ method: "GET", path: "/customers", description: "List customers" },
{ method: "POST", path: "/customers", description: "Create customer" }
],
rate_limit: { requests: 100, per: "minute" } // optional
}
```
**If user provides API documentation URL**, fetch it and extract this information automatically.
### 2. Generate TypeScript Client
**File structure**:
```
api-client/
├── client.ts # Main client class
├── types.ts # TypeScript types
├── auth.ts # Authentication handler
├── errors.ts # Custom error classes
├── retry.ts # Retry logic
├── rate-limiter.ts # Rate limiting
└── mocks.ts # Mock responses for testing
```
### 3. Client Template
```typescript
// client.ts
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
import { AuthHandler } from './auth';
import { RateLimiter } from './rate-limiter';
import { RetryHandler } from './retry';
import { APIError, RateLimitError, AuthenticationError } from './errors';
import type { ClientConfig, APIResponse } from './types';
export class {APIName}Client {
private axios: AxiosInstance;
private auth: AuthHandler;
private rateLimiter: RateLimiter;
private retryHandler: RetryHandler;
constructor(config: ClientConfig) {
this.auth = new AuthHandler(config.apiKey);
this.rateLimiter = new RateLimiter(config.rateLimit);
this.retryHandler = new RetryHandler(config.retryConfig);
this.axios = axios.create({
baseURL: config.baseURL,
timeout: config.timeout || 30000,
headers: {
'Content-Type': 'application/json',
'User-Agent': '{APIName}-Client/1.0.0',
...config.defaultHeaders,
},
});
// Request interceptor for auth
this.axios.interceptors.request.use(
async (config) => {
await this.rateLimiter.wait();
return this.auth.addAuthHeaders(config);
},
(error) => Promise.reject(error)
);
// Response interceptor for retry logic
this.axios.interceptors.response.use(
(response) => response,
async (error) => {
if (this.retryHandler.shouldRetry(error)) {
return this.retryHandler.retry(error);
}
return Promise.reject(this.handleError(error));
}
);
}
private handleError(error: any): Error {
if (error.response?.status === 401) {
return new AuthenticationError('Invalid API credentials');
}
if (error.response?.status === 429) {
return new RateLimitError('Rate limit exceeded');
}
if (error.response?.data?.message) {
return new APIError(error.response.data.message, error.response.status);
}
return new APIError('Unknown API error', error.response?.status);
}
// Generated methods for each endpoint
async listCustomers(params?: ListCustomersParams): Promise<APIResponse<Customer[]>> {
const response = await this.axios.get('/customers', { params });
return response.data;
}
async createCustomer(data: CreateCustomerData): Promise<APIResponse<Customer>> {
const response = await this.axios.post('/customers', data);
return response.data;
}
// ... more generated methods
}
```
### 4. Authentication Handler
```typescript
// auth.ts
import { AxiosRequestConfig } from 'axios';
export type AuthConfig =
| { type: 'api_key'; key: string; header?: string }
| { type: 'bearer'; token: string }
| { type: 'oauth'; clientId: string; clientSecret: string; tokenUrl: string }
| { type: 'basic'; username: string; password: string };
export class AuthHandler {
private config: AuthConfig;
private accessToken?: string;
private tokenExpiry?: Date;
constructor(config: AuthConfig) {
this.config = config;
}
async addAuthHeaders(axiosConfig: AxiosRequestConfig): Promise<AxiosRequestConfig> {
const headers = axiosConfig.headers || {};
switch (this.config.type) {
case 'api_key':
headers[this.config.header || 'Authorization'] = `Bearer ${this.config.key}`;
break;
case 'bearer':
headers['Authorization'] = `Bearer ${this.config.token}`;
break;
case 'oauth':
const token = await this.getOAuthToken();
headers['Authorization'] = `Bearer ${token}`;
break;
case 'basic':
const credentials = Buffer.from(
`${this.config.username}:${this.config.password}`
).toString('base64');
headers['Authorization'] = `Basic ${credentials}`;
break;
}
return { ...axiosConfig, headers };
}
private async getOAuthToken(): Promise<string> {
// Check if token is still valid
if (this.accessToken && this.tokenExpiry && this.tokenExpiry > new Date()) {
return this.accessToken;
}
// Fetch new token
const response = await axios.post(this.config.tokenUrl, {
grant_type: 'client_credentials',
client_id: this.config.clientId,
client_secret: this.config.clientSecret,
});
this.accessToken = response.data.access_token;
this.tokenExpiry = new Date(Date.now() + response.data.expires_in * 1000);
return this.accessToken;
}
}
```
### 5. Retry Logic
```typescript
// retry.ts
import { AxiosError, AxiosRequestConfig } from 'axios';
export interface RetryConfig {
maxRetries: number;
initialDelay: number; // ms
maxDelay: number; // ms
backoffFactor: number;
retryableStatuses: number[];
}
export class RetryHandler {
private config: RetryConfig;
private retryCount: Map<string, number> = new Map();
constructor(config?: Partial<RetryConfig>) {
this.config = {
maxRetries: config?.maxRetries || 3,
initialDelay: config?.initialDelay || 1000,
maxDelay: config?.maxDelay || 30000,
backoffFactor: config?.backoffFactor || 2,
retryableStatuses: config?.retryableStatuses || [408, 429, 500, 502, 503, 504],
};
}
shouldRetry(error: AxiosError): boolean {
if (!error.response) return true; // Network error, retry
if (!this.config.retryableStatuses.includes(error.response.status)) return false;
const key = this.getRequestKey(error.config);
const count = this.retryCount.get(key) || 0;
return count < this.config.maxRetries;
}
async retry(error: AxiosError): Promise<any> {
const key = this.getRequestKey(error.config);
const count = this.retryCount.get(key) || 0;
this.retryCount.set(key, count + 1);
const delay = Math.min(
this.config.initialDelay * Math.pow(this.config.backoffFactor, count),
this.config.maxDelay
);
await this.sleep(delay);
return axios.request(error.config);
}
private getRequestKey(config: AxiosRequestConfig): string {
return `${config.method}:${config.url}`;
}
private sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
}
```
### 6. Rate Limiter
```typescript
// rate-limiter.ts
export interface RateLimitConfig {
requests: number;
per: 'second' | 'minute' | 'hour';
}
export class RateLimiter {
private config: RateLimitConfig;
private timestamps: number[] = [];
constructor(config: RateLiRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.