[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BZH388Q3JKP6AFWDXJZMG4":3,"skill-same:01M6BZH388Q3JKP6AFWDXJZMG4":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":17,"ownerDescription":17,"updatedAt":45,"install":46,"resources":59},"01M6BZH388Q3JKP6AFWDXJZMG4","book_chapter.fix_headings","Typst 章节标题校正","Fix Typst book chapter headings and slide titles to match its .smd source","修复 Typst 书籍的章节标题和幻灯片标题，使其与 .smd 源文件保持一致。","causify-ai\u002Fhelpers","causify-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121828442?v=4","01M6BZFTHW2MQR7FWK8CDW0DRA","Causify.AI","01M6BZFTPJ193AB5N089Z82HQG",155,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fbook_chapter.fix_headings\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BVB0FJ0RR8KXYVFTKEA3XX","技术文档工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CBKVQ0NH3BY0SEQQHVKM0M","图书编写与出版","SCENARIO","使用场景",[31],"book chapter fix headings","2026-11-10 10:12:30",false,"---\ndescription: Fix Typst book chapter headings and slide titles to match its .smd source\nmodel: sonnet\n---\n\n# Goal\n\n- Given a lecture's `.smd` source and the `.typ` book chapter generated from it (by\n  `gen_book_chapter.py --mode typst_aima`), fix the chapter's heading levels and\n  slide-title handling to follow the \"Structural Hierarchy\" rule in\n  `.claude\u002Fskills\u002Ftypst.rules.md`\n- Most of this is mechanical (moving `=`\u002F`==`\u002F`===` markers), but one part is not:\n  a slide title that must become a transition (see Step 3 below) requires rewording\n  a sentence, not just replacing a marker. That is the only text this skill is\n  allowed to change; everything else in the chapter's prose stays untouched\n- This is a fix-up for chapters generated before that rule existed (or that were\n  hand-edited inconsistently): running it on a chapter that already follows the rule\n  is a no-op\n\n# Inputs\n\n- `\u003CSMD_FILE>`: the lecture source\n  - E.g., `msml610\u002Flectures_source\u002FLesson02.1-A_Map_of_Machine_Learning.smd`\n- `\u003CTYP_FILE>`: the generated book chapter for `\u003CSMD_FILE>`\n  - E.g., `msml610\u002Fbook\u002FLesson02.1-A_Map_of_Machine_Learning.typ`\n\n# Workflow\n\n## Classify Every Heading\u002Fslide in `\u003CSMD_FILE>`\n\n- Walk `\u003CSMD_FILE>` top to bottom, collecting every `#`\u002F`##`\u002F`###`(+) heading line\n  and every `* Slide Title` line, in source order, with its line number\n- Track one running flag, `seen_subheading`, starting `False`: flip it to `True` the\n  first time a `##` or deeper heading is seen. Its value _at the point each `_ Slide\n  Title`line is reached* (before any`##` on the same line updates it) is what Step 3\n  needs for that slide\n\n## Locate the Matching Line in `\u003CTYP_FILE>`\n\n- `\u003CTYP_FILE>` carries a\n  ```text\n  \u002F\u002F From: \u003CSMD_FILE>:\u003CLINE_NUMBER> '\u003CMARKER> \u003CTITLE>'\n  \u002F\u002F Slide: \u003CTITLE>\n  ```\n  comment immediately above every heading\u002Fslide it was generated from.\n  Match each Step 1 entry to its block by that comment (line number + marker), not by\n  title text alone -- titles can repeat (e.g. a lesson and its own first slide sharing\n  a name)\n- The heading\u002Ftitle line itself is the next non-comment line after\n  `\u002F\u002F Slide: \u003CTITLE>`: it may currently be `#strong[Title]`, `= Title` \u002F `== Title`\n  \u002F `=== Title`, or missing entirely (the block's paragraph starts right after the\n  comment, no title line at all)\n\n## Apply the Rule From `typst.rules.md`\n\n\u002F\u002F TODO(ai_gp): Make reference to the typst.rules.md instead of this wall of text\nFor each block found in Step 2, make its title line match the `## Structural\nHierarchy` and `## Mandatory Sections` rules in `typst.rules.md`. This is the\nskill-specific decision logic for choosing *which* of those rules applies to\neach block; for what the resulting heading syntax must look like, see the\nrules themselves:\n- **H1** (`#`), title equal to the chapter title already shown by `#chapter(...)`\n  (the common case: one `#` per lesson, and it's the lesson title): delete the title\n  line entirely, keep the `\u002F\u002F From:`\u002F`\u002F\u002F Slide:` comments. If a body-level H1 has\n  _different_ text from the chapter title, check whether any `##`\u002F`###` appears\n  under it before the next `#` (or end of document): if it owns no nested\n  subsections, use `#strong[Title]` instead of deleting it; if it owns nested\n  `##`\u002F`###` subsections (e.g. a lesson combining two topics under one chapter\n  title, each `# Topic` with its own `##` subsections), keep it a real `= Title`\n  heading instead, per `typst.rules.md`'s rule that `#strong` may never stand in\n  for a heading. Cross-check with `extract_toc_from_txt.py -i \u003CSMD_FILE>` vs\n  `grep \"^=\" \u003CTYP_FILE>` if unsure\n- **`##`\u002F`###`\u002Fdeeper**: apply the `## Structural Hierarchy` heading-level\n  mapping. Leave alone if already correct\n- **`* Roadmap`**, **`* Summary`**, **`* References`**: always the mandatory\n  level-1 headings required by `## Mandatory Sections`, regardless of\n  `seen_subheading` or how many slides came before them. These are the\n  mandatory structural sections, not ordinary content slides, so the\n  `seen_subheading` rule below (which governs whether an ordinary slide gets a\n  heading, gets dropped, or becomes a transition) never applies to them\n- **`* Slide Title`** (any other slide):\n  - `seen_subheading` was `False` at this slide -> `= Title`, a real heading (add the\n    line if it's missing, replace it if it's currently `#strong[Title]` or a\n    transitioned-in paragraph)\n  - `seen_subheading` was `True` at this slide, and it is the first slide since that\n    heading last appeared (no other `* Slide Title` block has occurred since) ->\n    drop the title entirely: no `#strong[Title]` line, no added transition. Delete\n    a `#strong[Title]` line if present (and the blank line after it) and leave the\n    paragraph to open with its own first sentence, directly after the `\u002F\u002F Slide:`\n    comment\n  - `seen_subheading` was `True` at this slide, and at least one other slide has\n    already appeared since that heading -> drop the title and make the paragraph\n    transition in from the previous slide's ending instead of restating the title:\n    - Read the previous block's last sentence and this block's first sentence\n    - If the previous sentence already reads as a lead-in (a forward reference,\n      a rhetorical question the next slide answers, a \"this raises the question\n      of X\" close) and the next paragraph's own opening already picks it up\n      naturally, deleting the title line is enough -- no new sentence needed\n    - Otherwise, prepend one short new sentence (or reword the first clause of the\n      existing opening sentence) that connects the two: a callback to the term or\n      claim the previous slide ended on, a contrast (\"beyond X, a second axis\n      is...\"), or an explicit bridge. Keep it to one sentence; do not summarize or\n      repeat content the paragraph itself is about to say\n    - A term the slide is centrally about may still get `#strong[...]`, but inside\n      that transition sentence or the paragraph's own first sentence, never as its\n      own line\n  - Either way, remove the blank line that used to separate the title line from the\n    body: the comment block is followed directly by the paragraph, no gap (see the\n    \"Good\" examples in `typst.rules.md`)\nNever touch a `#strong[...]`\u002F`#emph[...]` occurring elsewhere in the prose\n(mid-paragraph terms, list lead phrases), and never touch any sentence beyond the\nfirst one of a transitioned-in paragraph: only the standalone title lines identified\nin Step 2, and the single opening sentence next to them, are in scope\n\n# Verification\n\n- [ ] Lint the file: `typstyle --inplace --wrap-text -l 85 \u003CTYP_FILE>`\n- [ ] Compile and check the PDF looks right: see\n      `.claude\u002Fskills\u002Fbook.fix_rendered_pdf\u002FSKILL.md`\n- [ ] Confirm no prose beyond the in-scope title lines and their opening\n      sentence was changed\n","# Goal\n\n- Given a lecture's `.smd` source and the `.typ` book chapter generated from it (by\n  `gen_book_chapter.py --mode typst_aima`), fix the chapter's heading levels and\n  slide-title handling to follow the \"Structural Hierarchy\" rule in\n  `.claude\u002Fskills\u002Ftypst.rules.md`\n- Most of this is mechanical (moving `=`\u002F`==`\u002F`===` markers), but one part is not:\n  a slide title that must become a transition (see Step 3 below) requires rewording\n  a sentence, not just replacing a marker. That is the only text this skill is\n  allowed to change; everything else in the chapter's prose stays untouched\n- This is a fix-up for chapters generated before that rule existed (or that were\n  hand-edited inconsistently): running it on a chapter that already follows the rule\n  is a no-op\n\n# Inputs\n\n- `\u003CSMD_FILE>`: the lecture source\n  - E.g., `msml610\u002Flectures_source\u002FLesson02.1-A_Map_of_Machine_Learning.smd`\n- `\u003CTYP_FILE>`: the generated book chapter for `\u003CSMD_FILE>`\n  - E.g., `msml610\u002Fbook\u002FLesson02.1-A_Map_of_Machine_Learning.typ`\n\n# Workflow\n\n## Classify Every Heading\u002Fslide in `\u003CSMD_FILE>`\n\n- Walk `\u003CSMD_FILE>` top to bottom, collecting every `#`\u002F`##`\u002F`###`(+) heading line\n  and every `* Slide Title` line, in source order, with its line number\n- Track one running flag, `seen_subheading`, starting `False`: flip it to `True` the\n  first time a `##` or deeper heading is seen. Its value _at the point each `_ Slide\n  Title`line is reached* (before any`##` on the same line updates it) is what Step 3\n  needs for that slide\n\n## Locate the Matching Line in `\u003CTYP_FILE>`\n\n- `\u003CTYP_FILE>` carries a\n  ```text\n  \u002F\u002F From: \u003CSMD_FILE>:\u003CLINE_NUMBER> '\u003CMARKER> \u003CTITLE>'\n  \u002F\u002F Slide: \u003CTITLE>\n  ```\n  comment immediately above every heading\u002Fslide it was generated from.\n  Match each Step 1 entry to its block by that comment (line number + marker), not by\n  title text alone -- titles can repeat (e.g. a lesson and its own first slide sharing\n  a name)\n- The heading\u002Ftitle line itself is the next non-comment line after\n  `\u002F\u002F Slide: \u003CTITLE>`: it may currently be `#strong[Title]`, `= Title` \u002F `== Title`\n  \u002F `=== Title`, or missing entirely (the block's paragraph starts right after the\n  comment, no title line at all)\n\n## Apply the Rule From `typst.rules.md`\n\n\u002F\u002F TODO(ai_gp): Make reference to the typst.rules.md instead of this wall of text\nFor each block found in Step 2, make its title line match the `## Structural\nHierarchy` and `## Mandatory Sections` rules in `typst.rules.md`. This is the\nskill-specific decision logic for choosing *which* of those rules applies to\neach block; for what the resulting heading syntax must look like, see the\nrules themselves:\n- **H1** (`#`), title equal to the chapter title already shown by `#chapter(...)`\n  (the common case: one `#` per lesson, and it's the lesson title): delete the title\n  line entirely, keep the `\u002F\u002F From:`\u002F`\u002F\u002F Slide:` comments. If a body-level H1 has\n  _different_ text from the chapter title, check whether any `##`\u002F`###` appears\n  under it before the next `#` (or end of document): if it owns no nested\n  subsections, use `#strong[Title]` instead of deleting it; if it owns nested\n  `##`\u002F`###` subsections (e.g. a lesson combining two topics under one chapter\n  title, each `# Topic` with its own `##` subsections), keep it a real `= Title`\n  heading instead, per `typst.rules.md`'s rule that `#strong` may never stand in\n  for a heading. Cross-check with `extract_toc_from_txt.py -i \u003CSMD_FILE>` vs\n  `grep \"^=\" \u003CTYP_FILE>` if unsure\n- **`##`\u002F`###`\u002Fdeeper**: apply the `## Structural Hierarchy` heading-level\n  mapping. Leave alone if already correct\n- **`* Roadmap`**, **`* Summary`**, **`* References`**: always the mandatory\n  level-1 headings required by `## Mandatory Sections`, regardless of\n  `seen_subheading` or how many slides came before them. These are the\n  mandatory structural sections, not ordinary content slides, so the\n  `seen_subheading` rule below (which governs whether an ordinary slide gets a\n  heading, gets dropped, or becomes a transition) never applies to them\n- **`* Slide Title`** (any other slide):\n  - `seen_subheading` was `False` at this slide -> `= Title`, a real heading (add the\n    line if it's missing, replace it if it's currently `#strong[Title]` or a\n    transitioned-in paragraph)\n  - `seen_subheading` was `True` at this slide, and it is the first slide since that\n    heading last appeared (no other `* Slide Title` block has occurred since) ->\n    drop the title entirely: no `#strong[Title]` line, no added transition. Delete\n    a `#strong[Title]` line if present (and the blank line after it) and leave the\n    paragraph to open with its own first sentence, directly after the `\u002F\u002F Slide:`\n    comment\n  - `seen_subheading` was `True` at this slide, and at least one other slide has\n    already appeared since that heading -> drop the title and make the paragraph\n    transition in from the previous slide's ending instead of restating the title:\n    - Read the previous block's last sentence and this block's first sentence\n    - If the previous sentence already reads as a lead-in (a forward reference,\n      a rhetorical question the next slide answers, a \"this raises the question\n      of X\" close) and the next paragraph's own opening already picks it up\n      naturally, deleting the title line is enough -- no new sentence needed\n    - Otherwise, prepend one short new sentence (or reword the first clause of the\n      existing opening sentence) that connects the two: a callback to the term or\n      claim the previous slide ended on, a contrast (\"beyond X, a second axis\n      is...\"), or an explicit bridge. Keep it to one sentence; do not summarize or\n      repeat content the paragraph itself is about to say\n    - A term the slide is centrally about may still get `#strong[...]`, but inside\n      that transition sentence or the paragraph's own first sentence, never as its\n      own line\n  - Either way, remove the blank line that used to separate the title line from the\n    body: the comment block is followed directly by the paragraph, no gap (see the\n    \"Good\" examples in `typst.rules.md`)\nNever touch a `#strong[...]`\u002F`#emph[...]` occurring elsewhere in the prose\n(mid-paragraph terms, list lead phrases), and never touch any sentence beyond the\nfirst one of a transitioned-in paragraph: only the standalone title lines identified\nin Step 2, and the single opening sentence next to them, are in scope\n\n# Verification\n\n- [ ] Lint the file: `typstyle --inplace --wrap-text -l 85 \u003CTYP_FILE>`\n- [ ] Compile and check the PDF looks right: see\n      `.claude\u002Fskills\u002Fbook.fix_rendered_pdf\u002FSKILL.md`\n- [ ] Confirm no prose beyond the in-scope title lines and their opening\n      sentence was changed\n",{"model":37,"description":7},"sonnet","master","39143a859859181eff7e774457997b5278fd9e99",".claude\u002Fskills\u002Fbook_chapter.fix_headings",170,"https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers","https:\u002F\u002Fcausify.ai","https:\u002F\u002Fgithub.com\u002Fcausify-ai","2026-11-02 02:09:15",{"source":9,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add causify-ai\u002Fhelpers --skill book_chapter.fix_headings",{"tool":52,"command":53},"bunx","bunx skills add causify-ai\u002Fhelpers --skill book_chapter.fix_headings",{"tool":55,"command":56},"pnpm","pnpm dlx skills add causify-ai\u002Fhelpers --skill book_chapter.fix_headings","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fbook_chapter.fix_headings\u002FSKILL.md",true,[],[61,81,101,118,131,140],{"skillNo":62,"name":63,"nameZh":64,"description":65,"descriptionZh":66,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":67,"categories":68,"keywords":73,"publishedAt":32},"01M6C9ZMM0XSXCHHABMJ9XB1JB","tutorial_in_60_mins.propagate_docker_changes","Docker 文件同步与模板对齐","Sync tutorial and class-project Docker files to match project_template","同步教程和课程项目的 Docker 文件，使其与 project_template 保持一致。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.propagate_docker_changes\u002FSKILL.md",[69,72],{"categoryNo":70,"categoryName":71,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[74,75,76,77,78,79,80],"tutorial in 60 mins propagate docker changes","tutorial","docker","files","haiku","template","sync",{"skillNo":82,"name":83,"nameZh":84,"description":85,"descriptionZh":86,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":93,"publishedAt":32},"01M6C9ZJK8QJ9FNCY39WVF3GMG","tutorial_in_60_mins.merge_markdown","Markdown 合并至 Jupyter Notebook","Merge the content of a markdown file into a Jupyter notebook","将 Markdown 文件的内容合并到 Jupyter Notebook 中。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.merge_markdown\u002FSKILL.md",[89,92],{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[94,95,75,96,97,78,98,99,100],"merge","tutorial in 60 mins merge markdown","markdown","jupyter","file","content","jupyter notebook",{"skillNo":102,"name":103,"nameZh":104,"description":105,"descriptionZh":106,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":107,"categories":108,"keywords":113,"publishedAt":32},"01M6C9ZFYK13ZCT1E8BEEC4NG4","tutorial_in_60_mins.format","60 分钟教程格式规范化","Format a directory to follow the \"Learn X in 60 Minutes\" tutorial conventions","格式化目录，使其遵循「Learn X in 60 Minutes」（60 分钟学会 X）教程约定。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.format\u002FSKILL.md",[109,110],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":111,"categoryName":112,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CFCW1CKQHXFV91HEWYD9W6","课程开发与教学制作",[114,75,115,116,117,78],"tutorial in 60 mins format","format","directory","learn",{"skillNo":119,"name":120,"nameZh":121,"description":122,"descriptionZh":123,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":124,"categories":125,"keywords":128,"publishedAt":32},"01M6C9ZDKXSBKNKX7M3X4W38G5","tutorial_in_60_mins.create","60 分钟教程目录创建","Create a tutorial directory for the Learn X in 60 Minutes conventions","按照「Learn X in 60 Minutes」（60 分钟学会 X）约定创建教程目录。","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftutorial_in_60_mins.create\u002FSKILL.md",[126,127],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":111,"categoryName":112,"taxonomyType":28,"taxonomyTypeDesc":29},[129,75,130,116,117],"tutorial in 60 mins create","create",{"skillNo":132,"name":133,"nameZh":17,"description":134,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":32},"01M6BZS5Z0QE03WRS1TM3XJEY9","todo.reorg_in_progress","Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftodo.reorg_in_progress\u002FSKILL.md",[],[138,139],"todo reorg in progress","tasks",{"skillNo":141,"name":142,"nameZh":17,"description":143,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":32},"01M6BZS4CQZ6KK2KQ26SVB7QCS","todo.reorg_headers","Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage","https:\u002F\u002Fgithub.com\u002Fcausify-ai\u002Fhelpers\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ftodo.reorg_headers\u002FSKILL.md",[],[147],"todo reorg headers"]