apify-sdk-patterns
Installation
SKILL.md
Apify SDK Patterns
Overview
Production patterns for both the apify SDK (building Actors) and apify-client (calling Actors remotely). Covers Crawlee crawler selection, data storage, proxy configuration, and typed client wrappers.
Prerequisites
apify-clientand/orapify+crawleeinstalledAPIFY_TOKENconfigured- TypeScript recommended
Pattern 1: Typed Client Singleton
// src/apify/client.ts
import { ApifyClient } from 'apify-client';
let instance: ApifyClient | null = null;