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.zipInstalls 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.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
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
- Inspect the runtime, official package and resolved version, compiler settings, existing HTTP/client layer, and exact operations required.
- Define application request/result types containing only approved fields, explicit scope/limits, provenance, origin status, terminal state, and pagination metadata.
- Construct one client per process boundary from validated configuration; inject it into services and tests rather than creating clients inside business logic.
- Map provider documents and errors into a discriminated result model. Keep API failures, captured origin errors, validation rejection, partial results, and cancellation distinct.
- Expose waiter methods only where blocking fits the deadline; otherwise expose submit/status/cancel and durable pagination through an owned job service.
- Centralize bounded retry, policy, redaction, metrics, and version reporting. Do not erase SDK types with any or dictionary-shaped pass-throughs.
- 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| firecrawl-sdk-patterns (this skill) | 1 | 2mo | Review | Intermediate |
| copilot-sdk | 7 | 5mo | Review | Intermediate |
| adk-engineer | 3 | 2mo | Review | Advanced |
| agent-v3-performance-engineer | 3 | 7mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
copilot-sdk
github
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
adk-engineer
jeremylongshore
Execute software engineer specializing in creating production-ready ADK agents with best practices, code structure, testing, and deployment automation. Use when asked to "build ADK agent", "create agent code", or "engineer ADK application". Trigger with relevant phrases based on skill purpose.
agent-v3-performance-engineer
ruvnet
Agent skill for v3-performance-engineer - invoke with $agent-v3-performance-engineer
llm-application-dev
skillcreatorai
Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.
wox-plugin-creator
Wox-launcher
Create and scaffold Wox plugins (nodejs, python, script-nodejs, script-python). Use when cloning official SDK templates, generating script plugin templates, or preparing plugins for publish.
agent-implementer-sparc-coder
ruvnet
Agent skill for implementer-sparc-coder - invoke with $agent-implementer-sparc-coder