{
  "schemaVersion": "1.0",
  "item": {
    "slug": "webfetch-md",
    "name": "Webfetch Md",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ShiJianwen/webfetch-md",
    "canonicalUrl": "https://clawhub.ai/ShiJianwen/webfetch-md",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/webfetch-md",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=webfetch-md",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "_meta.json",
      "cli.js",
      "index.js",
      "package-lock.json",
      "package.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/webfetch-md"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/webfetch-md",
    "agentPageUrl": "https://openagent3.xyz/skills/webfetch-md/agent",
    "manifestUrl": "https://openagent3.xyz/skills/webfetch-md/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/webfetch-md/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "WebFetch MD - 网页转 Markdown",
        "body": "抓取任意网页，转换为干净的 Markdown 格式，保留图片链接。"
      },
      {
        "title": "作为 OpenClaw 工具调用",
        "body": "webfetch-md url=\"https://example.com\""
      },
      {
        "title": "CLI 使用",
        "body": "# 基本使用（输出 JSON 格式）\nnpx webfetch-md https://example.com\n\n# 或使用 --url 参数\nnpx webfetch-md --url https://example.com\n\n# 提取 Markdown 内容（配合 jq）\nnpx webfetch-md https://example.com | jq -r '.markdown'\n\n# 保存到文件\nnpx webfetch-md https://example.com | jq -r '.markdown' > article.md"
      },
      {
        "title": "输出格式",
        "body": "CLI 和工具都输出统一的 JSON 格式：\n\n{\n  \"success\": true,\n  \"title\": \"文章标题\",\n  \"markdown\": \"# 文章标题\\n\\n正文内容...\",\n  \"images\": [\"https://example.com/img1.png\"],\n  \"imageCount\": 1,\n  \"contentLength\": 1523\n}"
      },
      {
        "title": "作为模块使用",
        "body": "const { fetchAsMarkdown } = require('./index');\nconst result = await fetchAsMarkdown('https://example.com');\nconsole.log(result.markdown);"
      },
      {
        "title": "功能特点",
        "body": "✅ 抓取任意网页 HTML\n✅ 智能提取正文内容（过滤导航、广告等）\n✅ 保留图片链接（转换为 ![alt](url) 格式）\n✅ 自动转换相对路径为绝对路径\n✅ 输出干净的 Markdown"
      },
      {
        "title": "依赖",
        "body": "turndown: HTML to Markdown 转换\ncheerio: HTML 解析和提取"
      },
      {
        "title": "核心流程",
        "body": "网页抓取：使用 fetch API 获取 HTML，模拟浏览器 User-Agent\nHTML解析：使用 cheerio 加载和解析 HTML 内容\n内容提取：智能识别正文区域，过滤无关元素\nURL处理：将相对路径转换为绝对路径\nMarkdown转换：使用 turndown 转换为标准 Markdown 格式"
      },
      {
        "title": "智能内容提取算法",
        "body": "按优先级选择正文容器：\n\narticle 标签\nmain 标签\n[role=\"main\"] 属性\n.post-content / .entry-content 类\n.content / .post 类\n#content / #main ID\n回退到 body 标签"
      },
      {
        "title": "自动过滤的元素",
        "body": "脚本和样式标签\n导航、页眉、页脚\n侧边栏和广告区域\n评论区"
      },
      {
        "title": "错误处理",
        "body": "工具返回统一的 JSON 格式，包含 success 字段标识操作状态：\n\n{\n  \"success\": false,\n  \"error\": \"错误信息\"\n}"
      },
      {
        "title": "项目结构",
        "body": "webfetch-md/\n├── index.js          # 核心功能模块\n├── cli.js           # CLI 和 OpenClaw 工具入口\n├── package.json     # 依赖配置\n├── test.js          # 测试脚本\n└── SKILL.md         # 技能文档"
      },
      {
        "title": "测试",
        "body": "# 运行测试\nnpm test\n\n# 或直接测试\nnode test.js https://example.com"
      },
      {
        "title": "版本历史",
        "body": "v1.1.0 (当前): 统一 CLI 和 OpenClaw 工具入口，优化错误处理\nv1.0.1: 基础功能实现，支持网页抓取和 Markdown 转换\nv1.0.0: 初始版本发布"
      }
    ],
    "body": "WebFetch MD - 网页转 Markdown\n\n抓取任意网页，转换为干净的 Markdown 格式，保留图片链接。\n\n使用方法\n作为 OpenClaw 工具调用\nwebfetch-md url=\"https://example.com\"\n\nCLI 使用\n# 基本使用（输出 JSON 格式）\nnpx webfetch-md https://example.com\n\n# 或使用 --url 参数\nnpx webfetch-md --url https://example.com\n\n# 提取 Markdown 内容（配合 jq）\nnpx webfetch-md https://example.com | jq -r '.markdown'\n\n# 保存到文件\nnpx webfetch-md https://example.com | jq -r '.markdown' > article.md\n\n输出格式\n\nCLI 和工具都输出统一的 JSON 格式：\n\n{\n  \"success\": true,\n  \"title\": \"文章标题\",\n  \"markdown\": \"# 文章标题\\n\\n正文内容...\",\n  \"images\": [\"https://example.com/img1.png\"],\n  \"imageCount\": 1,\n  \"contentLength\": 1523\n}\n\n作为模块使用\nconst { fetchAsMarkdown } = require('./index');\nconst result = await fetchAsMarkdown('https://example.com');\nconsole.log(result.markdown);\n\n功能特点\n✅ 抓取任意网页 HTML\n✅ 智能提取正文内容（过滤导航、广告等）\n✅ 保留图片链接（转换为 ![alt](url) 格式）\n✅ 自动转换相对路径为绝对路径\n✅ 输出干净的 Markdown\n依赖\nturndown: HTML to Markdown 转换\ncheerio: HTML 解析和提取\n技术实现\n核心流程\n网页抓取：使用 fetch API 获取 HTML，模拟浏览器 User-Agent\nHTML解析：使用 cheerio 加载和解析 HTML 内容\n内容提取：智能识别正文区域，过滤无关元素\nURL处理：将相对路径转换为绝对路径\nMarkdown转换：使用 turndown 转换为标准 Markdown 格式\n智能内容提取算法\n\n按优先级选择正文容器：\n\narticle 标签\nmain 标签\n[role=\"main\"] 属性\n.post-content / .entry-content 类\n.content / .post 类\n#content / #main ID\n回退到 body 标签\n自动过滤的元素\n脚本和样式标签\n导航、页眉、页脚\n侧边栏和广告区域\n评论区\n错误处理\n\n工具返回统一的 JSON 格式，包含 success 字段标识操作状态：\n\n{\n  \"success\": false,\n  \"error\": \"错误信息\"\n}\n\n开发说明\n项目结构\nwebfetch-md/\n├── index.js          # 核心功能模块\n├── cli.js           # CLI 和 OpenClaw 工具入口\n├── package.json     # 依赖配置\n├── test.js          # 测试脚本\n└── SKILL.md         # 技能文档\n\n测试\n# 运行测试\nnpm test\n\n# 或直接测试\nnode test.js https://example.com\n\n版本历史\nv1.1.0 (当前): 统一 CLI 和 OpenClaw 工具入口，优化错误处理\nv1.0.1: 基础功能实现，支持网页抓取和 Markdown 转换\nv1.0.0: 初始版本发布"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ShiJianwen/webfetch-md",
    "publisherUrl": "https://clawhub.ai/ShiJianwen/webfetch-md",
    "owner": "ShiJianwen",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/webfetch-md",
    "downloadUrl": "https://openagent3.xyz/downloads/webfetch-md",
    "agentUrl": "https://openagent3.xyz/skills/webfetch-md/agent",
    "manifestUrl": "https://openagent3.xyz/skills/webfetch-md/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/webfetch-md/agent.md"
  }
}