Skip to content

参考

基于 firecrawl/firecrawl-claude-plugin README 与 skills/ 编写。

速查

  • 装 plugin:Claude Code 里 /pluginfirecrawl
  • 装 CLInpm install -g firecrawl-cli
  • 认证firecrawl login --browser / firecrawl login --api-key "fc-..." / export FIRECRAWL_API_KEY=fc-...
  • 验证firecrawl --status(看 Concurrency、Credits)
  • 10 skill:cli / search / scrape / map / crawl / agent / parse / download / interact / monitor
  • 许可:AGPL-3.0
  • 关键源firecrawl/firecrawl-claude-plugin(plugin/skill) · firecrawl/cli(CLI 二进制) · firecrawl/firecrawl(服务端)

10 Skill 清单

Skill命令一句话关键选项
firecrawl-cli总入口、工作流编排、信用管理firecrawl --status / credit-usage
firecrawl-searchfirecrawl searchWeb 搜索,可选抓全文--limit --sources web,news,images --categories github,research,pdf --tbs qdr:d --scrape --json
firecrawl-scrapefirecrawl scrape取单 URL 内容(含 JS)-f markdown,links,screenshot,html,json -Q --only-main-content --wait-for --include-tags/--exclude-tags --redact-pii
firecrawl-mapfirecrawl map站内 URL 发现--limit --search --sitemap include|skip|only --include-subdomains --json
firecrawl-crawlfirecrawl crawl批量爬站段--wait --progress --limit --max-depth --include-paths --exclude-paths --delay --max-concurrency
firecrawl-agentfirecrawl agentAI 抽 JSON(2–5 分钟)--urls --model spark-1-mini|spark-1-pro --schema --schema-file --max-credits --wait
firecrawl-parsefirecrawl parse本地文件转 markdown-S -Q -f markdown|html|summary --timeout --timing
firecrawl-downloadfirecrawl download整站存本地(实验)--screenshot --format --limit --include-paths --exclude-paths --only-main-content -y
firecrawl-interactfirecrawl interact浏览器会话交互--prompt --code --language bash|python|node --timeout --scrape-id
firecrawl-monitorfirecrawl monitor定时巡检 + 告警create|list|get|update|delete|run|checks|check--page --scrape-urls --crawl-url --queries --goal --schedule --cron --email --webhook-url --webhook-events --state

CLI 命令一览

bash
# 全局
firecrawl --status               # 看认证/并发/credits
firecrawl --help                 # 顶层帮助
firecrawl <command> --help       # 子命令帮助
firecrawl credit-usage           # 查信用余额
firecrawl login --browser        # OAuth 登录
firecrawl login --api-key "fc-..."  # API key 登录

# 10 大子命令
firecrawl search "<query>" [opts]
firecrawl scrape "<url>" [url...] [opts]
firecrawl map "<url>" [opts]
firecrawl crawl "<url>" [opts]
firecrawl agent "<prompt>" [opts]
firecrawl parse <file> [opts]
firecrawl download <url> [opts]
firecrawl interact --prompt "..." | --code "..."
firecrawl monitor <subcommand> [opts]
firecrawl feedback <endpoint> <jobId>      # 端点级反馈
firecrawl search-feedback <searchId>       # search 反馈(退 1 credit)

环境变量

变量必需说明
FIRECRAWL_API_KEY是(未 firecrawl login 时)API key,可从 firecrawl.dev/app/api-keys 免费申请
FIRECRAWL_API_URL自托管 API 端点
FIRECRAWL_NO_SEARCH_FEEDBACK1 跳过所有 search 反馈调用
FIRECRAWL_NO_ENDPOINT_FEEDBACK1 跳过所有端点反馈调用

输出落盘约定

text
.firecrawl/
├── search-{query}.json           # search 结果
├── search-{query}-scraped.json   # search --scrape 结果
├── {site}-{path}.md              # scrape 单页
├── crawl.json                    # crawl 批量
├── pricing.json                  # agent 抽取
└── credits.json                  # credit-usage
  • 总用 -o 写入文件,避免上下文膨胀
  • .firecrawl/.gitignore
  • 总给 URL 加引号——shell 会解析 ?&
  • 单格式输出原始内容;多格式(如 markdown,links)输出 JSON
  • 大文件用 wc -l + head -50 + grep/jq 增量读

安装命令(完整)

bash
# 1. Claude Code Plugin
# 在 Claude Code 里运行 /plugin,搜 firecrawl,选装

# 2. CLI
npm install -g firecrawl-cli

# 3. 认证(任选)
firecrawl login --browser
firecrawl login --api-key "fc-YOUR-API-KEY"
export FIRECRAWL_API_KEY=fc-YOUR-API-KEY

# 4. 验证
firecrawl --status

# 5. 冒烟
mkdir -p .firecrawl
firecrawl scrape "https://firecrawl.dev" -o .firecrawl/install-check.md

目录结构

text
firecrawl-claude-plugin/
├── README.md
├── commands/
│   └── skill-gen.md
└── skills/
    ├── firecrawl-cli/SKILL.md         # 总入口
    ├── firecrawl-search/SKILL.md      # Web 搜索
    ├── firecrawl-scrape/SKILL.md      # 单页抓取
    ├── firecrawl-map/SKILL.md         # URL 发现
    ├── firecrawl-crawl/SKILL.md       # 批量爬取
    ├── firecrawl-agent/SKILL.md       # AI 结构化抽取
    ├── firecrawl-parse/SKILL.md       # 本地文件解析
    ├── firecrawl-download/SKILL.md    # 整站下载
    ├── firecrawl-interact/SKILL.md    # 浏览器交互
    └── firecrawl-monitor/SKILL.md     # 变化监控

每个 skill:SKILL.md(frontmatter name / description / allowed-tools,agent 据此触发)。

工作流对照(cli SKILL.md)

需求命令何时
找某主题的页面search没具体 URL
取某 URL 内容scrape有 URL
找站内子页map在大站点里定位
批量站段crawl要多页(如全部 /docs)
AI 结构化抽取agent复杂多页站点
页面交互scrape + interact需点击/表单/登录/翻页
整站存本地download离线参考
解析本地文件parsePDF/DOCX/XLSX/HTML 在磁盘
监控变化monitor持续观察

scrape vs crawl vs search vs map vs parse

命令输入输出适用
search查询词URL 列表 + 全文(可选)找资料源
scrapeURL单页 markdown已知 URL
map站点根 URLURL 列表找站内子页
crawl站点根 URL多页 markdown整段文档
parse本地文件路径markdownPDF/DOCX 在磁盘(不是 URL)

资源链接