
Dbskill Upgrade
Upgrade the installed dbskill pack under ~/.claude/skills to the latest GitHub release with backup, version compare, and a clear changelog-style summary.
Overview
dbskill-upgrade is an agent skill for the Operate phase that upgrades the local dbskill installation from GitHub with version checks, backup, and replacement.
Install
npx skills add https://github.com/dontbesilent2025/dbskill --skill dbskill-upgradeWhat is this skill?
- 7-step upgrade flow: detect install, read local VERSION, fetch remote, compare, backup, clone, replace
- Triggers: /dbskill-upgrade, /升级dbskill, or natural language「升级 dbskill」
- Install guard for $HOME/.claude/skills/dbs with explicit error if missing
- Timestamped backup directory under ~/.claude/skills/.dbskill-backup-* before overwrite
- Shallow git clone from dontbesilent2025/dbskill main for latest payload
- 7 documented upgrade steps from detect install through replace old version
Adoption & trust: 1.7k installs on skills.sh; 6.3k GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your ~/.claude/skills dbskill copy is stale and you do not know whether upgrading will overwrite custom tweaks without a rollback path.
Who is it for?
Claude Code users who installed dbskill locally and want a repeatable, documented upgrade ritual with version diff messaging.
Skip if: Builders not using dbskill under ~/.claude/skills, or environments where git clone and raw GitHub fetch are blocked without a mirror.
When should I use this skill?
/dbskill-upgrade, /升级dbskill, 「升级 dbskill」, or user asks to upgrade dbskill to latest.
What do I get? / Deliverables
You end on the latest remote VERSION with a pre-upgrade backup folder and explicit messaging when already up to date or when fetch/clone fails.
- Updated dbskill tree at install location
- Timestamped .dbskill-backup-* snapshot when upgrade runs
- User-facing old vs remote version summary
Recommended Skills
Journey fit
Skill pack maintenance is shelved under Operate → iterate because it keeps your agent toolchain current after you are already shipping with dbskill. Iterate covers repeatable housekeeping—version detection, remote fetch, backup, clone, and replace—without changing product features.
How it compares
Skill-package maintainer flow, not an application deploy pipeline or npm-style global CLI update.
Common Questions / FAQ
Who is dbskill-upgrade for?
Solo developers who keep dontbesilent2025 dbskill in ~/.claude/skills and want the agent to run a standardized upgrade when they type /dbskill-upgrade or ask to upgrade dbskill.
When should I use dbskill-upgrade?
During Operate iterate when upstream releases a new VERSION, after noticing behavior changes in dbskill docs, or before a long coding session to ensure skills match main.
Is dbskill-upgrade safe to install?
It performs rm -rf and git clone under your skills directory—review the Security Audits panel on this page, verify the backup step succeeded, and inspect cloned content before deleting backups.
SKILL.md
READMESKILL.md - Dbskill Upgrade
# dbskill-upgrade 升级 dbskill 到最新版本,显示更新内容。 ## 使用场景 - 用户主动调用 `/dbskill-upgrade` 升级 - 显示版本变化和更新内容 ## 升级流程 ### Step 1: 检测安装位置 ```bash if [ -d "$HOME/.claude/skills/dbs" ]; then INSTALL_DIR="$HOME/.claude/skills" echo "Install location: $INSTALL_DIR" else echo "ERROR: dbskill not found in ~/.claude/skills/" exit 1 fi ``` ### Step 2: 获取当前版本 ```bash OLD_VERSION=$(cat "$HOME/.claude/skills/dbskill-upgrade/../../VERSION" 2>/dev/null || echo "unknown") echo "Current version: $OLD_VERSION" ``` ### Step 3: 获取远程版本 ```bash REMOTE_VERSION=$(curl -sL https://raw.githubusercontent.com/dontbesilent2025/dbskill/main/VERSION || echo "") if [ -z "$REMOTE_VERSION" ]; then echo "ERROR: Cannot fetch remote version" exit 1 fi echo "Remote version: $REMOTE_VERSION" ``` ### Step 4: 比较版本 如果 `OLD_VERSION` 等于 `REMOTE_VERSION`,告诉用户已是最新版本,结束。 否则继续升级。 ### Step 5: 备份当前版本 ```bash BACKUP_DIR="$HOME/.claude/skills/.dbskill-backup-$(date +%Y%m%d-%H%M%S)" mkdir -p "$BACKUP_DIR" cp -r "$HOME/.claude/skills"/dbs* "$BACKUP_DIR/" 2>/dev/null || true echo "Backup created: $BACKUP_DIR" ``` ### Step 6: 下载最新版本 ```bash TMP_DIR=$(mktemp -d) git clone --depth 1 https://github.com/dontbesilent2025/dbskill.git "$TMP_DIR/dbskill" if [ $? -ne 0 ]; then echo "ERROR: Failed to clone repository" exit 1 fi echo "Downloaded to: $TMP_DIR/dbskill" ``` ### Step 7: 替换旧版本 ```bash rm -rf "$HOME/.claude/skills"/dbs* cp -r "$TMP_DIR/dbskill/skills"/dbs* "$HOME/.claude/skills/" rm -rf "$TMP_DIR" echo "Upgrade completed" ``` 如果复制失败,从备份恢复: ```bash if [ $? -ne 0 ]; then echo "ERROR: Upgrade failed, restoring from backup..." rm -rf "$HOME/.claude/skills"/dbs* cp -r "$BACKUP_DIR"/* "$HOME/.claude/skills/" echo "Restored from backup" exit 1 fi ``` ### Step 8: 显示更新内容 读取 `$HOME/.claude/skills/dbs/../../README.md`(如果存在),提取从 `OLD_VERSION` 到 `REMOTE_VERSION` 之间的更新内容。 格式: ``` dbskill v{REMOTE_VERSION} — 从 v{OLD_VERSION} 升级成功! 更新内容: - [从 README 提取的更新要点] 升级完成! ``` ### Step 9: 清理备份 询问用户是否删除备份: ```bash echo "Backup location: $BACKUP_DIR" echo "Keep backup? (will be auto-deleted in 7 days if not used)" ``` 不强制删除,让用户自己决定。 ## 错误处理 - 网络失败:提示用户检查网络连接 - Git clone 失败:从备份恢复 - 文件复制失败:从备份恢复 ## 注意事项 - 只支持通过 `~/.claude/skills/` 安装的版本 - 升级前自动备份,失败时自动恢复 - 不需要用户手动操作 git