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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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 filefile.md#h2-slug— full H2 span, including child sectionsfile.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 getfor an arbitrary filesystem path; that command resolves context-library refs. - Do not hand-slice headings with
sedor 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
评论
- …
同一仓库的更多技能
agent-operated-software
8.6k帮你的智能体设计、构建或调试一个后端包含 AI 智能体的持续运行应用,例如基于 Markdown 或 JSON 的智能体控制层。
agent-operated-workflows
8.6k帮你的智能体判断一个有边界的流程应由 AI 智能体还是普通代码执行,并基于已验证的证据从中断处恢复。
applying-a-permission-policy
8.6k帮你的智能体在团队设置时配置 AI 编程智能体使用的命令权限,让常规命令减少审批提示。
claude-compaction-restore
8.6k帮助 Claude Code 智能体在上下文被压缩后,借助保存的恢复图、对话记录和它改动过的文件,重建工作认知。