context-restore
Load a snapshot saved by /context-save and present it so this session can pick up where the last one left off without re-deriving decisions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Load a snapshot saved by /context-save and present it so this session can pick up where the last one left off without re-deriving decisions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Root-cause native Bannerlord CTDs (AccessViolation in TaleWorlds.Native.dll) via Event Log offsets, offline disassembly, and live debugger forensics. No symbols needed.
Dispatch an independent Codex verification job directly via `codex exec` Bash call, then retrieve and present results
Inspect all changed files, group by logical concern, and guide atomic per-concern commits following TAOM's 50/72 rule and commit trailer convention.
Launch parallel deep-dive agents to review completed work for quality, standards, compatibility, completeness, and cross-system data flow
Respond to a Bannerlord engine update (Steam force-bump or deliberate migration) — preserve the decompile baseline, regen, diff, re-verify bindings and creature data, control-battle.
Integrate a merge-ready branch into the trunk — fast-forward check, merge, regenerate backlinks, CHANGELOG, delete branch (local+remote), push with confirmation. TAOM trunk-based, not Git Flow.
| name | context-restore |
| description | Load a snapshot saved by /context-save and present it so this session can pick up where the last one left off without re-deriving decisions. |
| allowed-tools | ["Bash","Read","AskUserQuestion"] |
Reads the most recent (or named) /context-save snapshot and presents it to the agent + user so work resumes without losing the decisions and in-flight state captured before.
Adapted from garrytan/gstack/context-restore.
/compact if the trimmed context lost important task stateList available snapshots. Pre-loaded — the !…`` line below is replaced with its
live output before you read this skill (empty = no snapshots, or injection unavailable →
use the fallback):
ls -t "${CLAUDE_PROJECT_DIR}/.claude/state/context"/*.md 2>/dev/null | head -10Fallback (run directly if the pre-load above is empty):
STATE_DIR="${CLAUDE_PROJECT_DIR}/.claude/state/context"
if [[ ! -d "$STATE_DIR" ]] || [[ -z "$(ls -A "$STATE_DIR" 2>/dev/null)" ]]; then
echo "No snapshots found. Use /context-save to create one."
exit 0
fi
ls -t "$STATE_DIR"/*.md 2>/dev/null | head -10
Pick which to restore. Default: most recent. If the user asks for a specific one (e.g., "restore the careerSystem snapshot"), match by filename slug. Use AskUserQuestion if more than one recent snapshot is plausible (within last 24h).
Read the picked snapshot and surface its key sections to the user, in this order:
Cross-check with current git state. Has the branch moved? Are the files-in-flight still showing as modified? If yes, surface as "still in flight." If no, ask: "the snapshot says you were editing X, but current git is clean — was that committed since?"
Optionally re-Read files-in-flight. Per harness-facts.md stale-file rule, if you're going to edit them, re-Read first.
| Trigger | Behavior |
|---|---|
/context-restore (no arg) | Load the most recent snapshot |
/context-restore <slug> | Load by filename slug (partial match OK) |
/context-restore list | Show all snapshots, don't restore — user picks next |
/context-restore clear | Delete all snapshots after confirmation (AskUserQuestion) |
After loading, summarize like:
Loaded: .claude/state/context/20260426-153012-tier2-impl.md (saved 2h ago)
In-flight: Implementing Tier 2 + Tier 3 picks from ecosystem review (#93)
Next step: Port refactoring-specialist subagent, run /context-budget, commit
Decisions carried over:
- Skipped pick #8 (TodoWrite sufficient for solo)
- effort: high only on /deep-review
- Dropped gstack telemetry scaffolding from port
Files in flight (1, all consistent with current git):
- Main/Features/CareerSystem/Services/CareerService.cs
Open questions: none
Surprises worth remembering: amend bypass was a real prevention-theater finding (now codified in harness-facts.md).
Ready to resume — say "continue" or specify a different next step.
/context-save — the writer side/compact — context-restore is what you run AFTER compact if you want the pre-compact decisions backAskUserQuestion.