Agent Skillspi0/mdzilla › mdzilla

mdzilla

GitHub

提供终端和AI代理的Markdown文档浏览工具,支持从本地、GitHub、npm及HTTP源获取和渲染文档,具备智能搜索与导出功能。

skills/mdzilla/SKILL.md pi0/mdzilla

Trigger Scenarios

用户要求阅读或检查特定库/项目的文档 需要从GitHub仓库、npm包或网站抓取文档内容 需要将文档导出为本地Markdown文件以便离线处理 查找API参考、指南或使用示例

Install

npx skills add pi0/mdzilla --skill mdzilla -g -y
More Options

Use without installing

npx skills use pi0/mdzilla@mdzilla

指定 Agent (Claude Code)

npx skills add pi0/mdzilla --skill mdzilla -a claude-code -g -y

安装 repo 全部 skill

npx skills add pi0/mdzilla --all -g -y

预览 repo 内 skill

npx skills add pi0/mdzilla --list

SKILL.md

Frontmatter
{
    "name": "mdzilla",
    "description": "Browse, search, and export documentation from any source using the mdzilla CLI. Use when Claude needs to: (1) Read or browse documentation for a library, framework, or project, (2) Fetch docs from GitHub repos, npm packages, or websites, (3) Export documentation to flat markdown files, (4) Look up API references, guides, or usage examples from doc sites. Triggers: user asks to \"read the docs\", \"check the documentation\", \"browse docs for X\", \"fetch docs from\", \"export docs\", or references a docs site URL, npm package docs, or GitHub repo docs."
}

mdzilla

Markdown documentation browser for terminal and agents. Fetches and renders docs from local dirs, GitHub, npm, HTTP, and llms.txt.

CLI

npx mdzilla <source> [query] [options]

Sources

Source Syntax Notes
Local dir mdzilla ./docs Scan local docs directory
File mdzilla README.md Render single markdown file
GitHub mdzilla gh:owner/repo Looks for docs/ in repo
npm mdzilla npm:package-name Downloads package, reads docs
HTTP mdzilla https://example.com Tries /llms.txt, then markdown negotiation, then HTML→markdown

Options

  • --export <dir> — Export docs to flat .md files
  • --plain — Plain text output; auto-enabled for AI agents or non-TTY stdout

Smart Resolve

The second positional argument is smart-resolved:

  1. If it matches a navigation path → renders that page
  2. Otherwise → searches titles and content

Agent usage

npx mdzilla gh:unjs/h3 /guide/basics        # render a specific page
npx mdzilla gh:unjs/h3 router               # search for 'router'
npx mdzilla https://h3.unjs.io /guide       # render page from URL
npx mdzilla npm:consola --plain             # list all pages (plain)

Export docs for offline processing:

npx mdzilla <source> --export ./fetched-docs

Then read the exported .md files as needed.

Programmatic API

Export Docs

import { exportSource } from "mdzilla";

await exportSource("./docs", "./dist/docs");
await exportSource("gh:unjs/h3", "./dist/h3-docs");
await exportSource("npm:h3", "./dist/h3-docs", { plainText: true });
await exportSource("https://h3.unjs.io", "./dist/h3-docs");

Collection

import { Collection, resolveSource } from "mdzilla";

const docs = new Collection(resolveSource("./docs"));
await docs.load();

console.log(docs.tree); // NavEntry[] navigation tree
console.log(docs.flat); // FlatEntry[] flat list

const content = await docs.getContent(docs.flat[0]);
const results = docs.filter("query"); // fuzzy search

Version History

  • 4b89d25 Current 2026-07-25 07:07

Metadata

Files
0
Version
4b89d25
Hash
7e0d8bdc
Indexed
2026-07-25 07:07

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 01:35
浙ICP备14020137号-1 $mapa de visitantes$