url2markdown

URL to Markdown: converts any webpage URL into a Markdown document that includes images, for saving webpages as Markdown or converting a URL into readable text.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "url2markdown" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-02842d67192cd08e31f7b90cccfeba92c33525406647b522055d0d2ebefe349e. Verify the upstream source and version against https://skillhub.cn/skills/user_6c29a21a/url2markdown before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

URL to Markdown: converts any webpage URL into a Markdown document that includes images, for saving webpages as Markdown or converting a URL into readable text.

0 Downloads

Introduction source: third_party · user_6c29a21a · 1.0.1 Reference

SkillPi interpretation

Tasks
Converts any webpage URL to a Markdown document with images. Invoke when user wants to save a webpage as Markdown or convert a URL to readable text.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "url2markdown"
description: "Converts any webpage URL to a Markdown document with images. Invoke when user wants to save a webpage as Markdown or convert a URL to readable text."

URL2Markdown — 网页转Markdown转换器

Overview | 概述

Converts any webpage URL into a clean, readable Markdown document with all images saved locally. 将任何网页URL转换为干净、易读的Markdown文档,所有图片会保存到本地。

Features | 功能:

  • Extracts main content and removes noise (ads, navigation, etc.) | 提取主要内容,去除噪音(广告、导航等)
  • Preserves document structure (headings, paragraphs, lists, code blocks, tables, blockquotes) | 保留文档结构(标题、段落、列表、代码块、表格、引用)
  • Downloads all images and embeds them as relative paths | 下载所有图片并保存为相对路径引用
  • Extracts metadata (title, description, author, date) and saves as YAML frontmatter | 提取元数据(标题、描述、作者、日期)并保存为YAML frontmatter
  • Handles srcset for high-resolution images | 处理srcset以获取高分辨率图片
  • Auto-generates timestamped filenames | 自动生成带时间戳的文件名

Usage | 使用方法

Invoke | 调用

python url2markdown.py <url> [output_directory]

Examples | 示例

Basic usage | 基本用法:

python url2markdown.py https://www.0xkato.xyz/how-llms-actually-work

With custom output directory | 自定义输出目录:

python url2markdown.py https://www.0xkato.xyz/how-llms-actually-work ./my_articles

Without https:// prefix | 不带https://前缀:

python url2markdown.py www.example.com/my-article

Output | 输出

The script generates a directory structure like this:

output/
├── how-llms-actually-work_20260615_143022.md
└── images/
    ├── img_000.png
    ├── img_001.jpg
    └── img_002.webp

The Markdown file includes:

  • YAML frontmatter with metadata | 带元数据的YAML frontmatter
  • Clean Markdown content | 干净的Markdown内容
  • Image references as relative paths | 图片引用为相对路径
  • Footer with source URL and generation info | 包含来源URL和生成信息的页脚

Metadata in Frontmatter | Frontmatter中的元数据

---
title: "Page Title | 页面标题"
url: "https://example.com/page"
date: "2026-06-15 14:30:22"
description: "Page description | 页面描述"
author: "Author Name | 作者"
published: "2026-01-15T10:00:00Z"
---

Dependencies | 依赖

  • Python 3.6+
  • requests — HTTP requests
  • beautifulsoup4 — HTML parsing

Auto-installs on first run if missing. 首次运行时会自动安装所需依赖。

How It Works | 工作原理

  1. Fetch the webpage with a browser-like User-Agent | 使用浏览器User-Agent获取网页
  2. Parse the HTML and extract metadata (title, description, author, dates) | 解析HTML并提取元数据
  3. Locate main content area (main, article, or content div) | 定位主内容区域(main、article或content div)
  4. Extract all images, handling srcset for higher resolution | 提取所有图片,处理srcset以获取更高分辨率
  5. Download images to local images/ directory | 下载图片到本地images目录
  6. Convert content to Markdown, preserving structure | 将内容转换为Markdown,保留结构
  7. Generate the final Markdown file with frontmatter and footer | 生成包含frontmatter和页脚的最终Markdown文件

Supported HTML Elements | 支持的HTML元素

Element Markdown 说明
<h1>-<h6> #-###### 标题
<p> (text) 段落
<ul>, <ol> - item, 1. item 列表
<pre><code> python ... 代码块
<blockquote> > text 引用
<table> col1 \| col2 表格
<img> ![alt](path) 图片
<hr> --- 分隔线
<a> (text) 链接(保留文字,去除链接)

Tips | 技巧

  • For JavaScript-rendered pages (SPA/React/Vue), content may be incomplete. Use browser dev tools to get the API response or use a headless browser alternative. | 对于JavaScript渲染的页面(SPA/React/Vue),内容可能不完整。使用浏览器开发者工具获取API响应或使用无头浏览器替代方案。
  • Images from CDNs are downloaded and saved locally with sequential numbering. | 来自CDN的图片会被下载并保存到本地,按顺序编号。
  • Large pages with many images may take longer. The script handles errors gracefully and continues. | 图片较多的长页面可能需要更长时间。脚本会优雅地处理错误并继续执行。
  • Default output directory is ./output. You can change it by providing a second argument. | 默认输出目录为./output,可以通过提供第二个参数来更改。

Error Handling | 错误处理

  • Network errors: prints error and exits | 网络错误:打印错误并退出
  • Missing images: prints warning and continues | 缺失图片:打印警告并继续
  • Invalid URLs: auto-adds https:// prefix | 无效URL:自动添加https://前缀
  • Failed downloads: skips the image, continues processing | 下载失败:跳过该图片,继续处理

Current listing version

1.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决网页内容保存与离线阅读的高频刚需,功能闭环完整
  • 支持图片本地保存、元数据提取、结构保留,实用性强
Trigger Precision90/100

Highlights

  • 触发描述清晰,覆盖多种 URL 格式变体,边界明确
Structure and Standards95/100

Highlights

  • 文档结构完整,包含工作原理、示例、错误处理等关键章节
  • frontmatter 规范,示例详实,排版清晰
Execution Reliability90/100

Highlights

  • 依赖管理完善,支持自动安装
  • 错误处理覆盖网络、图片、URL 等常见异常场景
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • example.com
  • www.0xkato.xyz

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.