Setup

Requirements, wiring steps, and what this pattern adds to your project.

Requirements

Complexity
Beginner
Setup time
~5 minutes

Capabilities

External services

cloudflare

Getting started

Install and export live in the preview toolbar — this section covers what lands in your project and how to wire it up.

  1. 1

    Install from the preview toolbar

    Shadcn Icon

    Use the install command above — Pro patterns include a short-lived token.

  2. 2

    Customize the agent and tool files

    Use Copy for AI in the toolbar, then adapt prompts, tools, and stop conditions.

  3. 3

    Run your dev server and test the live preview

Files added

  • app/page.tsx
  • app/layout.tsx
  • README.md

Dependencies

Shadcn IconRegistry components

alertbadgebuttoncardinputscroll-areaskeletontabstooltip

Files to customize

  • lib/scraper.ts

    Core scraping engine using Cloudflare markdown.new: fetches via https://markdown.new/<url>, parses response to extract title, URL source, and markdown content.

  • lib/actions.ts

    Server action entry point: URL validation with Zod, rate limiting, and orchestration of the markdown.new scraping pipeline.