lenshub-upgrade
Upgrade lenshub to the latest version. Pulls from the remote repo, regenerates all SKILL.md files, and shows what's new.
Best use case
lenshub-upgrade is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Upgrade lenshub to the latest version. Pulls from the remote repo, regenerates all SKILL.md files, and shows what's new.
Teams using lenshub-upgrade should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/lenshub-upgrade/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How lenshub-upgrade Compares
| Feature / Agent | lenshub-upgrade | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Upgrade lenshub to the latest version. Pulls from the remote repo, regenerates all SKILL.md files, and shows what's new.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run gen:skill-docs -->
# /lenshub-upgrade
Upgrade lenshub to the latest version and show what's new.
## Inline upgrade flow
This section is referenced by lenshub skill preambles when they detect `UPGRADE_AVAILABLE`.
### Step 1: Ask the user (or auto-upgrade)
First, check if auto-upgrade is enabled:
```bash
_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:
- Question: "lenshub **v{new}** is available (you're on v{old}). Upgrade now?"
- Options: ["Yes, upgrade now", "Always keep me up to date", "Not now", "Never ask again"]
**If "Yes, upgrade now":** Proceed to Step 2.
**If "Always keep me up to date":**
```bash
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.
```bash
_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":**
```bash
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.
### Step 2: Find the install directory
The `./setup` script symlinks the repo into `~/.claude/skills/lenshub`. Resolve the symlink to get the real repo root so `git` operations work correctly.
```bash
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"
```
### Step 3: Save old version
```bash
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")
```
### Step 4: Pull and regenerate
**For git installs:**
```bash
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:
```bash
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"
}
```
### Step 5: Write marker and clear snooze
```bash
mkdir -p "${HOME}/.lenshub"
echo "$OLD_VERSION" > "${HOME}/.lenshub/just-upgraded-from"
rm -f "${HOME}/.lenshub/update-snoozed"
```
### Step 6: Show what's new
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!
```
### Step 7: Continue
After showing What's New, continue with whatever the user originally invoked. The upgrade is done.
---
## Standalone usage
When invoked directly as `/lenshub-upgrade` (not from a preamble):
Run Step 2–6 above. If already on the latest version:
```bash
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."
---
## Adding the update check to a lenshub skill preamble
Every lenshub skill should run this at the top before doing anything else:
```bash
_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.Related Skills
plan-musk
Elon Musk's first-principles engineering review. Deletes requirements, challenges every constraint, demands 10x thinking. "The best part is no part."
plan-jobs
Steve Jobs's product review. Obsesses over simplicity and user experience. Says no to 1000 things. Starts from what the user feels, not the architecture.
plan-feynman
Richard Feynman's clarity and rigor review. If you can't explain it simply, you don't understand it. Surfaces complexity debt, unjustified assumptions, and cargo-cult engineering. Best for: plans that feel complex but you can't articulate why.
plan-board
Board-level meta-synthesis. Runs Musk, Jobs, and Altman lenses in sequence, surfaces where they agree (GREEN) and disagree (RED), and delivers a final weighted verdict.
plan-bezos
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.
plan-altman
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?"
mckinsey-slide
Create McKinsey-style slide decks as polished .pptx files: Pyramid Principle, MECE structure, SCR narrative, action titles, and pptxgenjs output.
ey-slide
Create EY Consulting-style slide decks as polished .pptx files. Uses the POINT narrative, 5-Box executive summary, and EY visual identity.
browse-qa
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.
bcg-slide
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.
framework-migration-deps-upgrade
You are a dependency management expert specializing in safe, incremental upgrades of project dependencies. Plan and execute dependency updates with minimal risk, proper testing, and clear migration pa
dependency-upgrade
Master major dependency version upgrades, compatibility analysis, staged upgrade strategies, and comprehensive testing approaches.