From agent
Starts new session by saving summary to memory/YYYY-MM-DD.md, writing reset marker for fresh greeting on next message. OpenClaw-compatible. Triggers: /new, /reset, 'new session'.
npx claudepluginhub crisandrews/clawcode --plugin agentThis skill uses the workspace's default tool permissions.
Save the current session to memory, then mark it as "reset pending" so the next message triggers a fresh greeting (like OpenClaw).
Documents Claude Code session context via session-documenter skill before /clear. Invoke on 'end session', 'end', 'wrap up' to preserve tasks, decisions, files for session-start.
Saves conversation history to timestamped Markdown session logs in sessions/ directory with metadata, summaries, actions, technical notes, and follow-ups. Activates on 'save session', '保存对话', or similar phrases.
Saves full Claude Code session messages to nmem threads only when user explicitly requests ('Save this session', 'Checkpoint this', 'Record conversation'). Import later for detailed review.
Share bugs, ideas, or general feedback.
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.