Book Chapter.Update From Source
БесплатноБез исполняемых скриптовНе проверенUpdate a book's content to match changes in its source file
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
- Given a book content file
<TARGET>(markdown or tex) and its source file<SOURCE>, find the changes in<SOURCE>and incorporate them into<TARGET>
Plan Only (--only_plan)
- With
--only_plan, follow.claude/skills/skill.rules.mdsection "Create Only a Plan with--only_plan" - Write the plan to
book_chapter.update_from_source.<INPUT_REF>.md, then stop without executing the skill
Workflow
Read the Version Header
<SOURCE>has a header with the Git hash and timestamp of the material used to generate the current<TARGET>- E.g.,
% git_hash=<GIT_HASH>, timestamp=<TIMESTAMP> % <SOURCE> - E.g.,
% git_hash=f15bc6b9, timestamp=2026-07-15 14:41:12 EDT % book_springer/lectures_source/Lesson02.1_From_Data_Science_To_Decision_Science.txt
- E.g.,
- Get the diff of
<SOURCE>since<GIT_HASH>once, up front, not per section:> git diff <GIT_HASH> -- <SOURCE>
Incorporate Changes
- Modify
<TARGET>to reflect every change in<SOURCE>since<GIT_HASH> - Follow the style of
<TARGET>, reading the matching.claude/skills/*.rules.md <TARGET>may be a superset of<SOURCE>. A.typchapter routinely adds headings, diagrams, or paragraphs that group or expand several flat.smdslides (see "Structural Hierarchy" intypst.rules.md)- If
<SOURCE>drops a heading or diagram that<TARGET>built on, keep the<TARGET>content, since it has no direct counterpart anymore - Remove it only if the diff shows the underlying fact or example was changed or retracted, not merely reorganized out of the slide deck
- If
- Update the header at the top of
<TARGET>to the new hash and timestamp:// git_hash=<NEW_GIT_HASH> timestamp=<NEW_TIMESTAMP>
Compare Entire Flow
- Make the flow of
<TARGET>(typst, latex, or md) follow the flow of<SOURCE> - E.g., run
extract_toc_from_txt.pyon both files and compare> extract_toc_from_txt.py -i msml610/lectures_source/Lesson03.3-Non_classical_logics.smd > extract_toc_from_txt.py -i msml610/book/Lesson03.3-Non_classical_logics.typ - Ensure the flow of
<TARGET>is consistent with<SOURCE>
Update Source-Line References
- A
.typ<TARGET>has a// From: <SOURCE>:<LINE> '<slide title>'comment above each section, pointing to the exact<SOURCE>line it was generated from - An edit above a slide shifts every later line number. After incorporating the
changes, walk the
// From:comments top to bottom and fix each<LINE>so it matches the slide's current position in<SOURCE>- Find a slide by grepping
<SOURCE>for its*or#title
- Find a slide by grepping
Update Rendered Images
- If the diff changes a
graphviz/mermaid/tikz/... code block (new styling, new nodes, or a static image swapped for a rendered diagram, or vice versa), carry the same change into the matchingrendered_images:begin/rendered_images:endplaceholder in<TARGET>(see "Diagram Placeholders andwrap-content" intypst.rules.md) - Never edit the numbered
.pngfiles (<Chapter>.typ.figs/<Chapter>.<N>.png) or the#figure(image(...))calls by hand for content that already renders correctly.render_images.pyregenerates both on the next render - If a section gains or loses a rendered figure, every later
<N>shifts. After editing the placeholders, grep<TARGET>for\.typ\.figs/.*\.[0-9]+\.pngand renumber every#figure(image(...))call, and its matchinglabel=/caption=line, sequentially from 1 in document order - Carry caption or label wording changes like prose. If the diff renames or rewords
what a diagram depicts, update the figure's
caption=/caption:per "Figures: Required Elements" intypst.rules.md(sentence case, one plain line, no node-by-node listing)
Verification
-
--only_plan(check only this item): the plan is inbook_chapter.update_from_source.<INPUT_REF>.mdin the current dir, has theGenerated byline, and nothing was executed - Confirm every change in
<SOURCE>since<GIT_HASH>is reflected in<TARGET> - Confirm
<TARGET>still follows the style of its.claude/skills/*.rules.md(typst.rules.md,latex.rules.md, ormarkdown.rules.md) - Confirm
<TARGET>compiles- For
.typ, userender_book_chapter.py -i <TARGET>if Docker and graphviz work - Lighter syntax-only check without Docker. It avoids the image-tagging bug of
render_book_chapter.pyand re-rendering of sibling.typfiles under a runninggen_slides.py --daemon: stub the unrendered figure PNGs, then compile> typst compile --root . <TARGET> /tmp/check.pdf - After either check,
git status/git diffthe whole book directory, not just<TARGET>, to catch side effects on sibling chapters
- For
- Confirm every
// From: <SOURCE>:<LINE>comment points to the current line in<SOURCE> - [ ]
Установить Book Chapter.Update From Source в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Book Chapter.Update From Source?
Update a book's content to match changes in its source file
Как установить скилл Book Chapter.Update From Source?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Book Chapter.Update From Source запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic