agentleFS
press-passpress-pass/journalism-skills/skills/web-fetch-cloudflare-circumvent/SKILL.md

web-fetch-cloudflare-circumvent

Skill2 starsChanged 7 months agoMITView on GitHub

Fetch web content that may be blocked by Cloudflare. Cascades through WebFetch, curl, and Playwright until one succeeds.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow this cascade to fetch the content, stopping as soon as one method succeeds:

    line 7
  2. Distinctive:

    Use the WebFetch tool with the provided URL and prompt.

    line 11
  3. Distinctive:

    If WebFetch returns a 403, 503, or any error suggesting the request was blocked, proceed to Step 2.

    line 13
  4. Very specific:

    Run curl -s <URL> via the Bash tool.

    line 17
  5. Distinctive:

    If you get valid HTML content, process it according to the prompt and return the result.

    line 18
  6. Distinctive:

    If you get a 403, a Cloudflare challenge page (look for "Just a moment..." or "Checking your browser"), or an empty response, proceed to …

    line 19
  7. Distinctive:

    Use the Playwright MCP tools to load the page in a real browser:

    line 23
  8. Very specific:

    Call browser_navigate with the URL.

    line 24
  9. Very specific:

    Call browser_snapshot to capture the page content.

    line 25
  10. Distinctive:

    After successfully fetching the content, apply the user's prompt to the content and return the result.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You will be given a URL and an optional prompt describing what to extract from the page.

Follow this cascade to fetch the content, stopping as soon as one method succeeds:

Step 1: Try WebFetch

Use the WebFetch tool with the provided URL and prompt. If it succeeds, return the result.

If WebFetch returns a 403, 503, or any error suggesting the request was blocked, proceed to Step 2.

Step 2: Try curl

Run curl -s <URL> via the Bash tool. Inspect the response:

  • If you get valid HTML content, process it according to the prompt and return the result.
  • If you get a 403, a Cloudflare challenge page (look for "Just a moment..." or "Checking your browser"), or an empty response, proceed to Step 3.

Step 3: Try Playwright

Use the Playwright MCP tools to load the page in a real browser:

  1. Call browser_navigate with the URL.
  2. Call browser_snapshot to capture the page content.
  3. Process the snapshot according to the prompt and return the result.

Output

After successfully fetching the content, apply the user's prompt to the content and return the result. If all three methods fail, report which methods were tried and what errors occurred.

URL and prompt: $ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.