Third party integration

From aj-geddes/useful-ai-prompts · View interactive version

Third party integration is an AI agent skill from the GitHub repository aj-geddes/useful-ai-prompts. Integrate external APIs and services with error handling, retry logic, and data transformation. Use when connecting to payment processors, messaging services, analytics platforms, or other third-party providers.

How to use this skill

Skill file

Third-Party Integration

Table of Contents

Overview

Build robust integrations with external services using standardized patterns for API calls, error handling, authentication, and data transformation.

When to Use

Quick Start

Minimal working example:

const axios = require("axios");

class ThirdPartyClient {
  constructor(config) {
    this.apiKey = config.apiKey;
    this.baseUrl = config.baseUrl;
    this.timeout = config.timeout || 30000;
    this.retryAttempts = config.retryAttempts || 3;
    this.retryDelay = config.retryDelay || 1000;
    this.client = axios.create({
      baseURL: this.baseUrl,
      timeout: this.timeout,
      headers: {
        Authorization: `Bearer ${this.apiKey}`,
        "Content-Type": "application/json",
      },
    });
  }

  async request(method, endpoint, data = null, options = {}) {
    let lastError;

    for (let attempt = 0; attempt < this.retryAttempts; attempt++) {
      try {
        const response = await this.client({
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

| Guide | Contents |

|---|---|

| Third-Party Client Wrapper | Third-Party Client Wrapper |

| Payment Processor Integration (Stripe) | Payment Processor Integration (Stripe) |

| Email Service Integration (SendGrid) | Email Service Integration (SendGrid) |

| Python Third-Party Integration | Python Third-Party Integration |

| Data Transformation | Data Transformation |

Best Practices

✅ DO

❌ DON'T

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.