firecrawl-multi-env-setup
Configure Firecrawl across development, staging, and production environments. Use when setting up multi-environment scraping pipelines, managing credit budgets per env, or configuring self-hosted Firecrawl for development. Trigger with phrases like "firecrawl environments", "firecrawl staging", "firecrawl dev prod", "firecrawl environment setup", "firecrawl config by env".
Best use case
firecrawl-multi-env-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Firecrawl across development, staging, and production environments. Use when setting up multi-environment scraping pipelines, managing credit budgets per env, or configuring self-hosted Firecrawl for development. Trigger with phrases like "firecrawl environments", "firecrawl staging", "firecrawl dev prod", "firecrawl environment setup", "firecrawl config by env".
Teams using firecrawl-multi-env-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/firecrawl-multi-env-setup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How firecrawl-multi-env-setup Compares
| Feature / Agent | firecrawl-multi-env-setup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Firecrawl across development, staging, and production environments. Use when setting up multi-environment scraping pipelines, managing credit budgets per env, or configuring self-hosted Firecrawl for development. Trigger with phrases like "firecrawl environments", "firecrawl staging", "firecrawl dev prod", "firecrawl environment setup", "firecrawl config by env".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Firecrawl Multi-Environment Setup
## Overview
Firecrawl's credit-based pricing makes environment separation critical. Development should use self-hosted Firecrawl or strict limits to avoid burning production credits during testing. This skill covers per-environment config, self-hosted Docker for dev, and credit budget enforcement.
## Environment Strategy
| Environment | API Source | Crawl Limit | Concurrency | Credits |
|-------------|-----------|-------------|-------------|---------|
| Development | Self-hosted Docker | 10 pages | 1 | Zero (local) |
| Staging | Cloud API (test key) | 50 pages | 2 | Limited |
| Production | Cloud API (prod key) | Per-task | Full plan | Monitored |
## Instructions
### Step 1: Environment-Aware Configuration
```typescript
// config/firecrawl.ts
import FirecrawlApp from "@mendable/firecrawl-js";
type Env = "development" | "staging" | "production";
interface FirecrawlConfig {
apiKey: string;
apiUrl?: string;
maxPagesPerCrawl: number;
maxDepth: number;
concurrency: number;
waitFor: number;
}
const configs: Record<Env, FirecrawlConfig> = {
development: {
apiKey: process.env.FIRECRAWL_API_KEY_DEV || "fc-localdev",
apiUrl: process.env.FIRECRAWL_API_URL_DEV || "http://localhost:3002",
maxPagesPerCrawl: 10,
maxDepth: 2,
concurrency: 1,
waitFor: 2000,
},
staging: {
apiKey: process.env.FIRECRAWL_API_KEY_STAGING!,
maxPagesPerCrawl: 50,
maxDepth: 3,
concurrency: 2,
waitFor: 3000,
},
production: {
apiKey: process.env.FIRECRAWL_API_KEY_PROD!,
maxPagesPerCrawl: 500,
maxDepth: 5,
concurrency: 5,
waitFor: 3000,
},
};
export function getConfig(): FirecrawlConfig {
const env = (process.env.NODE_ENV || "development") as Env;
return configs[env] || configs.development;
}
export function getFirecrawl(): FirecrawlApp {
const cfg = getConfig();
return new FirecrawlApp({
apiKey: cfg.apiKey,
...(cfg.apiUrl ? { apiUrl: cfg.apiUrl } : {}),
});
}
```
### Step 2: Self-Hosted Firecrawl for Development
```yaml
# docker-compose.dev.yml
services:
firecrawl:
image: mendableai/firecrawl:latest
ports:
- "3002:3002"
environment:
- PORT=3002
- USE_DB_AUTHENTICATION=false
- REDIS_URL=redis://redis:6379
- NUM_WORKERS_PER_QUEUE=1
- BULL_AUTH_KEY=devonly
depends_on:
redis:
condition: service_healthy
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
```
```bash
set -euo pipefail
docker compose -f docker-compose.dev.yml up -d
# Verify: curl http://localhost:3002/health
```
### Step 3: Credit-Safe Scraping Wrapper
```typescript
// lib/firecrawl-service.ts
import { getFirecrawl, getConfig } from "../config/firecrawl";
export async function safeScrape(url: string, options?: any) {
const firecrawl = getFirecrawl();
return firecrawl.scrapeUrl(url, {
formats: ["markdown"],
onlyMainContent: true,
waitFor: getConfig().waitFor,
...options,
});
}
export async function safeCrawl(url: string, customLimit?: number) {
const firecrawl = getFirecrawl();
const cfg = getConfig();
const limit = Math.min(customLimit ?? cfg.maxPagesPerCrawl, cfg.maxPagesPerCrawl);
return firecrawl.crawlUrl(url, {
limit,
maxDepth: cfg.maxDepth,
scrapeOptions: { formats: ["markdown"], onlyMainContent: true },
});
}
```
### Step 4: Environment Variables
```bash
# .env.local (development — uses self-hosted, zero credits)
FIRECRAWL_API_KEY_DEV=fc-localdev
FIRECRAWL_API_URL_DEV=http://localhost:3002
NODE_ENV=development
# CI / Staging
FIRECRAWL_API_KEY_STAGING=fc-staging-xxx
# Production
FIRECRAWL_API_KEY_PROD=fc-prod-xxx
```
### Step 5: CI/CD Pipeline
```yaml
# .github/workflows/deploy.yml
jobs:
test:
environment: staging
env:
FIRECRAWL_API_KEY_STAGING: ${{ secrets.FIRECRAWL_API_KEY_STAGING }}
NODE_ENV: staging
steps:
- run: npm ci && npm test
- run: npm run test:integration
# Uses staging config: 50-page limit, staging API key
deploy:
needs: test
environment: production
env:
FIRECRAWL_API_KEY_PROD: ${{ secrets.FIRECRAWL_API_KEY_PROD }}
NODE_ENV: production
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Dev credits drained | Using cloud API in dev | Point to self-hosted at localhost:3002 |
| Self-hosted not responding | Docker container down | `docker compose up -d firecrawl` |
| `402 Payment Required` | Prod credits exhausted | Monitor balance, set budget alerts |
| Different results per env | `waitFor` mismatch | Standardize wait time across envs |
## Examples
### Check Active Configuration
```typescript
import { getConfig } from "./config/firecrawl";
const cfg = getConfig();
console.log(`Env: ${process.env.NODE_ENV}`);
console.log(`Max pages: ${cfg.maxPagesPerCrawl}`);
console.log(`API: ${cfg.apiUrl || "https://api.firecrawl.dev"}`);
```
## Resources
- [Firecrawl Self-Hosting](https://docs.firecrawl.dev/contributing/self-host)
- [Firecrawl Pricing](https://firecrawl.dev/pricing)
- [Docker Compose](https://github.com/mendableai/firecrawl/blob/main/docker-compose.yaml)
## Next Steps
For deployment configuration, see `firecrawl-deploy-integration`.Related Skills
windsurf-multi-env-setup
Configure Windsurf IDE and Cascade AI across team members and project environments. Use when onboarding teams to Windsurf, setting up per-project Cascade configuration, or managing Windsurf settings across development, staging, and production contexts. Trigger with phrases like "windsurf team setup", "windsurf environments", "windsurf multi-project", "windsurf team config", "cascade rules per env".
webflow-multi-env-setup
Configure Webflow across development, staging, and production environments with per-environment API tokens, site IDs, and secret management via Vault/AWS/GCP. Trigger with phrases like "webflow environments", "webflow staging", "webflow dev prod", "webflow environment setup", "webflow config by env".
vercel-multi-env-setup
Configure Vercel across development, preview, and production environments with scoped secrets. Use when setting up per-environment configuration, managing environment-specific variables, or implementing environment isolation on Vercel. Trigger with phrases like "vercel environments", "vercel staging", "vercel dev prod", "vercel environment setup", "vercel env scoping".
veeva-multi-env-setup
Veeva Vault multi env setup for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva multi env setup".
vastai-multi-env-setup
Configure Vast.ai GPU cloud across dev, staging, and production environments. Use when isolating GPU pools per team, managing API key separation by env, or implementing spending controls per deployment tier. Trigger with phrases like "vastai environments", "vastai staging", "vastai dev prod", "vastai multi-env".
supabase-multi-env-setup
Configure Supabase across development, staging, and production with separate projects, environment-specific secrets, and safe migration promotion. Use when setting up multi-environment deployments, isolating dev from prod data, configuring per-environment Supabase projects, or promoting migrations through environments. Trigger: "supabase environments", "supabase staging", "supabase dev prod", "supabase multi-project", "supabase env config", "database branching".
speak-multi-env-setup
Configure Speak across dev, staging, and production with separate API keys and mock modes. Use when implementing multi env setup, or managing Speak language learning platform operations. Trigger with phrases like "speak multi env setup", "speak multi env setup".
snowflake-multi-env-setup
Configure Snowflake across dev, staging, and production with account-level isolation, zero-copy clones, and environment-specific RBAC. Trigger with phrases like "snowflake environments", "snowflake staging", "snowflake dev prod", "snowflake clone", "snowflake environment setup".
windsurf-workspace-setup
Initialize Windsurf workspace with project-specific AI rules. Activate when users mention "create windsurfrules", "setup workspace", "configure project ai", "initialize windsurf workspace", or "migrate to windsurf". Handles workspace configuration and team standardization. Use when working with windsurf workspace setup functionality. Trigger with phrases like "windsurf workspace setup", "windsurf setup", "windsurf".
windsurf-multi-file-editing
Manage multi-file edits with Cascade coordination. Activate when users mention "multi-file edit", "edit multiple files", "cross-file changes", "refactor across files", or "batch modifications". Handles coordinated multi-file operations. Use when working with windsurf multi file editing functionality. Trigger with phrases like "windsurf multi file editing", "windsurf editing", "windsurf".
shopify-multi-env-setup
Configure Shopify apps across development, staging, and production environments with separate stores, API credentials, and app instances. Trigger with phrases like "shopify environments", "shopify staging", "shopify dev vs prod", "shopify multi-store", "shopify environment setup".
salesforce-multi-env-setup
Configure Salesforce across Developer, Sandbox, and Production environments with proper org management. Use when setting up multi-environment deployments, configuring per-environment credentials, or implementing sandbox-to-production promotion flows. Trigger with phrases like "salesforce environments", "salesforce sandbox", "salesforce dev prod", "salesforce org management", "salesforce sandbox types".