mcpField
T
third-party-integration

third-party-integration

github.com/aj-geddesDevelopment373440 installsUpdated 34w ago
Repository

About third-party-integration

A skill for developers building integrations with external services. It provides patterns and reference guides for API calls, authentication, error handling, and data transformation.

Key features

  1. 01API client patterns
  2. 02Authentication and error handling
  3. 03Retry and rate-limit guidance
  4. 04Webhook validation
  5. 05Reference guides for payment, email, and Python integrations

Use cases

  1. 01Integrating payment or messaging services
  2. 02Connecting analytics, storage, or CRM systems
  3. 03Building multi-service architectures

Install

Copy the command and run it in a terminal.

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

After installing, type/third-party-integrationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
data-transformation.md
email-service-integration-sendgrid.md
payment-processor-integration-stripe.md
python-third-party-integration.md
third-party-client-wrapper.md
scripts/
validate-api.sh
templates/
api-scaffold.yaml

Details

From the project README

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

  • 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:

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:

GuideContents
Third-Party Client WrapperThird-Party Client Wrapper
Payment Processor Integration (Stripe)Payment Processor Integration (Stripe)
Email Service Integration (SendGrid)Email Service Integration (SendGrid)
Python Third-Party IntegrationPython Third-Party Integration
Data TransformationData 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

Comments

Markdown supported