Command Palette

Search for a command to run...

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

luna-upgrade

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

Use when checking or upgrading one luna-second-brain vault to the current himmel template.

yotamleo-orgот yotamleo-org★ 15 звёзд на GitHub

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

luna-upgrade — content-preserving vault/template upgrade

You bring an EXISTING luna-second-brain vault up to the current himmel template without clobbering the user's own content. Vaults are scaffolded once and never re-read the template; this is the upgrade path. The engine that does all the work is templates/luna-second-brain/scripts/upgrade.sh — this skill is the ergonomic dry-run → confirm → apply surface around it. ALL classification, 3-way merge, conflict handling, and fail-closed recovery logic lives in upgrade.sh; this runbook only orchestrates the preview/confirm/apply sequence and surfaces the engine's output. Do NOT reimplement any merge logic here.

Invocation surfaces

  • User prompt: /luna-upgrade [--vault <path>] [--template-dir <path>] — the skill answers to its own name.
  • Programmatic Skill-tool dispatch (no headless claude): Skill { skill: "obsidian-triage:luna-upgrade", args: "<flags...>" }.

Wherever this document references $ARGUMENTS, treat it as the literal arg string supplied via either path.

Inputs

$ARGUMENTS is [--check] [--vault <path>] [--template-dir <path>] (all optional).

  • --check — report whether an upgrade is available and stop (no plan, no confirm, no changes). See "Check-only mode" below.
  • --vault <path> — the vault to upgrade. Default: resolve from the current session (see Step 1).
  • --template-dir <path> — explicit himmel template root override. Default: resolve the himmel checkout (see Step 0). The engine's own resolver order is --template-dir > $HIMMEL_DIR > generic $HOME-relative candidate paths > sibling scan, so on a normal layout you pass neither flag.

Check-only mode (--check)

When --check is in $ARGUMENTS, do Steps 0 and 1 (locate himmel + the vault), then run the engine in check mode and surface its single-line result verbatim — do NOT run the dry-run/confirm/apply sequence:

bash "$UPGRADE" --template-dir "$TEMPLATE" --vault-dir "$VAULT" --check

It prints either luna-second-brain: template vX.Y.Z available … (an upgrade exists — tell the operator they can run /luna-upgrade to apply it) or luna-second-brain: vault is current …. It changes nothing and exits 0. STOP after surfacing the line.

Step 0 — Locate himmel's upgrade.sh

A vault scaffolded BEFORE this feature has no scripts/upgrade.sh of its own yet, so always invoke himmel's copy (the first upgrade then installs upgrade.sh into the vault — it is overwrite-class). Resolve the himmel checkout the same way the engine resolves the template (explicit config wins, then generic home-relative candidates):

HIMMEL=""
for d in "${HIMMEL_DIR:-}" "$HOME/github/himmel" "$HOME/github/Himmel" \
         "$HOME/Documents/github/himmel" "$HOME/Documents/github/Himmel"; do
  [ -n "$d" ] && [ -f "$d/templates/luna-second-brain/scripts/upgrade.sh" ] \
    && { HIMMEL="$d"; break; }
done

If --template-dir <path> was passed, set HIMMEL so that $HIMMEL/templates/luna-second-brain equals that path (or pass the flag straight through). If HIMMEL stays empty, stop and tell the operator to set HIMMEL_DIR or pass --template-dir — do NOT guess a path. Define:

TEMPLATE="$HIMMEL/templates/luna-second-brain"
UPGRADE="$TEMPLATE/scripts/upgrade.sh"

This probe is best-effort and only locates upgrade.sh; the engine re-resolves and re-validates the template itself (and warns if multiple checkouts match), so the engine's resolution is authoritative — do not treat this snippet's result as final.

Step 1 — Resolve the vault root

If --vault <path> was passed, use it. Otherwise resolve the current session's vault: walk up from $PWD to the nearest ancestor that contains a .obsidian/ directory or a .vault-template.json stamp; if none is found, use $PWD. Confirm the resolved $VAULT looks like a vault (it has .obsidian/ or .vault-template.json); if it clearly is not one, stop and ask the operator to pass --vault.

Step 2 — Dry-run (preview)

Run the engine in preview mode — it touches nothing:

bash "$UPGRADE" --template-dir "$TEMPLATE" --vault-dir "$VAULT" --dry-run

Step 3 — Surface the plan

Show the operator the engine's plan output verbatim (which files WRITE / WRITE-NEW / MERGE-JSON / MERGE-3WAY / REPORT, and the template-vs-vault versions). Call out explicitly if the plan includes:

  • a MERGE-3WAY _CLAUDE.md line (their operating manual may merge or conflict), or
  • a changed .obsidian/PLUGINS-SETUP.md (the manual-install list reprints on apply).

If the dry-run reports the vault is already current (exit 0, "already current"), say so and STOP — nothing to do.

Step 4 — Confirm

Ask the operator to confirm they want to apply this plan to $VAULT. Wait for an explicit yes. If they decline, STOP — make no changes.

Step 5 — Apply

On confirmation, re-run the engine with --yes (same resolution, no prompt):

bash "$UPGRADE" --template-dir "$TEMPL
Полный SKILL.md на GitHub

Установить luna-upgrade в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл luna-upgrade?

Use when checking or upgrading one luna-second-brain vault to the current himmel template.

Как установить скилл luna-upgrade?

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

Скилл luna-upgrade запускает скрипты?

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

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

Сравнить luna-upgrade с