CLI workflow

Scrape a Website Safely with a CLI

Define a small URL scope, choose extraction or browser automation, and preserve each source URL with the result.

HTTP and webhooksLocal write

Prepare tools, authentication, and evidence first

Install the recommended tools, confirm minimum permissions, and keep compatibility separate from real execution records.

firecrawldocs-verified
Scrape or crawl web pages into Markdown and JSON for downstream agent analysis.

Recommended install

$ shell
npx firecrawl --help
Authentication
API key
Tested agents
No agent-specific execution record
Evidence status
docs-verified · Documentation checked 2026-07-10
Independent CLI execution
No independently executed version recorded
playwrightdocs-verified
Run browser tests, capture screenshots and traces, and automate evidence-backed UI workflows.

Recommended install

$ shell
npm install --save-dev @playwright/test
Authentication
No authentication for the base operation
Tested agents
No agent-specific execution record
Evidence status
docs-verified · Documentation checked 2026-07-10
Independent CLI execution
No independently executed version recorded

Copy or download this workflow Skill

The Skill includes input and output contracts, recommended tools, approval points, rollback, and evidence boundaries. Review it against the active environment before saving.

scrape-website-SKILL.md
---
name: scrape-website-workflow
description: "Define a small URL scope, choose extraction or browser automation, and preserve each source URL with the result."
---

# Extract content from a website

## Intended outcome

Collect the specific public content needed for a task without uncontrolled crawling or hidden interaction.

## Evidence boundary

- Tool status distinguishes `docs-verified` material from independent execution; the two are not interchangeable.
- The current registry does not attribute a tool execution to a particular agent, so compatible agents cannot be called tested agents.
- Reconfirm the target account, environment, version, and official documentation before execution.
- Never auto-execute an R2, R3, or confirmation-marked step; obtain explicit approval immediately before it runs.

## Recommended tools, installation, and authentication

- **Firecrawl CLI** (evidence: `docs-verified`, docs checked: `2026-07-10`, no independently executed version recorded)
  - Install: `npx firecrawl --help`
  - Authentication: API key
  - Minimum permissions: Use a dedicated key with quota limits and crawl only authorized targets.
- **Playwright** (evidence: `docs-verified`, docs checked: `2026-07-10`, no independently executed version recorded)
  - Install: `npm install --save-dev @playwright/test`
  - Authentication: not required for the base operation
  - Minimum permissions: No service credential is required; restrict filesystem and network access to the task.

## Input contract

- Allowed URLs
- required fields or page state
- crawl and rate limits
- site access constraints

## Output contract

- Extracted text or structured fields
- source URL ledger
- failure list
- screenshots or traces when needed

## Safe workflow

1. **Set the boundary** — List allowed hosts and URLs, excluded areas, maximum pages, and expected output.
   - Input: Research question and site scope
   - Output: Bounded collection plan
   - Risk: `read-only`
2. **Choose the interface** — Use extraction for readable content; use Playwright only when rendering or interaction is necessary.
   - Input: Page behavior and output need
   - Output: Selected tool and collection commands
   - Risk: `read-only`
3. **Collect and cite** — Pace requests, save source URLs and timestamps, and report blocked or incomplete pages.
   - Input: Approved plan
   - Output: Content packet with provenance
   - Risk: `local-write`

## Ask before proceeding

- Logging in, accepting terms, submitting a form, or changing remote state
- Expanding beyond the agreed host or page count
- Collecting personal, restricted, or paywalled information

## Rollback

- Stop the collection immediately when scope changes
- Delete local captures that should not have been collected
- Do not attempt to undo remote side effects through more automation

## Official sources

- [Firecrawl documentation](https://docs.firecrawl.dev/) — Official extraction and crawl API documentation, formats, and usage boundaries.
- [Playwright documentation](https://playwright.dev/docs/intro) — Official browser automation, test runner, trace, and screenshot documentation.

Outcome, inputs, and outputs

Define the result and evidence before the agent selects a command.

Goal

Collect the specific public content needed for a task without uncontrolled crawling or hidden interaction.

Required inputs

  • Allowed URLs
  • required fields or page state
  • crawl and rate limits
  • site access constraints

Expected outputs

  • Extracted text or structured fields
  • source URL ledger
  • failure list
  • screenshots or traces when needed

Scrape a Website Safely with a CLI: safe workflow

Run each step inside its stated boundary and verify the output before continuing.

Step 1Read only

Set the boundary

List allowed hosts and URLs, excluded areas, maximum pages, and expected output.
Input
Research question and site scope
Output
Bounded collection plan
Step 2Read only

Choose the interface

Use extraction for readable content; use Playwright only when rendering or interaction is necessary.
Input
Page behavior and output need
Output
Selected tool and collection commands
Step 3Local write

Collect and cite

Pace requests, save source URLs and timestamps, and report blocked or incomplete pages.
Input
Approved plan
Output
Content packet with provenance

Approval points and rollback

Pause at the listed decision points and keep recovery instructions beside the action.

Ask before these actions

  • Logging in, accepting terms, submitting a form, or changing remote state
  • Expanding beyond the agreed host or page count
  • Collecting personal, restricted, or paywalled information

Recovery plan

  • Stop the collection immediately when scope changes
  • Delete local captures that should not have been collected
  • Do not attempt to undo remote side effects through more automation

CLI, MCP, or API?

Choose the interface by execution location, identity, output contract, and permission boundary.

CLI

Good for repeatable extraction jobs and Playwright test flows in local or CI environments.

MCP

Useful for supervised interactive browsing with a constrained tool surface.

API

Best for managed extraction at scale with documented limits and billing.

Recommended approach

Use extraction-first for content and browser automation only for necessary dynamic behavior.

Official evidence and references

Use these primary or upstream sources to verify current command behavior before acting.

Firecrawl documentation

Official extraction and crawl API documentation, formats, and usage boundaries.

Playwright documentation

Official browser automation, test runner, trace, and screenshot documentation.

Questions before you run it

Is every public page safe to scrape?

No. Respect access controls, site terms, robots guidance where applicable, privacy, copyright, and the user’s authorized scope.

When is Playwright necessary?

Use it for rendering, user-interface states, screenshots, or repeatable interactions that plain extraction cannot provide.

Related tools and guides

Browse sibling guides and choose the next page that best matches the active task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Continue with tool evidence, a workflow, or a decision guide related to this task.