Get the FREE Ultimate OpenClaw Setup Guide →

resume

npx machina-cli add skill Sh3rd3n/megazord/resume --openclaw
Files (1)
SKILL.md
5.6 KB

/mz:resume

Restore context from a previous session and display current project state. Shows what was being worked on, restores any stashed files, and suggests the next action -- but does NOT auto-execute.

Reference @skills/init/design-system.md for all visual output formatting.

Step 1: Display Banner

╔═══════════════════════════════════════════════╗
║  ⚡ MEGAZORD ► RESUME                         ║
╚═══════════════════════════════════════════════╝

Step 2: Load Context

Read .planning/STATE.md for session continuity and current position.

If STATE.md does not exist or .planning/ directory is missing, display:

╔═══════════════════════════════════════════════╗
║  ✗ No Megazord project found                  ║
╠═══════════════════════════════════════════════╣
║  Run /mz:init to set up your project first.   ║
╚═══════════════════════════════════════════════╝

Then exit.

Extract from STATE.md:

  • Session continuity: last session date, stopped at, resume file, stash ref, last error
  • Current position: phase, plan, status, progress

Step 3: Restore Stash (if applicable)

Read the stash ref from session continuity.

If stash ref exists and is not "None":

Run via Bash to restore stashed files:

node {plugin_path}/bin/megazord.mjs tools stash resume --stash-ref "{stash_ref}"

Where {plugin_path} is the absolute path to the Megazord plugin directory (the root of this repository where package.json lives).

Parse the JSON result:

  • If success is true: files were restored. Clear the stash ref in STATE.md by running:
    node {plugin_path}/bin/megazord.mjs tools state update-session --stash-ref "None"
    
  • If success is false and message contains "not found": display note "No pause checkpoint found -- showing last known position" (best-effort recovery)
  • If success is false and message contains "CONFLICT": display warning with resolution steps:
    ⚠ Stash conflicts detected. To resolve:
      1. Run `git stash show` to see conflicting files
      2. Resolve conflicts manually
      3. Run `git stash drop` to clean up
    

If no stash ref (None or missing):

No stash to restore. Continue with context display.

Step 4: Display Context Summary

Display the session restoration in an action box:

╔═══════════════════════════════════════════════════════╗
║  Session Restored                                     ║
╠═══════════════════════════════════════════════════════╣
║  Phase: {phase} of {totalPhases} -- {phaseName}       ║
║  Plan:  {plan} of {totalPlans} -- {status}            ║
║  Stash: {status message}                              ║
║  Last:  {lastSession} -- {stoppedAt}                  ║
╚═══════════════════════════════════════════════════════╝

For the Stash line, use:

  • ✓ {N} files restored if stash was successfully popped
  • No modified files stashed if no stash ref existed
  • ⚠ Conflicts -- manual resolution needed if stash pop had conflicts
  • No pause checkpoint found if stash ref was invalid/missing

Step 5: Display Context

Read the resume file path from session continuity. If it points to a PLAN.md file, read it and extract the objective to show what was being worked on.

Display a context section:

▸ Context
  {Brief description of what was being worked on, extracted from the resume file or stopped-at field}

Read the Accumulated Context > Decisions section from STATE.md. If there are recent decisions, display them:

▸ Recent Decisions
  - {decision 1}
  - {decision 2}

If no decisions, display ▸ Recent Decisions with (none).

Step 6: Suggest Next Action

Update the status from "Paused" back to "In Progress" via:

node {plugin_path}/bin/megazord.mjs tools state update-position --status "In Progress"

Update the session timestamp:

node {plugin_path}/bin/megazord.mjs tools state update-session --stopped-at "Resumed from pause"

Determine the appropriate next command based on current state (same logic as /mz:status):

  • If current phase has no plans: suggest /mz:plan
  • If mid-execution: suggest /mz:go
  • If phase complete: suggest /mz:verify
  • Default: suggest /mz:go

Display the Next Up block:

═══════════════════════════════════════════════════
▸ Next Up
**{Task description}** -- {brief context}
Would you like to continue with `/mz:{command}`?
═══════════════════════════════════════════════════

IMPORTANT: Do NOT auto-execute the suggested command. Display the suggestion and wait for the user to invoke it explicitly.

Source

git clone https://github.com/Sh3rd3n/megazord/blob/master/skills/resume/SKILL.mdView on GitHub

Overview

The resume skill restores context from a previous Megazord session and displays the current project state. It loads session data from .planning/STATE.md, restores any stashed files when available, and suggests the next action without auto-executing. This keeps work continuous across sessions and reduces context-switching friction.

How This Skill Works

When invoked, the skill displays a banner, reads STATE.md to extract the session phase, plan, status, and last error, and shows the relevant resume file context. If a stash reference exists, it runs a stash resume command to restore files and updates STATE.md accordingly; it also handles not-found and conflict cases with guidance. It then presents a contextual summary and the current context, while intentionally not auto-running any actions, so you can decide the next step.

When to Use It

  • You are returning to a Megazord project after a break and want to pick up where you left off.
  • You need to restore previously stashed work before continuing.
  • You want a concise view of the current phase, plan, status, and last error before proceeding.
  • You suspect there is no active project and need to initialize a new Megazord workspace.
  • You want to review recent decisions and the resume context to inform the next move.

Quick Start

  1. Step 1: Run /mz:resume to load the last session context and project state.
  2. Step 2: If a stash-ref exists, run the stash resume command and handle outcomes (success, not found, or CONFLICT).
  3. Step 3: Review the displayed context and use the suggested next action to proceed; do not auto-execute.

Best Practices

  • Ensure .planning/STATE.md is up-to-date before resuming to reflect the true session state.
  • Only resume stash when a stash-ref exists; otherwise proceed without restoration.
  • Review the last error and recent decisions to guide the next action.
  • Do not auto-execute actions; use the displayed context to decide the next steps.
  • After resuming, explicitly update the status to In Progress to reflect ongoing work.

Example Use Cases

  • Resuming a design-system refactor after a short break and verifying the current phase.
  • Continuing a multi-phase feature rollout by restoring the last plan and stash.
  • Recovering work after a system restart by loading STATE.md and stash state.
  • Inspecting paused tasks and recent decisions before making a release decision.
  • Resolving stash conflicts by following the provided recovery steps during resume.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers