Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Slides.Update From Source

БесплатноБез исполняемых скриптовНе проверен

Update slides to match changes in the source slides they cite

gpsaggeseот gpsaggese★ 158 звёзд на GitHub

Об этом скилле

Goal

  • Given a slides file <TARGET> (.smd) whose slides cite their source slides with // From: <SOURCE>:<LINE> '<source line>' comments, find what changed in each <SOURCE> and incorporate it into the citing slide of <TARGET>

  • Optionally, the user passes a scope (a slide title or a line range in <TARGET>). Then process only the slides in that scope

Plan Only (--only_plan)

  • With --only_plan, follow .claude/skills/skill.rules.md section "Create Only a Plan with --only_plan"
  • Write the plan to slides.update_from_source.<INPUT_REF>.md, then stop without executing the skill

Workflow

  • Read the conventions in .claude/skills/slides.rules.md, especially ## Source Attribution (// From: ...)

List the Citations

  • Extract every // From: line of <TARGET> with its line number
    > grep -n "^// From:" <TARGET>
    
  • Attach each citation to the nearest preceding * <slide title> line
  • Skip a bare // From: ... (nothing after the colon). It marks a slide with no identified source. Do not guess a source and do not drop the line
  • Group the citations by <SOURCE> file, so each <SOURCE> is read once

Resolve Each Source Slide

  • Check that <SOURCE> exists. If it does not, report it and go to the next citation
  • Find the current position of the cited line in <SOURCE>
    • Search for the verbatim '<source line>' text, including its leading marker (* , #, ## , ### ). <LINE> drifts whenever <SOURCE> is edited above it
      > grep -nF -- '<source line>' <SOURCE>
      
    • If several lines match, pick the one closest to the recorded <LINE>
    • If nothing matches, the source slide was renamed, moved, or deleted
      • Search for the title text without its marker, and for a close variant
      • If a single clear candidate exists, use it and record the new text in the // From: line
      • If no candidate exists, report "source missing", leave the slide and its // From: line unchanged, and go to the next citation
  • Extract the source content
    • For a * <slide title> line: the lines up to the next * slide or # header line
    • For a #, ##, ### header line: the lines up to the next header of the same or higher level. Only the part matching the citing slide's topic is relevant
    • For a - [P<NNN>] or - [B<NNN>] entry in related_papers.md or related_books.md: the entry itself. Compare only its text (authors, title, year, link) with the reference used in the slide

Find What Changed

  • The optional <BASE> (a Git hash) is the version of <SOURCE> the slide was last synced with
    • If the user passes it, use it
    • Otherwise, use the last commit that touched <TARGET>:
      > git log -1 --format=%H -- <TARGET>
      
  • Get the diff of <SOURCE> once per file, not once per slide:
    > git diff <BASE> -- <SOURCE>
    
    • Use the diff as a hint to find the changed slides fast
    • Always compare the current source text with the citing slide text too, because a slide may have been synced from an older version than <BASE>
  • Compare the source content with the citing slide and classify each difference
    • Substantive (incorporate it)
      • A new or changed definition, claim, number, equation, or example
      • A new bullet that adds an idea absent from the slide
      • A retracted or corrected fact
      • A changed graphviz, mermaid, tikz code block or image link
    • Cosmetic (ignore it)
      • Rewording, reordering, or formatting that the slide already adapted
      • Tag, bold, or punctuation changes that only follow slides.rules.md

Incorporate Changes

  • Edit the citing slide of <TARGET> to reflect every substantive change
  • Keep the slide as an adaptation, not a copy
    • Keep the slide title, the structure, and the wording the author already adapted
    • Rename the slide only if the change renames the concept
    • Do not paste the source text over the slide
  • When a slide cites several sources, reconcile each // From: line in turn
    • Keep the content that comes from the other sources
    • Remove content only if its own source dropped or retracted it
  • Do not delete slide content only because the source has no counterpart. The slide may combine several sources or add its own material. Remove content only when the diff shows the fact or example was changed or retracted, not moved
  • Write the new text following .claude/skills/slides.rules.md
    • E.g., semantic tags, 80 columns, no back-reference to other lessons, no dashes as punctuation
  • If a change needs a decision from the user (e.g., the source restructured one slide into three), do not guess. Leave the slide unchanged and report the question

Update the // From: Lines

  • Rewrite each resolved // From: line to the current position and text of its source line
    // From: <SOURCE>:<NEW_LINE> '<NEW_SOURCE_LINE>'
    
    • <NEW_LINE> is
Полный SKILL.md на GitHub

Установить Slides.Update From Source в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Slides.Update From Source?

Update slides to match changes in the source slides they cite

Как установить скилл Slides.Update From Source?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Slides.Update From Source запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Slides.Update From Source с