ワンクリックで
lenshub-upgrade
Upgrade lenshub to the latest version. Pulls from the remote repo, regenerates all SKILL.md files, and shows what's new.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Upgrade lenshub to the latest version. Pulls from the remote repo, regenerates all SKILL.md files, and shows what's new.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create BCG-style strategic slide decks as polished .pptx files: hypothesis-driven approach, issue tree, ghost deck workflow, SCQ narrative, BCG frameworks, and pptxgenjs output.
Post-plan-review smoke test. Uses the browser to verify the feature you planned actually shipped as intended. Produces a paste-ready QA report for PR descriptions and GitHub issues.
Create EY Consulting-style slide decks as polished .pptx files. Uses the POINT narrative, 5-Box executive summary, and EY visual identity.
Create McKinsey-style slide decks as polished .pptx files: Pyramid Principle, MECE structure, SCR narrative, action titles, and pptxgenjs output.
Sam Altman's review. Compounding leverage, AI-native thinking, moat building. "Does this matter in 10 years? Is there a version 10x better because of AI?"
Jeff Bezos's customer-obsession review. Works backwards from the press release. Asks: is this for the customer or for us? Will this matter in 10 years? Best for: plans where you're not sure if you're solving the right problem.
| name | lenshub-upgrade |
| version | 1.0.0 |
| platform | claude-code |
| description | Upgrade lenshub to the latest version. Pulls from the remote repo, regenerates all SKILL.md files, and shows what's new. |
| allowed-tools | ["Bash","Read","AskUserQuestion"] |
Upgrade lenshub to the latest version and show what's new.
This section is referenced by lenshub skill preambles when they detect UPGRADE_AVAILABLE.
First, check if auto-upgrade is enabled:
_AUTO_FILE="${HOME}/.lenshub/auto-upgrade"
_AUTO=""
[ "${LENSHUB_AUTO_UPGRADE:-}" = "1" ] && _AUTO="true"
[ -z "$_AUTO" ] && [ -f "$_AUTO_FILE" ] && _AUTO=$(cat "$_AUTO_FILE")
echo "AUTO_UPGRADE=$_AUTO"
If AUTO_UPGRADE=true or AUTO_UPGRADE=1: Skip AskUserQuestion. Log "Auto-upgrading lenshub v{old} → v{new}..." and proceed directly to Step 2.
Otherwise, use AskUserQuestion:
If "Yes, upgrade now": Proceed to Step 2.
If "Always keep me up to date":
mkdir -p "${HOME}/.lenshub"
echo "true" > "${HOME}/.lenshub/auto-upgrade"
Tell user: "Auto-upgrade enabled. Future updates will install automatically." Then proceed to Step 2.
If "Not now": Write snooze state with escalating backoff (first snooze = 24h, second = 48h, third+ = 1 week), then continue with the current skill.
_SNOOZE_FILE="${HOME}/.lenshub/update-snoozed"
_REMOTE_VER="{new}"
_CUR_LEVEL=0
if [ -f "$_SNOOZE_FILE" ]; then
_SNOOZED_VER=$(awk '{print $1}' "$_SNOOZE_FILE")
if [ "$_SNOOZED_VER" = "$_REMOTE_VER" ]; then
_CUR_LEVEL=$(awk '{print $2}' "$_SNOOZE_FILE")
case "$_CUR_LEVEL" in *[!0-9]*) _CUR_LEVEL=0 ;; esac
fi
fi
_NEW_LEVEL=$((_CUR_LEVEL + 1))
[ "$_NEW_LEVEL" -gt 3 ] && _NEW_LEVEL=3
mkdir -p "${HOME}/.lenshub"
echo "$_REMOTE_VER $_NEW_LEVEL $(date +%s)" > "$_SNOOZE_FILE"
Tell user the snooze duration: "Next reminder in 24h" (or 48h or 1 week, depending on level).
If "Never ask again":
mkdir -p "${HOME}/.lenshub"
touch "${HOME}/.lenshub/no-update-check"
Tell user: "Update checks disabled. Delete ~/.lenshub/no-update-check to re-enable."
Continue with the current skill.
The ./setup script symlinks the repo into ~/.claude/skills/lenshub. Resolve the symlink to get the real repo root so git operations work correctly.
LINK="${HOME}/.claude/skills/lenshub"
if [ -e "$LINK" ]; then
# Resolve the symlink to the real repo (handles both symlinked and direct clones)
INSTALL_DIR="$(cd "$LINK" && pwd -P)"
else
echo "ERROR: lenshub not found at ~/.claude/skills/lenshub"
echo "Run ./setup from the lenshub repo to install."
exit 1
fi
echo "Install dir: $INSTALL_DIR"
OLD_VERSION=$(node -e "console.log(require('${INSTALL_DIR}/package.json').version)" 2>/dev/null \
|| python3 -c "import json; print(json.load(open('${INSTALL_DIR}/package.json'))['version'])" 2>/dev/null \
|| echo "unknown")
For git installs:
cd "$INSTALL_DIR"
STASH_OUTPUT=$(git stash 2>&1)
git fetch origin
git reset --hard origin/main
bun run gen:skill-docs
If $STASH_OUTPUT contains "Saved working directory", warn: "Note: local changes were stashed. Run git stash pop in the lenshub directory to restore them."
If bun is not available:
command -v bun >/dev/null 2>&1 || {
echo "⚠️ bun not found — SKILL.md files not regenerated."
echo " Install bun: curl -fsSL https://bun.sh/install | bash"
echo " Then run: cd $INSTALL_DIR && bun run gen:skill-docs"
}
mkdir -p "${HOME}/.lenshub"
echo "$OLD_VERSION" > "${HOME}/.lenshub/just-upgraded-from"
rm -f "${HOME}/.lenshub/update-snoozed"
Read $INSTALL_DIR/CHANGELOG.md. Find all entries between the old version and the new version. Summarize as 5-7 bullets grouped by theme. Focus on user-facing changes — new lenses, updated review sections, new delight features. Skip internal refactors unless significant.
Format:
lenshub v{new} — upgraded from v{old}!
What's new:
- [bullet 1]
- [bullet 2]
- ...
Happy reviewing!
After showing What's New, continue with whatever the user originally invoked. The upgrade is done.
When invoked directly as /lenshub-upgrade (not from a preamble):
Run Step 2–6 above. If already on the latest version:
cd "$INSTALL_DIR" && git fetch origin --quiet 2>/dev/null
LOCAL=$(node -e "console.log(require('./package.json').version)" 2>/dev/null || echo "")
REMOTE=$(git show origin/main:package.json 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin)['version'])" 2>/dev/null || echo "")
If LOCAL = REMOTE, tell the user: "lenshub is already up to date (v{version}). All SKILL.md files are current."
Every lenshub skill should run this at the top before doing anything else:
_UPD=$(~/.claude/skills/lenshub/scripts/lenshub-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
If output shows UPGRADE_AVAILABLE <old> <new>: read ~/.claude/skills/lenshub/skills/lenshub-upgrade/SKILL.md and follow the "Inline upgrade flow" above.
If output shows JUST_UPGRADED <from> <to>: tell user "Running lenshub v{to} (just updated!)" and continue.