用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/marktoda/everclaw --skill update命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | update |
| description | Safely pull upstream everclaw changes into a fork — backup, merge, migrate, validate |
Safely merge upstream everclaw changes while preserving local customizations. Creates a backup, previews changes, resolves conflicts, runs new migrations, and validates.
Work through each phase in order. Use TaskCreate to track progress. Be autonomous: detect problems, fix them, only ask when a real choice is needed. Minimize token usage — use git commands for inspection, don't read files unnecessarily.
Run these checks in parallel:
Clean working tree — git status --porcelain. If dirty, stop and tell the user to commit or stash first. Do NOT offer to stash for them.
Upstream remote — git remote get-url upstream 2>/dev/null. If missing, add it:
git remote add upstream https://github.com/marktoda/everclaw.git
If the user's fork is from a different URL, use AskUserQuestion to confirm the upstream URL.
Detect upstream branch — Check git branch -r | grep upstream/ for main or master. Default to main.
Fetch upstream — git fetch upstream --prune.
Report what was found.
Create a safety net before any changes:
SHORT=$(git rev-parse --short HEAD)
TS=$(date +%Y%m%d-%H%M%S)
TAG="pre-update-${SHORT}-${TS}"
git branch "backup/${TAG}"
git tag "${TAG}"
Report the backup tag — this is the rollback point.
Compute the merge base and show what's coming:
BASE=$(git merge-base HEAD upstream/main)
Upstream commits since divergence:
git log --oneline $BASE..upstream/main
Local commits since divergence:
git log --oneline $BASE..HEAD
Changed files — run git diff --name-only $BASE..upstream/main and categorize:
src/): may conflict if user modified same filessql/): new migrations to applyskills/): unlikely to conflictscripts/): unlikely to conflictpackage.json, tsconfig.json, docker-compose.yml, Dockerfile): needs reviewCLAUDE.md, README.md, docs/): informationalPresent the summary, then use AskUserQuestion:
How do you want to proceed?
- Full merge (Recommended) — Merge all upstream changes
- Cherry-pick — Select specific commits
- Abort — Just view the changelog, don't change anything
If aborted, stop here.
Before making real changes, test the merge:
git merge --no-commit --no-ff upstream/main 2>&1
Check for conflicts with git diff --name-only --diff-filter=U. Then abort the test merge:
git merge --abort
If conflicts were found, show them to the user and explain which files will need manual resolution. Ask if they want to continue.
Full merge:
git merge upstream/main --no-edit
If conflicts occur:
git add each resolved filegit commit --no-edit to complete the mergeCherry-pick:
AskUserQuestion to ask which commits (by hash)git cherry-pick <hash1> <hash2> ...Check if any new SQL files were added upstream:
git diff --name-only --diff-filter=A $BASE..HEAD -- sql/
If new migrations exist:
001-, 002-, etc.)AskUserQuestion to ask deployment method:
New SQL migrations detected. How is your database running?
- Docker Compose — Migrations run automatically on next restart
- Bare metal — Apply migrations now with psql
For bare metal, run each new migration in order:
psql "$DATABASE_URL" -f sql/<new-migration>.sql
For Docker Compose, note that migrations will apply on next container rebuild.
Check if package.json or pnpm-lock.yaml changed:
git diff --name-only $BASE..HEAD -- package.json pnpm-lock.yaml
If changed, run:
pnpm install
Verify it succeeds.
Run in sequence:
Type check:
npx tsc --noEmit
Tests:
pnpm test
If either fails:
Check if CHANGELOG.md was modified:
git diff ${TAG}..HEAD -- CHANGELOG.md
Look for lines starting with [BREAKING]. If found, display each one and explain what action the user needs to take.
Report:
Provide the rollback command:
git reset --hard <backup-tag>
And restart instructions:
docker compose down && docker compose up --build -dnode src/index.tsDone.