跳到正文
Skillpedia
通用编程8.6k · #12388

loading-addressable-markdown

它能做什么

这个技能让 AI 智能体只打开基于标题的 Markdown 文件中的一个章节,而不是整份文档。适合处理长篇项目文档、并通过地址引用章节的智能体。

适用场景

  • ✓任务中用 file.md#heading 这样的地址指明某个文档章节的时候。
  • ✓你只需要长 Markdown 文件中的一部分,而不想读取其余内容的时候。
  • ✓仪表板或任务文件链接到特定 Markdown 章节的时候。

技能链接

https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请只加载我任务文件夹中源代码清理方案里的提案章节。”

每周 5 个新技能,1 分钟读完。

工作原理

它运行一个随附脚本,找到你所要求的标题(包括其子章节),并跳过位于代码块中的标题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Loading Addressable Markdown

Overview

Load exactly one addressed Markdown section from any filesystem tree. The resolver mirrors OpenRig's shipped H2/H3 grammar without requiring the file to live in the context library.

Use

Run the bundled script. Relative file references resolve from --root; without it they resolve from the current directory.

node ~/.agents/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs \
  --root /path/to/mission \
  'slices/09-source-cleanup/SPEC.md#proposal'

The accepted forms are:

  • file.md — whole file
  • file.md#h2-slug — full H2 span, including child sections
  • file.md#h2-slug/h3-slug — full H3 span

Slugs are lowercase; Markdown emphasis/code markers are removed; each other non-alphanumeric run becomes -. Duplicate or missing paths fail loudly. Headings inside fenced code blocks are ignored.

Common mistakes

  • Do not use rig context get for an arbitrary filesystem path; that command resolves context-library refs.
  • Do not hand-slice headings with sed or line numbers; the bundled resolver owns span and fence behavior.
  • Quote addresses in shell commands.
常见问题

它能从任何文件夹加载章节吗?

可以。它适用于任何文件路径,使用你提供的根文件夹。

支持哪些地址格式?

它支持整个文件、二级标题,以及二级标题下的三级标题。

为什么不用 sed 切割文件?

技能说明,随附脚本能正确处理章节和代码块的边界情况,手动切片有风险。

详情

作者的原始描述

Use when a mission, slice, dashboard, or task references Markdown as path#h2-slug or path#h2-slug/h3-slug outside the OpenRig context-pack library.

repo: mvschwarz/openrig

热度

GitHub 星标
8.6k
排名
#12388
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能