firecrawl-sdk-patterns

Featured

Apply production-ready Firecrawl SDK patterns for TypeScript and Python. Use when implementing Firecrawl integrations, building reusable scraping services, or establishing team coding standards for Firecrawl. Trigger with phrases like "firecrawl SDK patterns", "firecrawl best practices", "firecrawl code patterns", "idiomatic firecrawl", "firecrawl wrapper".

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

# Firecrawl SDK Patterns ## Overview Production-ready patterns for Firecrawl SDK (`@mendable/firecrawl-js` / `firecrawl-py`). Covers singleton client, typed wrappers, retry with backoff, response validation, and reusable scraping service patterns. ## Prerequisites - `@mendable/firecrawl-js` installed - Understanding of async/await patterns - TypeScript strict mode recommended ## Instructions ### Step 1: Singleton Client with Configuration ```typescript // src/firecrawl/client.ts import FirecrawlApp from "@mendable/firecrawl-js"; let instance: FirecrawlApp | null = null; export function getFirecrawl(): FirecrawlApp { if (!instance) { if (!process.env.FIRECRAWL_API_KEY) { throw new Error("FIRECRAWL_API_KEY environment variable is required"); } instance = new FirecrawlApp({ apiKey: process.env.FIRECRAWL_API_KEY, ...(process.env.FIRECRAWL_API_URL ? { apiUrl: process.env.FIRECRAWL_API_URL } : {}), }); } return instance; } ``` ### Step 2: Typed Scrape Wrapper ```typescript // src/firecrawl/scrape.ts import { getFirecrawl } from "./client"; interface ScrapeResult { url: string; title: string; markdown: string; links: string[]; scrapedAt: string; } export async function scrapePage( url: string, options?: { waitFor?: number; includeLinks?: boolean } ): Promise<ScrapeResult> { const firecrawl = getFirecrawl(); const formats: string[] = ["markdown"]; if (options?.includeLinks) formats.push("links"); ...

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