Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/vercel-sdk-patterns

@0d57af8
Run it yourself

Production-ready Vercel REST API patterns with typed fetch wrappers and error handling. Use when integrating with the Vercel API programmatically, building deployment tools, or establishing team coding standards for Vercel API calls. Trigger with phrases like "vercel SDK patterns", "vercel API wrapper", "vercel REST API client", "vercel best practices", "idiomatic vercel API".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/vercel-sdk-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesimplementation.md

≈388 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Implementation Guide

Step 1: Implement Singleton Pattern (Recommended)

// src/vercel/client.ts
import { VercelClient } from 'vercel';

let instance: VercelClient | null = null;

export function getVercelClient(): VercelClient {
  if (!instance) {
    instance = new VercelClient({
      apiKey: process.env.VERCEL_API_KEY!,
      // Additional options
    });
  }
  return instance;
}

Step 2: Add Error Handling Wrapper

import { VercelError } from 'vercel';

async function safeVercelCall<T>(
  operation: () => Promise<T>
): Promise<{ data: T | null; error: Error | null }> {
  try {
    const data = await operation();
    return { data, error: null };
  } catch (err) {
    if (err instanceof VercelError) {
      console.error({
        code: err.code,
        message: err.message,
      });
    }
    return { data: null, error: err as Error };
  }
}

Step 3: Implement Retry Logic

async function withRetry<T>(
  operation: () => Promise<T>,
  maxRetries = 3,
  backoffMs = 1000
): Promise<T> {
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
    try {
      return await operation();
    } catch (err) {
      if (attempt === maxRetries) throw err;
      const delay = backoffMs * Math.pow(2, attempt - 1);
      await new Promise(r => setTimeout(r, delay));
    }
  }
  throw new Error('Unreachable');
}

Tons of Skills by Intent Solutions | jeremylongshore.com

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides production-ready TypeScript and Python patterns for integrating with the Vercel REST API. It follows security best practices such as using environment variables for secrets, implementing exponential backoff for rate limits, and using well-known official API endpoints. No malicious patterns or vulnerabilities were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files
version
1.18.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "vercel",
  "api",
  "typescript",
  "patterns"
]
All 3 allowed tools
ReadWriteEdit
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/vercel-sdk-patterns