vercel-sdk-patterns

Featured

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".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Vercel SDK Patterns ## Overview Build a typed, production-ready wrapper around the Vercel REST API (`api.vercel.com`). Covers authentication, pagination, error handling, retry logic, and common endpoint patterns for deployments, projects, and environment variables. ## Prerequisites - Completed `vercel-install-auth` setup - TypeScript project with `strict` mode enabled - Vercel access token with appropriate scope ## Instructions ### Step 1: Create Typed API Client ```typescript // lib/vercel-client.ts interface VercelClientConfig { token: string; teamId?: string; baseUrl?: string; } interface VercelError { error: { code: string; message: string }; } class VercelClient { private token: string; private teamId?: string; private baseUrl: string; constructor(config: VercelClientConfig) { this.token = config.token; this.teamId = config.teamId; this.baseUrl = config.baseUrl ?? 'https://api.vercel.com'; } private async request<T>( method: string, path: string, body?: unknown ): Promise<T> { const url = new URL(path, this.baseUrl); if (this.teamId) url.searchParams.set('teamId', this.teamId); const res = await fetch(url.toString(), { method, headers: { Authorization: `Bearer ${this.token}`, 'Content-Type': 'application/json', }, body: body ? JSON.stringify(body) : undefined, }); if (!res.ok) { const err: VercelError = await res.json(); throw new VercelApiErr...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category