返回 Skills
firecrawl/skills· ISC 内容可用

firecrawl-build-onboarding

Get Firecrawl credentials and SDK setup into a project. Use when an application needs `FIRECRAWL_API_KEY`, when an agent should add Firecrawl to `.env`, when the user wants to authenticate Firecrawl for app code, or when choosing the first SDK and docs for a new Firecrawl integration. This skill includes its own browser auth flow, so it does not depend on the website onboarding skill.

安装

与 skills.sh 相同的 Command / Prompt 安装方式


name: firecrawl-build-onboarding description: Get Firecrawl credentials and SDK setup into a project. Use when an application needs FIRECRAWL_API_KEY, when an agent should add Firecrawl to .env, when the user wants to authenticate Firecrawl for app code, or when choosing the first SDK and docs for a new Firecrawl integration. This skill includes its own browser auth flow, so it does not depend on the website onboarding skill. license: ISC metadata: author: firecrawl version: "0.1.0" homepage: https://www.firecrawl.dev source: https://github.com/firecrawl/skills inputs:

  • name: FIRECRAWL_API_KEY description: Firecrawl API key used for hosted Firecrawl API requests. required: true
  • name: FIRECRAWL_API_URL description: Optional base URL for self-hosted Firecrawl deployments. required: false references:
  • references/auth-flow.md
  • references/sdk-installation.md
  • references/project-setup.md

Firecrawl Build Onboarding

Use this skill for the application-integration path from Firecrawl's onboarding flow.

Install

If you haven't installed yet, one command sets up both the CLI tools (for live web work) and the build skills (for app integration):

npx -y firecrawl-cli@latest init --all --browser

This installs the Firecrawl CLI, the CLI skills, and these build skills together. It also opens browser auth so the human can sign in or create an account. No separate npx skills add step is needed.

Use This When

  • a project needs FIRECRAWL_API_KEY
  • the user wants Firecrawl wired into .env
  • you are adding Firecrawl to an app for the first time
  • you need to choose the first SDK or REST path

If the human still needs to sign up, sign in, or authorize access in the browser, use the auth flow reference in this skill.

Quick Start

If the user already has an API key, place it in .env:

FIRECRAWL_API_KEY=fc-...

If the project is self-hosted, also set:

FIRECRAWL_API_URL=https://your-firecrawl-instance.example.com

Then decide which integration path applies:

  • Fresh project -> choose the target stack, install the SDK, add the first Firecrawl call, and run a smoke test
  • Existing project -> inspect the repo first, then integrate Firecrawl where the project already handles third-party APIs and env vars

What Do You Need?

TaskReference
Run the browser auth flow and save FIRECRAWL_API_KEYreferences/auth-flow.md
Install the right SDKreferences/sdk-installation.md
Put credentials into .env or project configreferences/project-setup.md
Choose the right endpoint after setupfirecrawl-build
Need live web tooling during this taskThe CLI skills are already installed from the same command
Start implementation from a known URLfirecrawl-build-scrape
Start implementation from a queryfirecrawl-build-search

Docs (Source of Truth)

Read the source-of-truth page for your project language for SDK usage, schemas, and examples:

After Setup

Once the key is present:

  1. decide whether this is a fresh project or an existing codebase
  2. ask what Firecrawl should do in the product
  3. pick the narrowest endpoint that matches that behavior
  4. read the source-of-truth page for the project language before writing code
  5. add the SDK or REST call in code
  6. run a smoke test that proves one real Firecrawl request succeeds
  7. use the endpoint-specific skills in this repo for implementation guidance
  8. if you also need live web tooling during the current task, the CLI skills are already installed — use firecrawl/cli

附带文件

references/auth-flow.md
# Auth Flow

Use this browser flow when the user does not already have a Firecrawl API key.

## Step 1: Generate auth parameters

```bash
SESSION_ID=$(openssl rand -hex 32)
CODE_VERIFIER=$(openssl rand -base64 32 | tr '+/' '-_' | tr -d '=\n' | head -c 43)
CODE_CHALLENGE=$(printf '%s' "$CODE_VERIFIER" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')
```

## Step 2: Ask the user to open this URL

```text
https://www.firecrawl.dev/cli-auth?code_challenge=$CODE_CHALLENGE&source=coding-agent#session_id=$SESSION_ID
```

The user completes the browser authorization flow. If successful, the API key becomes available through the polling endpoint.

## Step 3: Poll for completion

```http
POST https://www.firecrawl.dev/api/auth/cli/status
Content-Type: application/json

{"session_id":"$SESSION_ID","code_verifier":"$CODE_VERIFIER"}
```

Responses:

- `{"status":"pending"}` - continue polling
- `{"status":"complete","apiKey":"fc-...","teamName":"..."}`

## Step 4: Save the key

```bash
echo "FIRECRAWL_API_KEY=fc-..." >> .env
```
references/project-setup.md
# Project Setup

For hosted Firecrawl, add this to `.env`:

```dotenv
FIRECRAWL_API_KEY=fc-...
```

For self-hosted Firecrawl, add:

```dotenv
FIRECRAWL_API_KEY=fc-...
FIRECRAWL_API_URL=https://your-firecrawl-instance.example.com
```

Project setup guidance:

- Keep the key in environment variables or the platform secret manager.
- Do not hardcode credentials in source files.
- If the app has separate environments, mirror the key setup across development, preview, and production as needed.
references/sdk-installation.md
# SDK Installation

Install the SDK that matches the project stack after `FIRECRAWL_API_KEY` is available.

## JavaScript / TypeScript

```bash
npm install @mendable/firecrawl-js
```

## Python

```bash
pip install firecrawl-py
```

If the project already has a preferred HTTP client abstraction, direct REST calls are also fine.