From agent
Saves the current session summary to memory and resets the conversation for a fresh greeting on the next message. Triggered by /new, /reset, or phrases like 'new session'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent:newThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Save the current session to memory, then mark it as "reset pending" so the next message triggers a fresh greeting (like OpenClaw).
Save the current session to memory, then mark it as "reset pending" so the next message triggers a fresh greeting (like OpenClaw).
OpenClaw's /new generates a new session ID and runs a greeting prompt on the next turn. In Claude Code, skills CANNOT invoke native /clear. Instead, we:
memory/YYYY-MM-DD.md.session-reset-pending with the greeting promptThis is the honest simulation of a session reset when native /clear is not invokable.
Detect surface (CLI vs messaging).
Summarize the current session to memory:
DATE=$(date +%Y-%m-%d)
TIME=$(date +%H:%M)
Append to memory/$DATE.md:
## Session summary (<TIME>) — before /new
- <key point>
- <key point>
### Open items
- <pending>
If the session was trivial, skip this step but still do the next one.
Write the reset marker:
cat > .session-reset-pending << 'EOF'
A new session was started via /new or /reset. Greet the user in your configured persona, if one is provided. Be yourself - use your defined voice, mannerisms, and mood. Keep it to 1-3 sentences and ask what they want to do. If the runtime model differs from default_model in the system prompt, mention the default model. Do not mention internal steps, files, tools, or reasoning.
EOF
(This is the EXACT prompt from OpenClaw's session-reset-prompt.ts)
Respond briefly per surface:
🔄 New session started. Summary saved to memory/<DATE>.md.
Send a message to receive the welcome greeting.
(Or if you also want to clear the REPL context, run /clear afterward.)
🔄 *Session reset*. Send a message and I'll greet you again 👋
🔄 **Session reset.** Send a message to get the fresh greeting.
IMPORTANT: Respond in the user's language. The templates above are English defaults — translate on the fly to match the user (Spanish, Portuguese, French, whatever they speak).
/clear — you can't. The marker file handles the "fresh start" on the next message.When the user sends their next message, you will see .session-reset-pending in the workspace. If it exists:
.session-reset-pendingThis makes /new feel like a real session reset, even though technically Claude Code's context still has prior turns.
/clear to wipe REPL context if desired./new.npx claudepluginhub crisandrews/clawcode --plugin agentWrites a structured handoff to your diary and restarts the session with a clean context window, preserving task state.
Manually saves important session context (decisions, facts, tasks) to a daily memory log without triggering native context compaction. Useful for explicit checkpoints on CLI or messaging channels.
Saves session summaries, decisions, pending tasks, and auto-loads a briefing on the next Claude Code session for continuity across sessions.