一键导入
uw-refresh
Use to update an existing Unwind analysis after code changes — re-analyzes only the affected layers instead of re-unwinding the whole codebase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use to update an existing Unwind analysis after code changes — re-analyzes only the affected layers instead of re-unwinding the whole codebase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use after unwind:uw-plan to EXECUTE the rebuild — interview the user about scope/order/target, dispatch technology-agnostic per-layer builder agents that reproduce the [MUST] contracts in the target stack, hold rebuild state in a local file, and maintain a source→target verification graph that measures completeness. Supports a loop-until-verified mode.
Use to visually explore the rebuild knowledge graph. Builds and launches the Unwind dashboard (React + React Flow + ELK) pointed at docs/unwind/rebuild-graph.json with coverage, priority, and contract views.
Optional. Publish the Unwind dashboard to the scanned project's GitHub Pages gh-pages branch so it's viewable at https://<owner>.github.io/<repo>/unwind/. Builds the dashboard at the correct sub-path and commits it into an `unwind/` subdir — never blatting an existing gh-pages branch. Confirms the target, then pushes.
Use when dispatched by unwind:uw-build to rebuild ONE layer/slice of a codebase in the target stack. Technology-agnostic builder that reproduces the layer's [MUST] contracts (API surface, data model, business rules) as idiomatic target-stack code and records the source→target mapping for verification.
Use when starting any reverse engineering task - establishes how to find and use Unwind skills for codebase analysis, service mapping, and documentation
Use after layer analysis is complete to interview the user about the rebuild strategy (target stack, what to keep vs rebuild, phasing, risk) and generate a data-grounded REBUILD-PLAN.md that records those decisions.
| name | uw-refresh |
| description | Use to update an existing Unwind analysis after code changes — re-analyzes only the affected layers instead of re-unwinding the whole codebase |
| allowed-tools | ["Read","Grep","Glob","Bash(git:*, mkdir:*, ls:*)","Bash(node:*)","Bash(pnpm:*)","Bash(source:*)","Read(docs/unwind/.cache/**)","Write(docs/unwind/**)","Edit(docs/unwind/**)","Task"] |
Keep the unwind docs and rebuild-graph.json fresh across a long migration
without re-unwinding everything. The deterministic scan fingerprints every
file; a refresh re-analyzes only the layers whose source actually changed and
flags previously-documented items whose source changed structurally as stale.
Requires: a prior full run (so docs/unwind/.cache/meta.json baseline + layer
docs + coverage/ exist).
Produces: updated layer docs, refreshed coverage/, and a regenerated
rebuild-graph.json with coverage: "stale" / rebuildStatus: "needs-recheck"
on changed contracts.
Graceful fallback: if
@unwind/core/Node/pnpm is unavailable, skip the deterministic steps and fall back to the legacyunwind:uw-analyzeRefresh Mode (re-run specialists with previous docs as context).
Run change detection against the baseline. Order matters — this must run before re-scanning, so the baseline still reflects the last analyzed state.
# Locate the installed Unwind plugin, then load the core helper.
# $0/BASH_SOURCE are unreliable under `bash -c`, so glob the install cache.
UNWIND_PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-${UNWIND_PLUGIN_ROOT:-}}"
[ -f "$UNWIND_PLUGIN_ROOT/skills/scripts/_resolve-plugin-root.sh" ] || \
UNWIND_PLUGIN_ROOT="$(ls -dt "$HOME"/.claude/plugins/cache/*/unwind/*/ 2>/dev/null | head -1)"
source "${UNWIND_PLUGIN_ROOT%/}/skills/scripts/_resolve-plugin-root.sh"
ensure_unwind_core || { echo "core unavailable — using legacy refresh"; }
node "$UNWIND_PLUGIN_ROOT/skills/scripts/detect-changes.mjs" "$(pwd)"
This writes docs/unwind/.cache/changes.json:
structural / added / removed — files whose contract surface movedcosmetic — body/comment-only edits (docs stay valid; no re-analysis)affectedLayers — the only layers that need re-analysisstaleItems — documented item ids whose source changed structurallynewItems — item ids in newly-added files (become gaps after verify)If structural, added, and removed are all empty → nothing to do; the
docs and graph remain valid. Stop here.
Re-run the scan to refresh scan-manifest.json + the meta.json baseline so
item ids match the current code:
node "$UNWIND_PLUGIN_ROOT/skills/scripts/scan.mjs" "$(pwd)"
node "$UNWIND_PLUGIN_ROOT/skills/scripts/seed-layers.mjs" "$(pwd)"
For each layer in changes.affectedLayers, dispatch the matching
unwind:analyzing-* specialist (see unwind:uw-analyze for dispatch
mechanics), seeded with docs/unwind/.cache/seeds/{layer}.json and the existing
layer docs as context. Instruct it to:
changes.newItems),changes.staleItems) — the signature moved,changes.removed files that no longer exist.Do not touch layers absent from affectedLayers.
node "$UNWIND_PLUGIN_ROOT/skills/scripts/verify-coverage.mjs" "$(pwd)"
# (loop verify -> unwind:uw-complete until affected layers are 100%)
node "$UNWIND_PLUGIN_ROOT/skills/scripts/build-graph.mjs" "$(pwd)"
build-graph reads changes.json and marks still-documented-but-changed nodes
coverage: "stale"; any done/verified contract whose source changed
structurally flips to rebuildStatus: "needs-recheck" (human-set progress in
rebuild-progress.json is otherwise preserved).
Summarize: layers re-analyzed, items added/removed, stale items resolved, and
the new coverage %. Point to docs/unwind/rebuild-graph.json for the dashboard.
A full unwind re-runs every specialist over every file. A refresh skips the deterministic re-scan's cosmetic churn and only pays for LLM analysis on layers that actually changed — turning the unwind spec into a living document that tracks the codebase across months of migration work.