FI

firecrawl-sdk-patterns

Use idiomatic patterns like singleton clients, typed wrappers, and retry-with-backoff logic for Firecrawl.

Install

mkdir -p .claude/skills/firecrawl-sdk-patterns && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7430" && unzip -o skill.zip -d .claude/skills/firecrawl-sdk-patterns && rm skill.zip

Installs to .claude/skills/firecrawl-sdk-patterns

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Apply production-ready Firecrawl SDK patterns for TypeScript and Python.
72 charsno explicit “when” trigger
Intermediate

Key capabilities

  • →Implement singleton Firecrawl client instances
  • →Create typed service wrappers for API calls
  • →Configure automatic retry with exponential backoff
  • →Manage request concurrency with queues
  • →Validate API responses using Zod schemas

How it works

The skill provides standardized patterns for client initialization, request retries, and response validation to ensure stable and type-safe integration with Firecrawl SDKs.

Inputs & outputs

You give it
API configuration and target URL
You get back
Validated, typed scraping results

When to use firecrawl-sdk-patterns

  • →Build reusable scraping services
  • →Implement retry-with-backoff for stable scraping
  • →Set up singleton clients for Firecrawl
  • →Define team coding standards for scraping

About this skill

Firecrawl v2 SDK Boundary

Overview

Keep Firecrawl behind a narrow application-owned interface so provider changes, policy, retries, and tests do not leak across the codebase.

Prerequisites

  • The target repository or integration path and the requested operator outcome.
  • The source authorization, data classification, and environment policy.
  • Current Firecrawl documentation, credentials only when needed, and an owner for approvals.

Current Contract

Node uses the named Firecrawl client from the firecrawl install surface; Python uses Firecrawl from firecrawl-py. Current top-level v2 methods include scrape, crawl, startCrawl, getCrawlStatus, map, batchScrape, startBatchScrape, getBatchScrapeStatus, search, parse, and agent surfaces. Feature-frozen v1 lives behind a separate compatibility boundary.

Authentication

For authenticated Cloud operations, inject FIRECRAWL_API_KEY from an approved secret manager. REST requests use Authorization: Bearer with the key. Never print, commit, transmit, or place a key in a URL. Keyless access is suitable only where the current documentation explicitly allows it and the workload accepts its limits; production workflows should make identity and team ownership explicit.

Instructions

  1. Inspect the runtime, official package and resolved version, compiler settings, existing HTTP/client layer, and exact operations required.
  2. Define application request/result types containing only approved fields, explicit scope/limits, provenance, origin status, terminal state, and pagination metadata.
  3. Construct one client per process boundary from validated configuration; inject it into services and tests rather than creating clients inside business logic.
  4. Map provider documents and errors into a discriminated result model. Keep API failures, captured origin errors, validation rejection, partial results, and cancellation distinct.
  5. Expose waiter methods only where blocking fits the deadline; otherwise expose submit/status/cancel and durable pagination through an owned job service.
  6. Centralize bounded retry, policy, redaction, metrics, and version reporting. Do not erase SDK types with any or dictionary-shaped pass-throughs.
  7. Add synthetic contract tests, pin the dependency through the lockfile, and document the reviewed upgrade and rollback process.

Tool Discipline

Use Read, Glob, and Grep to inspect code, configuration, tests, and evidence. Use Write/Edit only for approved implementation or documentation changes. Do not call Firecrawl, rotate keys, change account settings, scrape a target, or deploy merely because this skill was invoked.

Approval Boundaries

Require approval before adding/upgrading the SDK, exposing a new Firecrawl operation, relaxing types, changing retry policy, or accepting a provider response directly in domain code.

Output

Return the adapter interface, current package/source/version, method mapping, configuration contract, error and pagination model, policy hooks, tests, and upgrade rollback.

Error Handling

  • Docs and installed types disagree: pin evidence and resolve before coding.
  • Required result field is absent: return a typed partial/failure state rather than a fabricated default.
  • Legacy and v2 methods are mixed: isolate legacy compatibility and create a migration plan.

Examples

  • "Create a Firecrawl service" yields a narrow typed adapter with injected client and synthetic tests.
  • "Return the SDK object everywhere" is rejected because it couples domain code to provider drift.

Resources

Read official Firecrawl evidence before relying on an endpoint, SDK method, plan limit, price, retention option, or self-hosted release.

When not to use it

  • →When simple, one-off scripts do not require error handling
  • →When using non-Node.js or non-Python environments

Prerequisites

FIRECRAWL_API_KEY environment variable@mendable/firecrawl-js

Limitations

  • →Retry logic is specific to 429 and 5xx status codes
  • →Requires TypeScript strict mode for full benefit

How it compares

It enforces production-grade coding standards like singleton patterns and queue-based concurrency instead of basic, unmanaged API calls.

Compared to similar skills

firecrawl-sdk-patterns side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
firecrawl-sdk-patterns (this skill)12moReviewIntermediate
copilot-sdk75moReviewIntermediate
adk-engineer32moReviewAdvanced
agent-v3-performance-engineer37moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore →

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

Search skills

Search the agent skills registry