crawl4ai

crawl4ai is a skill for Claude Code, Codex from djblack1209-coder/OpenClaw-Bot. It costs 75 tokens per session (675 once invoked), scanned A, original, Apache-2.0.

Ein Werkzeug zum Abrufen und Aufbereiten von Webseiten für KI-Anwendungen. Es kann Webseiten laden, den Inhalt als übersichtliches Markdown ausgeben und ausgewählte Daten in einer strukturierten Form extrahieren.

In plain words
What is it for?
Für Web-Crawling, das Erstellen von Wissenssammlungen für RAG-Systeme und das Extrahieren strukturierter Felder wie Titel, Preise und Links.
Why use it?
Es entfernt einen Teil der Arbeit, Webseiteninhalte für Suche, Wissensdatenbanken oder weitere Verarbeitung aufzubereiten. Auch Seiten mit JavaScript können berücksichtigt werden.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/djblack1209-coder/openclaw-bot/crawl4ai
Any agent
npx skills add djblack1209-coder/OpenClaw-Bot --skill crawl4ai
Clone the repo
git clone --depth 1 https://github.com/djblack1209-coder/OpenClaw-Bot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for crawl4ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/djblack1209-coder/openclaw-bot/crawl4ai.svg)](https://agentmods.dev/skills/djblack1209-coder/openclaw-bot/crawl4ai)
Your own site
<a href="https://agentmods.dev/skills/djblack1209-coder/openclaw-bot/crawl4ai"><img src="https://agentmods.dev/badge/skills/djblack1209-coder/openclaw-bot/crawl4ai.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 675 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.00675
Opus 5 $0.00037 $0.00338
Sonnet 5 $0.00015 $0.00135
Haiku 4.5 $0.00007 $0.00068

Measured 5d ago against content hash 108172dc1ee9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

crawl4ai scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

apps/openclaw/skills/crawl4ai/SKILL.md · 88 lines

What it actually says

Crawl4AI — AI 智能网页爬取

开源 AI 友好爬虫,将网页内容转换为干净的 Markdown/JSON,适合 RAG 和 AI 消费。

Requirements

pip install crawl4ai
crawl4ai-setup  # 安装浏览器(首次)

Quick Usage

基础爬取(转 Markdown)

import asyncio
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig

async def crawl(url):
    async with AsyncWebCrawler() as crawler:
        result = await crawler.arun(url=url, config=CrawlerRunConfig())
        return result.markdown

# asyncio.run(crawl("https://example.com"))

命令行快速爬取

python -c "
import asyncio
from crawl4ai import AsyncWebCrawler, CrawlerRunConfig
async def main():
    async with AsyncWebCrawler() as c:
        r = await c.arun(url='$URL', config=CrawlerRunConfig())
        print(r.markdown[:3000])
asyncio.run(main())
"

结构化数据提取

from crawl4ai import AsyncWebCrawler, CrawlerRunConfig
from crawl4ai.extraction_strategy import JsonCssExtractionStrategy
import json

schema = {
    "name": "Products",
    "baseSelector": ".product-card",
    "fields": [
        {"name": "title", "selector": "h2", "type": "text"},
        {"name": "price", "selector": ".price", "type": "text"},
        {"name": "link", "selector": "a", "type": "attribute", "attribute": "href"},
    ]
}

async def extract(url):
    strategy = JsonCssExtractionStrategy(schema)
    config = CrawlerRunConfig(extraction_strategy=strategy)
    async with AsyncWebCrawler() as crawler:
        result = await crawler.arun(url=url, config=config)
        return json.loads(result.extracted_content)

Use Cases

场景 方法
网页转 Markdown 基础爬取,直接用 result.markdown
提取商品/文章列表 JsonCssExtractionStrategy + CSS 选择器
JS 渲染页面 默认支持,自动等待页面加载
批量爬取 循环 URL 列表,注意限速
RAG 数据源 爬取后切分存入向量数据库

Notes

  • 默认使用 headless 浏览器,支持 JS 渲染
  • 自动转换为 AI 友好的 Markdown 格式
  • 比 requests + BeautifulSoup 更适合现代网页
  • 注意遵守目标网站的 robots.txt 和使用条款
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 88 lines · 75 tokens per session scan A 108172dc1ee9

Subscribe to this mod's changes

crawl4ai is a skill published in the GitHub repository djblack1209-coder/OpenClaw-Bot (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 75 tokens to every session and 675 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…

davila7/claude-code-templates · 79 tokens

inspector-workbench

Runs Inspector UI work on the standalone Threads state lab so the agent can see the overlay. Use when a CopilotKit employee asks an agent to fix, polish, add, or debug Inspector UI, chrome, panes, overlay actions, launcher, Home, Threads, Playground, Memory, or any visual behavior in @copilotkit/web-inspector. Don't…

CopilotKit/CopilotKit · 112 tokens

memory-cleanup

Audits all memory systems in a Perseus environment, identifies stale or superseded stores (Mem0, Mempalace, old vector DBs, garbled federation artifacts), and deletes them. Keeps Perseus Vault (the live system) as the single source of truth. Run periodically or when upgrading Perseus versions.

Perseus-Computing-LLC/perseus · 69 tokens

mcp-builder

DEPRECATED: This skill has been replaced by mcp-app-builder. Check if mcp-app-builder is available in the skills folder. If not, install it: npx skills install mcp-use/mcp-use --skill mcp-app-builder Use mcp-app-builder instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when…

CopilotKit/CopilotKit · 123 tokens

Platos RAG

Ingest documents into the agent's long-term memory, then retrieve chunks semantically at turn-time. Five tools — ingest, retrieve, list, reindex, delete. Chunks are stored on the user's PlatosMemory rows with kind="rag" in metadata, so scope + user isolation comes for free.

winsenlabs/platos · 70 tokens

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…

OpenLAIR/dr-claw · 79 tokens