一键导入
cmd-resume-session
Load the most recent session file from ~/.openclaw/workspace-main/sessions/ and resume work with full context from where the last session ended.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Load the most recent session file from ~/.openclaw/workspace-main/sessions/ and resume work with full context from where the last session ended.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scan installed skills to extract cross-cutting principles and distill them into rules — append, revise, or create new rule files.
Audit all installed OpenClaw skills for quality: content overlap, freshness, and uniqueness. Supports Quick Scan (changed only) and Full Stocktake modes.
Cluster MEMORY.md entries by theme and optionally generate SKILL.md drafts.
Export MEMORY.md to a timestamped markdown file for sharing or backup.
Import memory entries from a markdown export file, merging with MEMORY.md without duplicating.
Show current workspace memory: MEMORY.md contents, pending recalls, and index status.
| name | cmd_resume_session |
| description | Load the most recent session file from ~/.openclaw/workspace-main/sessions/ and resume work with full context from where the last session ended. |
| user-invocable | true |
| origin | openclaw-mas |
| argument-hint | <project-path> |
The first argument is the project path. Before doing anything else:
Load the last saved session state and orient fully before doing any work.
This command is the counterpart to /save-session.
/resume-session # loads most recent file in ~/.openclaw/workspace-main/sessions/
/resume-session 2024-01-15 # loads most recent session for that date
/resume-session ~/.openclaw/workspace-main/sessions/2024-01-15-abc123de-session.md # loads a specific session file
If no argument provided:
~/.openclaw/workspace-main/sessions/*-session.md fileNo session files found in ~/.openclaw/workspace-main/sessions/
Run /save-session at the end of a session to create one.
Then stop.If an argument is provided:
YYYY-MM-DD), search ~/.openclaw/workspace-main/sessions/
for files matching YYYY-MM-DD-*-session.md and load the most recently modified oneRead the complete file. Do not summarize yet.
Respond with a structured briefing in this exact format:
SESSION LOADED: [actual resolved path to the file]
════════════════════════════════════════════════
PROJECT: [project name / topic from file]
WHAT WE'RE BUILDING:
[2-3 sentence summary in your own words]
CURRENT STATE:
PASS: Working: [count] items confirmed
In Progress: [list files that are in progress]
Not Started: [list planned but untouched]
WHAT NOT TO RETRY:
[list every failed approach with its reason — this is critical]
OPEN QUESTIONS / BLOCKERS:
[list any blockers or unanswered questions]
NEXT STEP:
[exact next step if defined in the file]
[if not defined: "No next step defined — recommend reviewing 'What Has NOT Been Tried Yet' together before starting"]
════════════════════════════════════════════════
Ready to continue. What would you like to do?
Do NOT start working automatically. Do NOT touch any files. Wait for the user to say what to do next.
If the next step is clearly defined in the session file and the user says "continue" or "yes" or similar — proceed with that exact next step.
If no next step is defined — ask the user where to start, and optionally suggest an approach from the "What Has NOT Been Tried Yet" section.
Multiple sessions for the same date (2024-01-15-abc123de-session.md, 2024-01-15-xyz789-session.md):
Load the most recently modified matching file for that date.
Session file references files that no longer exist:
Note this during the briefing — "WARNING: path/to/file.ts referenced in session but not found on disk."
Session file is from more than 7 days ago: Note the gap — "WARNING: This session is from N days ago (threshold: 7 days). Things may have changed." — then proceed normally.
User provides a file path directly (e.g., forwarded from a teammate): Read it and follow the same briefing process — the format is the same regardless of source.
Session file is empty or malformed: Report: "Session file found but appears empty or unreadable. You may need to create a new one with /save-session."
SESSION LOADED: /Users/you/.openclaw/workspace-main/sessions/2024-01-15-abc123de-session.md
════════════════════════════════════════════════
PROJECT: my-app — JWT Authentication
WHAT WE'RE BUILDING:
User authentication with JWT tokens stored in httpOnly cookies.
Register and login endpoints are partially done. Route protection
via middleware hasn't been started yet.
CURRENT STATE:
PASS: Working: 3 items (register endpoint, JWT generation, password hashing)
In Progress: app/api/auth/login/route.ts (token works, cookie not set yet)
Not Started: middleware.ts, app/login/page.tsx
WHAT NOT TO RETRY:
FAIL: Next-Auth — conflicts with custom Prisma adapter, threw adapter error on every request
FAIL: localStorage for JWT — causes SSR hydration mismatch, incompatible with Next.js
OPEN QUESTIONS / BLOCKERS:
- Does cookies().set() work inside a Route Handler or only Server Actions?
NEXT STEP:
In app/api/auth/login/route.ts — set the JWT as an httpOnly cookie using
cookies().set('token', jwt, { httpOnly: true, secure: true, sameSite: 'strict' })
then test with Postman for a Set-Cookie header in the response.
════════════════════════════════════════════════
Ready to continue. What would you like to do?
/save-session again at the end of the new session to create a new dated file