Agent SkillsDreeseaw/mdlens › mdlens

mdlens

GitHub

提供Markdown文件的高效检索与问答能力。通过scout命令进行语义搜索和多文件对比,read命令精确定位章节,支持树状结构查看和打包提取,避免全文件读取,提升文档处理效率。

skills/mdlens/SKILL.md Dreeseaw/mdlens

触发场景

需要从多个Markdown文件中查找特定信息 对Markdown目录进行自然语言问答 需要对比不同文档内容或检查时效性 已知具体章节ID或标题路径需读取详细内容

安装

npx skills add Dreeseaw/mdlens --skill mdlens -g -y
更多选项

不安装直接使用

npx skills use Dreeseaw/mdlens@mdlens

指定 Agent (Claude Code)

npx skills add Dreeseaw/mdlens --skill mdlens -a claude-code -g -y

安装 repo 全部 skill

npx skills add Dreeseaw/mdlens --all -g -y

预览 repo 内 skill

npx skills add Dreeseaw/mdlens --list

SKILL.md

Frontmatter
{
    "name": "mdlens",
    "description": "Use mdlens for Markdown navigation and retrieval. Prefer `mdlens scout` for question answering over Markdown directories; use `mdlens read` for exact follow-up sections. Trigger on requests that require reading, searching, comparing, summarizing, or answering from .md\/.markdown files."
}

mdlens: Markdown retrieval skill

Use mdlens instead of raw full-file reads when working with Markdown.

Fast QA workflow

For a question over a Markdown directory, start with:

mdlens scout "$DOCS_DIR" "$QUESTION" --max-tokens 1000

Read [highlights] first, then [evidence]. If the answer is present, stop and answer directly. Preserve exact short source terms such as flags, IDs, option names, metrics, table values, and policy phrases.

If exactly one detail is missing, use the section map from [files]:

mdlens read "$FILE" --id "$SECTION_ID" --max-tokens 1200

Avoid reading whole Markdown files unless scout clearly found the wrong file.

Other useful commands

# Survey structure with section IDs and token estimates
mdlens tree docs/
mdlens tree path/to/file.md

# Read a known section
mdlens read file.md --id 1.2
mdlens read file.md --heading-path "Setup>Configuration"
mdlens read file.md --id 1 --no-children

# Search and pack when scout is not the right entry point
mdlens search docs/ "authentication"
mdlens pack docs/ --search "API reference" --max-tokens 4000 --parents

When to use which command

  • Use scout for natural-language QA, multi-file comparison, stale/current checks, table lookup, and policy/rationale questions.
  • Use tree when you need only file structure.
  • Use read when you already know the section ID or heading path.
  • Use search when you need a second independent query after scout.
  • Use pack when you intentionally want several selected sections under a hard token budget.

Run mdlens --help and mdlens scout --help for the detailed agent workflow.

版本历史

  • 2eb7bf3 当前 2026-07-24 16:17

元信息

文件数
0
版本
2eb7bf3
Hash
7b5bc0a0
收录时间
2026-07-24 16:17

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 14:47
浙ICP备14020137号-1