用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/expectedparrot/katz --skill chunk-paper命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | chunk-paper |
| description | Chunk the registered paper into logical sections and add them to the katz paper map |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| user-invocable | true |
Reads the canonical manuscript from a registered katz paper, identifies logical sections with clean IDs and titles, and appends them to the paper map using katz paper add-sections.
/chunk-paper
katz paper status should return "valid": true).katz must be on PATH.katz paper status and confirm "valid": true.The canonical manuscript is stored inside .katz/. To find it, run:
katz paper resolve 0 1
This confirms the manuscript is accessible. Then read the full manuscript from the version directory. The path is .katz/versions/<commit>/paper/manuscript.md where <commit> is from katz paper status.
Check katz paper status for source_format to know whether the manuscript is TeX or markdown.
Run katz paper auto-chunk — it detects headings automatically for both markdown (#, ##, …) and TeX (\section{}, \subsection{}, …) sources. If it succeeds, skip to step 6 to verify.
If auto-chunk fails or produces poor results (e.g., too many headings, wrong granularity), fall back to the manual approach in steps 4–5.
Analyze the manuscript and identify logical sections. The goal is to produce sections that are:
introduction, experiment-design, phase-1-results), not auto-generated span-id-page-* artifacts from PDF conversion.Guidelines for section identification:
Markdown source: Start from the markdown headings (#, ##, ###, etc.).
span-id-page-* prefixed slugs with clean descriptive slugs based on the actual heading text.## 2. Experiment Design), use slugs like experiment-design (drop the number, keep the meaning).### and below) should keep their parent context in the slug (e.g., phase-1-ranking-behavior).TeX source: Start from TeX section commands (\section{...}, \subsection{...}, etc.).
\textbf{...} → plain text).Using Python via Bash, compute the byte offsets for each section:
import json, re
# Read the canonical manuscript (may be .md or .tex content)
with open("<path to manuscript.md>", "rb") as f:
raw = f.read()
text = raw.decode("utf-8")
lines = text.split("\n")
# For each heading, compute byte_start as:
# sum(len(l.encode("utf-8")) + 1 for l in lines[:i])
# where i is the 0-indexed line number.
#
# byte_end for each section extends to the byte_start of the next section,
# or len(raw) for the last section.
sections = [] # ... populated from analysis ...
# Output as JSON for the katz command
print(json.dumps(sections))
Important: The byte offsets must be exact. Each section needs id, title, byte_start, and byte_end. The line_start and line_end will be computed automatically by katz paper add-sections.
Pass the sections JSON array to katz paper add-sections:
katz paper add-sections --sections '<JSON array from step 5>'
This appends section records to paper_map.jsonl. Katz will reject any duplicate section IDs.
Run katz paper status and confirm:
"valid": trueThen run katz paper section <id> for 2–3 sections to spot-check that the byte ranges resolve correctly and the text content makes sense.
Report the final section list (id, title, line range) to the user.