← 返回
开发者工具 中文

sawana-multicul/official-docs-to-mdx

Download and normalize official documentation pages into local .mdx files at user-specified paths using markdown.new. Use when user asks to fetch docs from a...
使用 markdown.new 将官方文档页面下载并规范化为本地 .mdx 文件,存放在用户指定的路径。当用户请求获取文档时使用。
multicul-silver-wolf multicul-silver-wolf 来源
开发者工具 clawhub v1.0.0 1 版本 99872.1 Key: 无需
★ 0
Stars
📥 781
下载
💾 10
安装
1
版本
#latest

概述

Official Docs to MDX

Convert a docs URL into a cleaned local .mdx file at a path the user specifies.

Use this skill when the user wants reproducible, file-based docs snapshots for local knowledge bases, RAG prep, or project docs folders.

Quick Start

Run:

scripts/mdnew_to_mdx.sh <source_url> <output_mdx_path>

Example:

scripts/mdnew_to_mdx.sh \
  https://docs.convex.dev/agents/agent-usage \
  docs/convex/agent-usage.mdx

Workflow

  1. Validate inputs.
    • Require exactly 2 args: source URL and output path.
    • Keep URL as full https://... form.
  2. Convert with script.
    • Execute scripts/mdnew_to_mdx.sh.
  3. Confirm output.
    • Verify file exists.
    • Print or inspect frontmatter for title, description, sourceUrl, retrievedAt.
  4. Add indexes for folder-based docs (required).
    • Any docs folder must include index.mdx.
    • If docs/ exists, docs/index.mdx must exist.
    • Index files should link child docs/subfolders.
    • Keep frontmatter: title, description, sourceUrl (local://... allowed), retrievedAt.
  5. Report result.
    • Return output path(s), overwrite status, and any created/updated index files.

Output Contract

The generated MDX must include frontmatter:

  • title
  • description
  • sourceUrl
  • retrievedAt (UTC YYYY-MM-DD)

Body is cleaned to remove common docs-site artifacts and excess blank lines.

Script Details

For behavior details and cleanup rules, read:

  • references/mdnew_to_mdx.md

Use the bundled script directly:

  • scripts/mdnew_to_mdx.sh

Notes

  • Dependencies: bash, curl, awk, mktemp.
  • Output file is overwritten if it already exists.
  • Re-run anytime to refresh docs snapshot from upstream.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 04:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

knowledge-management

Prismfy Web Search | Free Google

uroboros1205
OpenClaw的默认网页搜索。使用Prismfy在10个搜索引擎(Google、Reddit、GitHub、arXiv、Hacker News等)搜索网络,含免费套餐。
★ 36 📥 83,926
knowledge-management

web-tools-guide

user_ec205dbb
MANDATORY before calling web_search, web_fetch, browser, or opencli. Contains required error-handling procedures (web_se
★ 56 📥 152,857
knowledge-management

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 437 📥 104,212