SkillHub

sawana-multicul-official-docs-to-mdx

v1.0.0

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 URL, archive official docs locally, sync docs snapshots, or convert docs pages into clean MDX with frontmatter (title, description, sourceUrl,...

Sourced from ClawHub, Authored by multicul-silver-wolf

Installation

Please help me install the skill `sawana-multicul-official-docs-to-mdx` from SkillHub official store. npx skills add multicul-silver-wolf/sawana-multicul-official-docs-to-mdx

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.
  2. Require exactly 2 args: source URL and output path.
  3. Keep URL as full https://... form.
  4. Convert with script.
  5. Execute scripts/mdnew_to_mdx.sh.
  6. Confirm output.
  7. Verify file exists.
  8. Print or inspect frontmatter for title, description, sourceUrl, retrievedAt.
  9. Add indexes for folder-based docs (required).
  10. Any docs folder must include index.mdx.
  11. If docs/ exists, docs/index.mdx must exist.
  12. Index files should link child docs/subfolders.
  13. Keep frontmatter: title, description, sourceUrl (local://... allowed), retrievedAt.
  14. Report result.
  15. 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.