微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Claw Web Fetch

Claw Web Fetch · v0.1.7
安全 unknown 级 作者 ernestyu 公开目录收录
1k 下载 0 安装 4.4k 收藏 1 浏览

简介

Claw Web Fetch

原始描述

Thin OpenClaw and ClawHub wrapper for the published clawfetch npm CLI, used to fetch web pages, GitHub READMEs, and Reddit threads as markdown.

通过你的 Agent 添加

安装目录:clawfetch/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/claw-web-fetch/
Codex CLI~/.codex/skills/claw-web-fetch/
DeepSeek Harness~/.agents/skills/claw-web-fetch/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: clawfetch description: Web page → Markdown scraper skill that wraps the clawfetch Node CLI to fetch articles, GitHub READMEs, and Reddit threads into normalized markdown with metadata for OpenClaw agents. version: 0.1.7 metadata: {"openclaw":{"homepage":"https://github.com/ernestyu/clawfetch","tags":["web","scraper","markdown","cli"],"requires":{"bins":["node","npm"],"env":[]},"install":[{"id":"clawfetch_npm","kind":"shell","label":"Install clawfetch npm package locally into this skill directory","script":"set -e && cd {baseDir} && bash bootstrap_deps.sh"}]}}}

clawfetch (OpenClaw Skill)

Use the published clawfetch npm CLI to convert a single web page into normalized markdown with a small metadata header.

This skill is a thin wrapper around the public clawfetch package:

  • It does not vendor the clawfetch source code.
  • It does not perform any hidden git clones.
  • It only installs the clawfetch npm package in this skill directory via a separate, explicit bootstrap step.

Typical use cases for agents:

  • Fetch a WeChat / blog / docs article into markdown for later indexing.
  • Fetch a GitHub repository README (raw) and store it into a knowledge base.
  • Fetch a Reddit thread as a structured "post + comments" markdown document.

The CLI emits a header like:

--- METADATA ---
Title: ...
Author: ...
Site: ...
FinalURL: ...
Extraction: readability|fallback-container|body-innerText|github-raw-fast-path|reddit-rss
FallbackSelector: ...   # only when not readability
--- MARKDOWN ---
<markdown>

Installation (skill-level)

This skill assumes:

  • node / npm are available in the OpenClaw container.
  • Network access to npm to install the clawfetch package and its dependencies.

1. Install the skill into your workspace

Use the OpenClaw CLI to pull the skill from ClawHub into your active workspace:

openclaw skills install clawfetch

This creates a directory similar to:

~/.openclaw/workspace/skills/clawfetch

At this point only the skill wrapper files exist (SKILL.md, README, manifest, bootstrap_deps.sh, etc.). The actual npm package with the scraper logic is not installed yet.

2. Bootstrap the npm CLI once (required)

From the skill directory, run the bootstrap script to install the npm package locally:

cd ~/.openclaw/workspace/skills/clawfetch
bash bootstrap_deps.sh

This script is small and reviewable; it only calls:

npm install clawfetch@0.1.7

Key points:

  • OpenClaw's skills install does not currently auto-run this bootstrap step. Agents or humans must call bootstrap_deps.sh explicitly.
  • The install happens inside the skill directory. No global npm state is modified.

After this completes, the CLI entrypoint is available at:

~/.openclaw/workspace/skills/clawfetch/node_modules/clawfetch/clawfetch.js

Runtime usage (for agents)

After the bootstrap step, agents can invoke the CLI from this directory as:

node node_modules/clawfetch/clawfetch.js <url> [--max-comments N] [--no-reddit-rss]

Recommended patterns:

  • General articles / docs
    • Use the default mode, which launches headless Chromium via Playwright, then uses Readability + Turndown to extract the main article body.
  • GitHub repositories
    • Pass the repository URL (e.g. https://github.com/owner/repo).
    • clawfetch will attempt a raw README fast-path from raw.githubusercontent.com before falling back to browser mode.
  • Reddit threads
    • Pass the thread URL (e.g. https://www.reddit.com/r/.../comments/.../).
    • By default, clawfetch will:
      • Convert the URL to .rss and fetch the Atom feed using a normal desktop browser User-Agent.
      • Render the first entry as the main post (## Post: ...).
      • Render subsequent entries as comments (### Comment by ...), limited by --max-comments (default 50; 0 means no limit).
    • Use --no-reddit-rss to force browser scraping instead of RSS.

Safety / non-suspicious behaviour

  • This skill does not:
    • Clone any git repositories at runtime.
    • Download arbitrary source trees into the skill directory.
    • Run hidden package managers beyond the explicit npm install in the bootstrap step.
  • All heavy work (Playwright, Readability, Turndown) comes from the published clawfetch package and its declared npm dependencies.

Agents should treat this skill as a read-mostly web → markdown tool and avoid using it for arbitrary scripting or filesystem operations beyond its intended CLI interface.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill