webflow-sdk-patterns

Featured

Apply production-ready Webflow SDK patterns — singleton client, typed error handling, pagination helpers, and raw response access for the webflow-api package. Use when implementing Webflow integrations, refactoring SDK usage, or establishing team coding standards. Trigger with phrases like "webflow SDK patterns", "webflow best practices", "webflow code patterns", "idiomatic webflow", "webflow typescript".

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

# Webflow SDK Patterns ## Overview Production-ready patterns for the `webflow-api` SDK (v3.x). Covers singleton client, typed error handling, pagination, raw response headers, and multi-tenant factory. ## Prerequisites - `webflow-api` v3.x installed - TypeScript 5+ project - Familiarity with async/await and the Webflow Data API v2 ## Instructions ### Pattern 1: Singleton Client with Configuration ```typescript // src/webflow/client.ts import { WebflowClient } from "webflow-api"; interface WebflowConfig { accessToken: string; timeout?: number; // Request timeout in ms (default: SDK default) maxRetries?: number; // Auto-retry on 429/5xx (default: 2) } let instance: WebflowClient | null = null; export function getWebflowClient(config?: Partial<WebflowConfig>): WebflowClient { if (!instance) { const token = config?.accessToken || process.env.WEBFLOW_API_TOKEN; if (!token) throw new Error("WEBFLOW_API_TOKEN required"); instance = new WebflowClient({ accessToken: token, // The SDK supports timeout and maxRetries natively ...(config?.timeout && { timeout: config.timeout }), ...(config?.maxRetries !== undefined && { maxRetries: config.maxRetries }), }); } return instance; } // Reset client (useful for token rotation) export function resetWebflowClient(): void { instance = null; } ``` ### Pattern 2: Typed Error Handling The SDK throws `WebflowError` subclasses. Handle them by type: ```typescript import { WebflowCli...

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