Agent skill

third-party-integration

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.

Stars 151
Forks 20

Install this agent skill to your Project

npx add-skill https://github.com/aj-geddes/useful-ai-prompts/tree/main/skills/third-party-integration

SKILL.md

Third-Party Integration

Table of Contents

  • Overview
  • When to Use
  • Quick Start
  • Reference Guides
  • Best Practices

Overview

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

When to Use

  • Integrating payment processors (Stripe, PayPal)
  • Using messaging services (SendGrid, Twilio)
  • Connecting to analytics platforms (Mixpanel, Segment)
  • Syncing with storage services (AWS S3, Google Cloud)
  • Integrating CRM systems (Salesforce, HubSpot)
  • Building multi-service architectures

Quick Start

Minimal working example:

javascript
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

  • Implement retry logic with exponential backoff
  • Validate webhook signatures
  • Log all API interactions
  • Use environment variables for secrets
  • Transform API responses to internal models
  • Implement circuit breakers for critical services
  • Monitor API quota and rate limits
  • Add proper error handling
  • Use timeouts appropriately
  • Test with sandbox/test API keys

❌ DON'T

  • Hardcode API keys
  • Retry all errors indefinitely
  • Log sensitive data
  • Trust unvalidated webhook data
  • Ignore rate limits
  • Make synchronous blocking calls
  • Expose vendor-specific details to clients
  • Skip error handling
  • Use production keys in tests

Expand your agent's capabilities with these related and highly-rated skills.

aj-geddes/useful-ai-prompts

websocket-implementation

Implement real-time bidirectional communication with WebSockets including connection management, message routing, and scaling. Use when building real-time features, chat systems, live notifications, or collaborative applications.

151 20
Explore
aj-geddes/useful-ai-prompts

refactor-legacy-code

Modernize and improve legacy codebases while maintaining functionality. Use when you need to refactor old code, reduce technical debt, modernize deprecated patterns, or improve code maintainability without breaking existing behavior.

151 20
Explore
aj-geddes/useful-ai-prompts

Sentiment Analysis

Classify text sentiment using NLP techniques, lexicon-based analysis, and machine learning for opinion mining, brand monitoring, and customer feedback analysis

151 20
Explore
aj-geddes/useful-ai-prompts

flask-api-development

Develop lightweight Flask APIs with routing, blueprints, database integration, authentication, and request/response handling. Use when building RESTful APIs, microservices, or lightweight web services with Flask.

151 20
Explore
aj-geddes/useful-ai-prompts

ML Model Explanation

Interpret machine learning models using SHAP, LIME, feature importance, partial dependence, and attention visualization for explainability

151 20
Explore
aj-geddes/useful-ai-prompts

Statistical Hypothesis Testing

Conduct statistical tests including t-tests, chi-square, ANOVA, and p-value analysis for statistical significance, hypothesis validation, and A/B testing

151 20
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results