Safely update Dex with one command (handles everything automatically)
Use this skill when someone wants the latest Dex capabilities or asks what an update would change. Keep the conversation plain and reassuring. The skill collects choices and renders lifecycle results; it never edits, copies, renames, deletes, or merges vault files itself.
Every lifecycle operation goes through core.lifecycle.service version 1.5.0. Treat its response as authoritative. Do not fall back to direct file operations, Git mutation, an update script, or a hand-built repair when the service refuses.
Use the service operations in this order:
build_and_preview_topology_migration to check the installed layout as part of the normal update read.build_inventory_and_plan for the verified inventory and ledger-aware plan.adopt items, ask build_and_preview_adoption for the exact preview and approval token.build_and_preview_conflict_resolution.execute_approved_adoption, and unchanged resolution previews and tokens to execute_approved_conflict_resolution.read_lifecycle_state for the verified post-update state and retention warning, then render every receipt.For a split vault whose update needs new release bytes, never ask the user to
run Git. Before presenting a delivery update, ask deliver_latest_release
through core.lifecycle.service. It proves the newest immutable release in an
isolated cache, fetches only that pinned tag and its release-channel ref into
Dex's private brain store, then proves the fetched bytes again. This delivery
step does not change vault content.
Only when delivery returns its exact release identity, ask
build_and_preview_delivered_release through core.lifecycle.service with
that identity. Show every returned write and ask: “Apply this exact update?”
Only a fresh explicit yes to that unchanged preview permits
execute_approved_delivered_release with the same preview and approval token.
Render its lifecycle receipt. Then ask read_lifecycle_state — the applied
version now appears in the same rewind list /dex-rollback uses. If delivery,
preview, or execution refuses, stop; no vault-content change was made.
Immediately after a successful apply, run the post-update canary — one
read-only walk through the same doors every later command will use. From the
vault root, run python3 core/health/post_update.py --vault . (the direct
file path matters: it keeps the canary runnable even when the installed
packages are the thing that broke). Relay its one-line result verbatim. On
failure, treat it as part of this update, not a separate errand: tell the user
plainly that the update applied but something is wrong underneath, and run
/dex-doctor now. Never report the update as complete while the canary is
failing.
Newly written .claude/skills/*/SKILL.md files are live in this session.
The host slash list may still omit them until the next session; that does not
make them unavailable. If the user asks for a skill that now has a SKILL.md
on disk, Read that file and follow it. Do not tell them to restart first.
If the service reports UNKNOWN, conflict, changed evidence, an unsafe path, or a rejected transaction, stop. Explain the refusal in ordinary language and leave the vault untouched. A refusal is a safety result, not an invitation to work around the engine.
The topology check can report that this Dex still keeps the product and the user's notes in one combined history. In that case, the service runs the shipped migrator in dry-run mode. This only prepares the local report; it does not start the move.
Render the topology preview in the same five groups used for the ordinary update. The proposed move appears under Needs your review. Show the complete report returned by the service and explain:
Ask: “Make this exact one-time change?” Only an explicit yes to this displayed report authorizes the move. The earlier request to “update Dex” is not approval. Pass the unchanged preview and approval token to execute_approved_topology_migration.
The lifecycle service owns the conversion and recovery loop. If the migrator returns exit code 75, the service routes it through resume until the bounded work is complete. Never run --auto, --resume, or the migrator directly from this skill.
After success, show the topology receipt, including its transaction identifier, final report, undo archive when present, and each auto/resume attempt. Ask build_and_preview_topology_migration again and continue with the ordinary update only when it reports the split as complete.
If the dry-run fails, the report changes before approval, approval is missing, conversion stops, or the final split cannot be proved, show the service refusal and stop. Do not improvise a repair.
After the topology branch (or at the start of a split-vault update), ask
build_and_preview_mcp_registration. This checks whether Dex's own
Customization Migration connection is missing from an older local setup.
needed is false, say that Dex's local connections are already current and continue.needed is true, show the returned server name and the complete write preview. Explain: “Dex will add this one Dex-owned local connection. It will not replace, remove, or alter any of your existing connections or their settings.” Ask: “Add this exact Dex connection?”execute_approved_mcp_registration. Render its transaction receipt, including the saved recovery snapshot.This is the only update route allowed to add this missing Dex-owned registration.
Never edit .mcp.json directly, replace an existing server entry, or treat the
earlier update approval as approval for this connection change.
Before applying an update, collect the deep Doctor report with
python3 core/utils/doctor.py --deep. JSON is stdout-only; progress is stderr.
This returns JSON on stdout: every check with a verdict (OK / OFF / BROKEN / UNKNOWN), any
Tier-1 heals already applied, and an instruments block saying whether the doctor itself
ran completely. While it runs, stderr prints Checking this Dex install (read-only)....
If the collector itself fails to run: that IS the
finding. Report it first, with the error. Use that report to decide whether to offer this
branch. Offer it when customization_assessment.completeness is OK and
customization_assessment.identity.customization_count is at least 1, or when the user says
they have customised Dex heavily. If the verified count is zero, follow the normal lightweight update
path and do not mention this branch. If completeness is UNKNOWN, or the report has no
customization_assessment, show Doctor's uncertainty
and do not infer a zero count. When Doctor returns partial: true, show the observed
records and every exclusion path, reason, and guidance as a partial inventory. Do not
run the Capsule preview or ask for Capsule approval until reassessment returns
completeness OK.
Render what the assessment found through /dex-doctor Step 3b's authority rules, including
all four returned groups. Explain that this journey inventories what the user changed,
preserves the evidence in a protected snapshot called the Capsule, guides the update through
the existing approval flow, and then offers the rebuild with this exact promise: “rebuilds
your customisations on the new version, shows you anything it can't safely carry forward,
and the declared write set is previewed and snapshotted; rewind remains available while its
snapshot is retained among the newest three and the activated files remain unchanged.”
A Capsule is a protected local snapshot of the evidence for every customization. It is stored
under System/.dex/, is never uploaded, and survives the update. This is not an automatic
rebuild: candidate planning, staging, activation, and rewind each keep their own authority
boundary.
Run python3 -m core.customization_migration.cli preview. Show every returned preview line and
the preview_sha256 verbatim. Then ask: “Create this exact snapshot?” The earlier request to
“update Dex” is not approval.
Only after a fresh explicit yes, run
python3 -m core.customization_migration.cli create --confirm-token PREVIEW_SHA256 with the
unchanged digest from that preview. The returned Capsule receipt is authority: render its
capsule_id, file_count, byte_count, and transaction_id verbatim. Do not say the
evidence is preserved until that receipt exists.
After the Capsule receipt exists, return to the one-route lifecycle above and use its normal preview and approval flow unchanged. Conflicts still offer Keep mine / Take theirs / Keep both, with Compare available before the user chooses. Capsule approval never counts as update or conflict approval.
Read migration_status_to_dict through Doctor's customization_migration_status section or the
registered Customization Migration MCP status tool. Reproduce the Capsule id, state, validation
status, mismatches, and pending flag. Say the Capsule is intact only when its validation status
is OK; otherwise say the preserved evidence cannot be verified and follow /dex-update
guidance without inventing repair steps.
Run the deep customization assessment again and render it through the Step 3b authority rules.
State plainly which customizations are in update-replaceable-location and which are in
update-untouched-location. Do not rename those groups or claim that a location predicts an
automatic rebuild.
Read the Capsule evidence only through the registered MCP. Use
read_customization_capsule_section for evidence and
read_customization_capsule_blob with the exact Capsule id and SHA-256 for source bytes.
Author candidates only from that evidence and those readable blobs. Classify an item
manual when its source is restricted or model-unreadable; never reconstruct it from memory.
Author one canonical candidate in a local scratch file outside the vault named
CANDIDATE_JSON. The no-token stage command
makes no vault write: it parses the closed candidate shape and delegates to validate_regeneration_candidate before it returns a preview. Run that preview before proposing the candidate.
Every customization must have exactly one disposition; never omit an item or use model
confidence as verification.
Present every disposition and its evidence. If an item is blocked or needs manual review, present one question at a time. Update and revalidate the candidate after each answer. Do not stage while required questions remain unresolved or exact-set validation refuses the candidate.
Run python3 -m core.customization_migration.cli stage CANDIDATE_JSON to obtain the private
staging preview. Render every line, including every disposition, future live path, and
preview_sha256. Ask: “Stage this exact candidate for verification?” Capsule approval and
update approval do not count.
Only after a fresh explicit yes, run
python3 -m core.customization_migration.cli stage CANDIDATE_JSON --confirm-token PREVIEW_SHA256
with the unchanged token. Render the CLI's safe staging receipt summary.
Run python3 -m core.customization_migration.cli verify CAPSULE_ID PROPOSAL_ID to preview
the verification verdict and obtain VERIFICATION_TOKEN; this makes no verification-report
write. Ask: “Seal this exact verification report?” Only after a fresh explicit yes, run
python3 -m core.customization_migration.cli verify CAPSULE_ID PROPOSAL_ID --confirm-token VERIFICATION_TOKEN.
Render only the CLI's safe verification and receipt summaries. Treat a result as
verified only when the engine says verified. If the returned per-item value is manual, render manual; if it is
unknown, render unknown. Never promote either one, and never describe a blocked report as
complete.
Run
python3 -m core.customization_migration.cli preview-activation CAPSULE_ID PROPOSAL_ID.
Render every live path, every disposition, the snapshot-retention note, the rewind note, and
approval_token verbatim. Ask: “Activate this exact verified rebuild?” A fresh explicit yes
must be bound to the displayed token: an earlier yes is not this yes.
Only after that yes, run
python3 -m core.customization_migration.cli activate CAPSULE_ID PROPOSAL_ID --confirm-token APPROVAL_TOKEN.
Render only the CLI's safe activation receipt summary; candidate-controlled free text and
complete file-list payloads are deliberately not printed. Then run
python3 -m core.customization_migration.cli activation-status CAPSULE_ID and state rewind
availability only from its returned rewindable value.
When the user asks to undo the activation, run
python3 -m core.customization_migration.cli preview-rewind CAPSULE_ID. Render every restore
path, whether it existed before activation, the reason, and acknowledgement_token verbatim.
Explain that rewind restores the exact pre-activation live file state. It does not undo
external actions from manual verification, and it refuses after unsafe live drift or lost
snapshot evidence.
Ask: “Rewind this exact activation?” Only after a fresh explicit yes, run
python3 -m core.customization_migration.cli rewind CAPSULE_ID --acknowledge-token ACKNOWLEDGEMENT_TOKEN.
Render the CLI's safe rewind receipt summary, then run
python3 -m core.customization_migration.cli activation-status CAPSULE_ID again. Never infer a
successful rewind from command exit alone.
Status and Doctor return an exact phase-specific recovery action for interrupted staging,
interrupted activation, and interrupted rewind. Show the returned phase, Capsule, proposal,
and action verbatim. Ask for a fresh explicit acknowledgement, then run only the returned
python3 -m core.customization_migration.cli recover --confirm-token RECOVERY_TOKEN action.
The engine restores the interrupted transaction to its last complete state; re-run status
before continuing the relevant stage, activation, or rewind preview.
A half-created Capsule can instead appear as recovery-required or with UNKNOWN validation.
Never claim its evidence is preserved before a Capsule receipt exists. Show that status, ask
for a fresh explicit acknowledgement, then route abandonment through
python3 -m core.customization_migration.cli abandon CAPSULE_ID --acknowledge. After a
confirmed abandonment, run the preview again and require a new exact-snapshot approval. If
the deterministic adapter refuses any action, show the refusal and stop.
Always show these groups in this order, even when a group is empty:
adopt.skip-held-back.Example register:
Here’s exactly what this changes for you. Two items are new and safe, one customized item stays untouched, and everything else is already current.
Do not describe an item as safe merely because its name looks familiar. Use only the action and reasons returned by the service.
For each conflicted file, explain that the user changed it and the update carries a new release version. Offer:
{name}-custom, where it stays invocable. The whole change remains rewindable.” Offer this only for a modified skill file. A missing file has nothing to preserve.Collect one take-theirs or keep-both strategy for each item the user wants resolved. Leave Keep mine items out of the request. Pass only those selected strategies to build_and_preview_conflict_resolution, one object per item to resolve, each naming that item and its chosen strategy.
The resolution preview is a separate approval boundary. Show every write exactly as returned, including its path, release or preserved source, SHA-256, and byte size. Explain which canonical file becomes live and which -custom sidecar preserves the user's bytes. Ask: “Apply this exact resolution?” Only an explicit yes to that unchanged preview and approval token permits execute_approved_conflict_resolution.
If Keep both is refused because a {name}-custom already exists, reassure the user that neither file changed and re-offer Keep mine, Take theirs, or Compare. Never overwrite, rename, merge, or number the existing sidecar.
Before execution, show:
Ask one direct question: “Apply this exact update?” for an adoption preview, or “Apply this exact resolution?” for a conflict preview. A vague earlier request to “update Dex” is not approval of a later concrete preview. If anything changes between preview and execution, render the service refusal and build a fresh preview only after the user asks to continue.
After success, render the receipt returned by execute_approved_adoption,
execute_approved_conflict_resolution, or execute_approved_delivered_release:
dex-release at the installed version);read_lifecycle_state.Use language such as:
Update complete. Dex committed one protected transaction and recorded a receipt for every changed file. Your own content was not part of the write set.
Never claim success from a command exit alone. Success means the service returned a committed receipt and the post-update lifecycle state verifies it.
A result whose kept_reasons names lines edited directly into CLAUDE.md means
the update completed and deliberately left that one file untouched. Explain
that plainly (nothing failed, nothing was lost), show the named lines, and
offer to carry them into CLAUDE-custom.md so the next update writes cleanly.
If the user says yes, classify each named line before touching anything — a blind append causes real harm:
Show the user the classified plan (which lines get which treatment) before writing, make the whole edit in one pass, and afterwards confirm the recompose carries every instruction — nothing may remain that exists only in the live file.
The user should see choices, consequences, and receipts. The lifecycle service owns every mutation.
npx skills add davekilleen/dex-update下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer