From spectre
Archives session logs (handoffs, todos, history) to start a fresh session without auto-loaded context. Useful for resetting Claude Code's session memory.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spectre:spectre-forgetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded `$ARGUMENTS` value.
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown)
session_dir="docs/tasks/${branch}/session_logs"
archive_dir="${session_dir}/archive"
# Check if session logs exist
if [ ! -d "$session_dir" ] || [ -z "$(ls -A ${session_dir}/*.json 2>/dev/null)" ]; then
echo "NO_SESSIONS"
exit 0
fi
# Create archive and move all session files
mkdir -p "$archive_dir"
mv ${session_dir}/*_handoff.json "$archive_dir/" 2>/dev/null || true
mv ${session_dir}/*_todos.json "$archive_dir/" 2>/dev/null || true
mv ${session_dir}/todos_history.json "$archive_dir/" 2>/dev/null || true
# Count archived
archived_count=$(ls -1 ${archive_dir}/*_handoff.json 2>/dev/null | wc -l | xargs)
echo "ARCHIVED:${archived_count}"
Action — ConfirmCleared: Based on bash output, inform user
If output is NO_SESSIONS:
No session logs found for this branch. Memory is already clear.
Else (output is ARCHIVED:N):
✓ Session memory cleared
Archived {N} handoff file(s) to
docs/tasks/{branch}/session_logs/archive/Next: Start a new session with
/clearor close this terminal. Your next session will start fresh without auto-loaded context.
*_handoff.json files moved to archive/ subdirectory*_todos.json files moved to archive/ subdirectorytodos_history.json moved to archive/ subdirectorynpx claudepluginhub codename-inc/spectre --plugin spectreLoads project context from `.agents/memory/` and recent session history at session start or after `/clear`, surfaces open next steps, and activates session-documenter.
Creates, loads, syncs, and archives work sessions with git worktree support. Requires explicit session paths or .samocode config.
Inspects and deletes Claude Code session artifacts for the current project. Use to clean up session history shown by cc resume, selecting by index, sessionId, or title.