Skills Pager
Any skill over about 100 lines costs real context whether you need the whole thing or just one section. Skills Pager builds a compact index.md after your first deep read of a large skill, so the next time — or even two turns later in the same session — you can jump straight to the section you need without burning context on the parts you don't.
If .skill-index/skills/<skill-id>/index.md already exists for a skill you are about to read, start there. It is shorter than the source and tells you exactly which sections to load for the current task.
One Job
Create or reuse a single working file at .skill-index/skills/<skill-id>/index.md for one target skill at a time.
This is an efficiency tool, not filing work. The source stays authoritative. The index exists so you can jump back to the right section faster, load less source, and spend more of your context on actual reasoning instead of rediscovering structure you already understood once.
Quick Check
When a skill you need is roughly 100 lines or more:
- 1. Does
.skill-index/skills/<skill-id>/index.md already exist? - Yes → read the index first, load only the source sections it points to, then answer.
- No → read the source and answer the task first. After answering, build the index so the next encounter can skip the full reread.
Current Target Skill
Paging works on one target skill at a time.
Pick the current target as the skill that owns the section, protocol, or phase you need to answer next. If several skills appear in the same request, do not widen the index to cover all of them at once. Handle the first target you actually need, then repeat for the next target only if the task still needs it.
When .skill-index/skills/<skill-id>/index.md is missing for the current target, that absence is not only a status check — the missing index is the next piece of work for that target once the user's question is answered.
When It Helps
Use this skill when:
- - you are about to read a SKILL.md that is 100+ lines but only need one section of it
- you just deeply read a big skill and will probably need parts of it again later
- a request names specific parts across multiple large skills
- you notice yourself rereading the same source regions across turns
- important detail is split across
SKILL.md, references/, or pre-split section files - a fresh session or handoff would likely need the same entry points again
These skill shapes often benefit from paging:
- - workflow skills with distinct phases
- policy-heavy skills with buried rules
- multi-file skills where the real detail lives in INLINECODE7
- skills whose useful content is split across many files
You usually do not need paging when:
- - the skill is short or flat enough to scan directly
- the source is small enough that an index would add ceremony without improving re-entry
A narrow request can still be the right trigger for building the index when the underlying skill is substantial.
What Mapped Means Here
A skill is treated as mapped in this workspace when .skill-index/skills/<skill-id>/index.md exists with useful content.
That single working file should cover:
- - what the skill is for
- when a session should start there
- the main routes or topics worth re-entering
- the important sources that shaped the index
- the precise return points that later sessions should not have to rediscover
Later growth can add changes.md, but the first useful pass should leave one complete working file rather than several partial placeholders.
Where It Lives
Write pager files in the workspace root, not inside the skill source and not inside memory files:
CODEBLOCK0
If .skill-index/skills/<skill-id>/index.md does not exist yet, treat the skill as unmapped in this workspace.
Quick Start
This skill includes a companion scaffold script at scripts/create-skills-pager-map.js.
Resolve that path relative to the installed skills-pager directory. If this skill is installed under skills/skills-pager/, a workspace-root command typically looks like:
CODEBLOCK1
Use the script to draft the single-file index quickly. It is mechanical help only. Decide the route set from source first, then replace the placeholders with real content before treating the index as usable.
Workflow
If the Index Already Exists (Reuse Path)
- 1. Read
.skill-index/skills/<skill-id>/index.md. - Pick the route note that matches the current task.
- Load only the source sections it points to.
- Verify from source as needed.
- If the index proves weak or stale, update it and optionally add
changes.md.
If No Index Exists Yet (Creation Path)
- 1. Read the target skill's source and answer the user's question first.
- After answering, check whether the skill was substantial enough to justify an index.
- If yes, read
references/initial-mapping.md for the mapping workflow. - Read
references/map-layout.md for the index file structure. - Read enough source to understand the skill's main routes beyond today's narrow request.
- If the workspace already has section files, appendices, or notes that expose useful source regions, use them as inputs.
- Run the companion script
scripts/create-skills-pager-map.js using the installed skill-local path. - Replace the scaffold placeholders in
index.md so the file covers the target skill's main route set. - The next session or turn that needs this skill will start from the index.
A reliable mental model:
- - answer the user's question using the source directly
- then ask: was that skill big enough that a future session would benefit from a shortcut?
- if yes, build the index while the understanding is fresh
- the durable output is the working file on disk, not only a chat summary
Multi-Skill Requests
If the task names several large skills:
- 1. Pick the first target you need to answer now.
- Check its index state and follow the matching path above.
- Answer the part of the task that depends on it.
- Move to the next target only if the request still needs it.
- Keep each index under its own
.skill-index/skills/<skill-id>/ directory.
Reuse
- 1. Read
index.md. - Use that file to recover scope, route choices, and likely source jumps.
- Decide whether the current task needs only a quick source check, a focused source read, or a wider reread.
- Re-read the amount of source needed for the current detail level before relying on consequential instructions.
- If the index proves weak or stale, update it and optionally record why in
changes.md.
The index lowers re-entry cost. It does not replace source verification for consequential detail, but it often replaces blind source-first re-entry as the default starting point.
Keep It Simple
- - source is the authority
- INLINECODE23 is navigation, not memory
- first encounter: answer first, build the index after
- later encounters: check the index first, load only what you need
- later reuse starts by reading the index file
- one target skill at a time
- depth can grow later if repeated reuse proves it helpful
Boundaries
Keep .skill-index/ separate from:
- - INLINECODE25
- INLINECODE26
- INLINECODE27
- vector memory such as
memory_store / INLINECODE29
A pager index stores navigation knowledge about skill sources. It should not store task outcomes, user preferences, or conversation history.
Read These References When
技能分页器
任何超过约100行的技能,无论你需要完整内容还是仅其中一节,都会消耗实际上下文。技能分页器在你首次深度阅读大型技能后,会构建一个紧凑的index.md文件,这样下次——甚至在同一会话的两轮对话后——你可以直接跳转到所需章节,而无需为不需要的部分消耗上下文。
如果你即将阅读的技能已存在.skill-index/skills//index.md文件,则从该文件开始。它比源文件更短,并能准确告知你当前任务需要加载哪些章节。
单一任务
每次为一个目标技能创建或复用.skill-index/skills//index.md这一个工作文件。
这是一个效率工具,而非归档工作。源文件保持权威性。索引的存在是为了让你能更快跳回正确的章节,加载更少的源文件,将更多上下文用于实际推理,而不是重新发现你已经理解过一次的结构。
快速检查
当你需要的技能大约在100行或以上时:
- 1. .skill-index/skills//index.md是否已存在?
- 是 → 先读取索引,仅加载它指向的源文件章节,然后回答。
- 否 → 先读取源文件并回答任务。回答后,构建索引,以便下次遇到时可以跳过完整重读。
当前目标技能
分页每次只针对一个目标技能。
将当前目标选定为你接下来需要回答的章节、协议或阶段所属的技能。如果同一请求中出现多个技能,不要扩大索引范围一次性覆盖所有技能。先处理你实际需要的第一个目标,然后仅在任务仍需时才处理下一个目标。
当当前目标的.skill-index/skills//index.md缺失时,这种缺失不仅是一个状态检查——缺失的索引就是该目标在用户问题得到回答后的下一个工作事项。
何时使用
在以下情况下使用此技能:
- - 你即将阅读一个100行以上的SKILL.md文件,但只需要其中一节
- 你刚刚深度阅读了一个大型技能,之后可能还需要其中的部分内容
- 请求中提到了多个大型技能中的特定部分
- 你发现自己跨轮次重复读取相同的源文件区域
- 重要细节分布在SKILL.md、references/或预分割的章节文件中
- 新的会话或交接可能再次需要相同的入口点
以下技能形态通常受益于分页:
- - 具有不同阶段的工作流技能
- 规则繁多的政策型技能
- 实际细节存在于references/中的多文件技能
- 有用内容分布在多个文件中的技能
通常不需要分页的情况:
- - 技能较短或结构扁平,可直接浏览
- 源文件足够小,索引只会增加仪式感而不改善重新进入的效率
当底层技能内容充实且请求范围狭窄时,这仍然可以是构建索引的正确触发条件。
此处已映射的含义
当.skill-index/skills//index.md存在且包含有用内容时,该技能在此工作区中被视为已映射。
该单一工作文件应涵盖:
- - 技能的用途
- 会话何时应从该文件开始
- 值得重新进入的主要路径或主题
- 构成索引的重要源文件
- 后续会话不应重新发现的精确返回点
后续发展可以添加changes.md,但第一次有用的遍历应留下一个完整的工作文件,而非多个部分占位符。
存放位置
将分页文件写入工作区根目录,而非技能源文件内部或内存文件中:
text
.skill-index/
registry.json
skills/
/
index.md
changes.md # 可选后续添加
如果.skill-index/skills//index.md尚不存在,则将该技能视为在此工作区中未映射。
快速入门
此技能包含一个配套的脚手架脚本,位于scripts/create-skills-pager-map.js。
相对于已安装的skills-pager目录解析该路径。如果此技能安装在skills/skills-pager/下,工作区根目录的命令通常如下:
bash
node skills/skills-pager/scripts/create-skills-pager-map.js \
--skill-id <目标技能ID> \
--source <目标技能路径> \
--source <使用的参考或章节路径> \
--page <主要路径或主题> \
--page <另一个主要路径或主题>
使用该脚本快速起草单文件索引。它仅是机械辅助。首先从源文件确定路径集,然后在将索引视为可用之前,用实际内容替换占位符。
工作流程
如果索引已存在(复用路径)
- 1. 读取.skill-index/skills//index.md。
- 选择与当前任务匹配的路径注释。
- 仅加载它指向的源文件章节。
- 根据需要从源文件验证。
- 如果索引证明薄弱或过时,更新它,并可选择添加changes.md。
如果索引尚不存在(创建路径)
- 1. 先读取目标技能的源文件并回答用户的问题。
- 回答后,检查该技能是否足够充实以值得创建索引。
- 如果是,读取references/initial-mapping.md了解映射工作流程。
- 读取references/map-layout.md了解索引文件结构。
- 读取足够的源文件,以理解超出当前狭窄请求范围的技能主要路径。
- 如果工作区已有章节文件、附录或注释暴露了有用的源文件区域,将它们作为输入。
- 使用已安装的技能本地路径运行配套脚本scripts/create-skills-pager-map.js。
- 替换index.md中的脚手架占位符,使文件覆盖目标技能的主要路径集。
- 下次需要此技能的会话或轮次将从索引开始。
一个可靠的心智模型:
- - 直接使用源文件回答用户的问题
- 然后问:这个技能是否足够大,以至于未来的会话会受益于快捷方式?
- 如果是,在理解还新鲜时构建索引
- 持久的输出是磁盘上的工作文件,而不仅仅是聊天摘要
多技能请求
如果任务涉及多个大型技能:
- 1. 选择你现在需要回答的第一个目标。
- 检查其索引状态,并遵循上述匹配路径。
- 回答依赖于该目标的任务部分。
- 仅在请求仍需时才移动到下一个目标。
- 将每个索引保留在其自己的.skill-index/skills//目录下。
复用
- 1. 读取index.md。
- 使用该文件恢复范围、路径选择和可能的源文件跳转。
- 判断当前任务是否只需要快速源文件检查、专注的源文件读取,还是更广泛的重读。
- 在依赖重要指令之前,重新读取当前细节级别所需的源文件量。
- 如果索引证明薄弱或过时,更新它,并可选择在changes.md中记录原因。
索引降低了重新进入的成本。它不能替代对重要细节的源文件验证,但通常可以替代盲目的源文件优先重新进入作为默认起点。
保持简单
- - 源文件是权威
- .skill-index/是导航,而非记忆
- 首次遇到:先回答,后构建索引
- 后续遇到:先检查索引,仅加载所需内容
- 后续复用从读取索引文件开始
- 一次一个目标技能
- 如果后续复用证明其有用,深度可以后续增加
边界
将.skill-index/与以下内容分开:
- - MEMORY.md
- SESSION-STATE.md
- memory/YYYY-MM-DD.md
- 向量记忆如memorystore / memoryrecall
分页索引存储关于技能源文件的导航知识。它不应存储任务结果、用户偏好或对话历史。
何时阅读这些参考文件