Get the FREE Ultimate OpenClaw Setup Guide →

pause

Scanned
npx machina-cli add skill Sh3rd3n/megazord/pause --openclaw
Files (1)
SKILL.md
3.6 KB

/mz:pause

Save current session context including progress, decisions, and modified files for seamless handoff to a future Claude Code session.

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

Step 1: Display Banner

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

Step 2: Load Context

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

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.

Read the current position data to build the pause description. Extract:

  • Current phase number and name
  • Current plan number
  • Current status

Step 3: Stash Modified Files

Build a description string: "Phase {N}, Plan {M}, {status}"

Run via Bash to stash any modified files:

node {plugin_path}/bin/megazord.mjs tools stash pause --description "Phase {N}, Plan {M}, {status}"

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 which contains:

  • success: boolean
  • stashRef: string or null (the git stash reference if files were stashed)
  • message: human-readable message

If success is false, display a warning but continue with the pause (stash failure should not block state updates).

Step 4: Update STATE.md

Run via Bash to update session continuity:

node {plugin_path}/bin/megazord.mjs tools state update-session --stopped-at "Phase {N}, Plan {M}, {status}" --stash-ref "{ref_or_None}" --last-error "None"

Also update the status to "Paused" via:

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

Step 5: Display Confirmation

Display the pause confirmation in an action box:

╔═══════════════════════════════════════════════════════╗
║  Session Paused                                       ║
╠═══════════════════════════════════════════════════════╣
║  Phase: {phase} of {totalPhases} -- {phaseName}       ║
║  Plan:  {plan} of {totalPlans} -- {status}            ║
║  Stash: {stashRef} ({N} modified files)               ║
║  State: .planning/STATE.md updated                    ║
╚═══════════════════════════════════════════════════════╝

If no files were stashed, show Stash: No modified files instead.

End with:

To resume: `/mz:resume`

Source

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

Overview

The pause skill saves the current Megazord session, including progress, decisions, and modified files, for seamless handoff to a future Claude Code session. It reads the project state from .planning/STATE.md, stash changes, and updates the state to Paused, then displays a confirmation.

How This Skill Works

It loads the current phase, plan, and status from STATE.md, builds a description like "Phase N, Plan M, status", runs a node command to stash modified files, updates STATE.md with the stash reference and a Paused status, and finally renders a confirmation banner with the results.

When to Use It

  • You need to pause a session to switch tasks without losing progress
  • Preparing a handoff to another user or future Claude Code session
  • You have modified files to stash before switching branches or tasks
  • You want to ensure a clean state before resuming later
  • Encountering a blocking issue and want to save state to resume later

Quick Start

  1. Step 1: Run /mz:pause to start the pause
  2. Step 2: Megazord reads STATE.md, stashes changes, and updates state
  3. Step 3: Use /mz:resume to continue later

Best Practices

  • Ensure .planning/STATE.md exists and accurately reflects current progress
  • Use the exact description format (Phase N, Plan M, status) for clarity
  • Check the stashRef in the JSON result to verify what was stashed
  • If stash fails, still update STATE.md and pause status to allow resume
  • End the pause with a resume instruction: To resume: /mz:resume

Example Use Cases

  • Pausing Phase 2, Plan 3 with status 'In Progress' and stashRef 'stash@{5}'
  • No modified files during a quick pause; Stash: No modified files
  • Pause triggered from a missing STATE.md; user sees 'No Megazord project found' banner
  • User pauses while in Phase 1, Plan 2; stashRef 'stash@{2}' and state updated to Paused
  • Stash failed but state updated; you can still resume later

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers