gusibi/skills · Archived

markdown-proxy

Fetch any URL as clean Markdown via proxy services (r.jina.ai / defuddle.md) or built-in scripts. Works with login-required pages like X/Twitter, WeChat ? Use this BEFORE agent-fetch, defuddle CLI, or WebFetch when the URL might need authentication or when you want the cleanest markdown output. Triggers on any URL the user shares, "fetch this", "read this link", "get content from". Supports X/Twitter posts, WeChat ?

First seen Jun 4, 2026

Installation

$ npx skills add gusibi/skills --skill markdown-proxy

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from gusibi/skills.

npx skills add gusibi/skills

Browse all from gusibi/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 6,702 B
  • docs SUMMARY.md 549 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Markdown Proxy - URL to Markdown

将任意 URL 转为干净的 Markdown。支持需要登录的页面和专有平台。

URL 路由规则(先判断再执行)

收到 URL 后,先判断类型,不同类型走不同通道:

URL 特征 路由到 原因
mp.weixin.qq.com 内置 scripts/fetch_weixin.py 公众号有反爬,需 Playwright 抓取
feishu.cn / larksuite.com(文档/知识库) 内置 scripts/fetch_feishu.py 需要飞书 API 认证
youtube.com / youtu.be yt-search-download skill YouTube 有专用工具链
其他所有 URL 代理服务级联(见下方)

代理服务优先级

优先级 服务 URL 模式 优势
1 r.jina.ai https://r.jina.ai/{url} 内容更完整,保留图片链接,覆盖面广
2 defuddle.md https://defuddle.md/{url} 输出更干净,带 YAML frontmatter
3 agent-fetch npx agent-fetch 本地工具,无需网络代理
4 defuddle CLI defuddle parse 本地 CLI,适合普通网页

Workflow

Step 0: URL 类型判断

if URL contains "mp.weixin.qq.com":
    → Step A: 公众号抓取
    → 结束

if URL contains "feishu.cn/docx/" or "feishu.cn/wiki/" or "feishu.cn/docs/" or "larksuite.com/docx/":
    → Step B: 飞书文档抓取
    → 结束

if URL contains "youtube.com" or "youtu.be":
    → 调用 yt-search-download skill
    → 结束

else:
    → 继续 Step 1

Step A: 公众号文章抓取(内置)

python3 scripts/fetch_weixin.py "WEIXIN_URL"

依赖:playwrightbeautifulsoup4lxml 输出:YAML frontmatter(title, author, date, url)+ Markdown 正文 失败时回退到 Step 1-2 代理服务。

Step B: 飞书文档抓取(内置)

python3 scripts/fetch_feishu.py "FEISHU_URL"

依赖:requests(标准库级别),环境变量 FEISHUAPPID + FEISHUAPPSECRET 支持:docx 文档、doc 文档、wiki 知识库页面(自动解析实际文档 ID) 输出:YAML frontmatter(title, document_id, url)+ Markdown 正文 支持 --json 参数输出 JSON 格式。

Step 1: 优先用 r.jina.ai

curl -sL "https://r.jina.ai/{original_url}" 2>/dev/null

如果返回非空且包含实际内容,使用此结果。

Step 2: 如果 Jina 失败,用 defuddle.md

curl -sL "https://defuddle.md/{original_url}" 2>/dev/null

Step 3: 如果两个代理都失败,回退本地工具

# agent-fetch: https://github.com/teng-lin/agent-fetch
npx agent-fetch "{original_url}" --json
# 或
defuddle parse "{original_url}" -m -j

Step 4: 展示内容(必做)

抓取成功后,必须按以下格式向用户展示:

**标题**: {title}
**作者**: {author}(如有)
**来源**: {source_type}(公众号 / 飞书文档 / 网页等)
**URL**: {original_url}

### 内容摘要
{前 3-5 句话的摘要}

### 正文
{完整 Markdown 内容,超长时截取前 200 行并注明"内容已截取,完整版已保存到 xxx"}

Step 5: 保存文件(本地 + Obsidian 默认双重保存)

将抓取的 Markdown 内容保存到本地,并默认同步到 Obsidian 库中极其重要:即使只有“抓取”、“保存为 Markdown”等表述(未提 Obsidian),也必须同时执行保存到本地和 Obsidian 两个操作。

1. 保存到本地(必须执行)

  • 默认路径~/Downloads/{title}.md
  • 文件名:用文章标题,去掉特殊字符。
  • 如果用户指定了其他保存路径,按用户要求。

2. 同步到 Obsidian(默认执行,不可省略)

使用 obsidian-cli skill 将笔记保存到 Obsidian 库中。这是默认必须要做的!

执行命令示例

# 默认保存到 Inbox 文件夹(如果存在)或根目录
obsidian create name="{title}" content="{完整 Markdown 内容}" silent
  • 路径控制:可以根据内容类型保存到不同文件夹,例如 obsidian create path="Articles/{title}.md" content="..."
  • 元数据:确保 Markdown 内容中包含 YAML frontmatter,方便 Obsidian 索引。
  • 静默执行:建议使用 silent 参数避免弹窗干扰,除非用户需要立即查看。

3. 执行反馈

保存完成后,必须告知用户:

  • 本地保存路径。
  • Obsidian 保存状态(已创建新笔记或更新成功)。
  • 如果保存失败,说明原因。

跳过规则

  • 只有在用户明确且具体地表示“不要保存到 Obsidian”或“只预览不保存”时,才可跳过对应的保存步骤!

Step 6: 联合使用示例 (Combo Flow)

当用户发起抓取请求时(无论是否显式提及 Obsidian),按照以下流程一气呵成:

  1. 抓取:使用脚本或代理获取内容。
  2. 本地保存~/Downloads/{title}.md
  3. 同步 Obsidian

``bash obsidian create name="{title}" content="{markdown_content}" silent ``

示例回复

"内容已抓取。已保存至本地 ~/Downloads/xxx.md 并同步到 Obsidian Inbox/xxx.md。"

Examples

X/Twitter 帖子

curl -sL "https://r.jina.ai/https://x.com/username/status/1234567890"

普通网页

curl -sL "https://r.jina.ai/https://example.com/article"

公众号文章

python3 scripts/fetch_weixin.py "https://mp.weixin.qq.com/s/abc123"

飞书文档

python3 scripts/fetch_feishu.py "https://xxx.feishu.cn/docx/xxxxxxxx"

飞书知识库

python3 scripts/fetch_feishu.py "https://xxx.feishu.cn/wiki/xxxxxxxx"

Notes

  • r.jina.ai 和 defuddle.md 均免费、无需 API key
  • 公众号文章使用内置 Playwright 脚本(需 playwright install chromium
  • 飞书文档使用内置 API 脚本(需环境变量 FEISHUAPPID + FEISHUAPPSECRET
  • 飞书脚本自动将 blocks 转为 Markdown(标题、列表、代码块、引用、待办等)
  • 对于超长内容,可用 | head -n 200 先预览