AgentSkillsCN

local-semantic-handoff

为 OpenClaw 运行本地语义记忆与交接工作流。适用于结束繁重任务、切换聊天或会话、更换模型,或在保持上下文最小化的同时确保任务的连续性。

SKILL.md
--- frontmatter
name: local-semantic-handoff
description: Run a local semantic-memory and handoff workflow for OpenClaw. Use when closing heavy tasks, switching chat/session, switching model, or preserving continuity with minimal context.

Local Semantic Handoff (OpenClaw)

Use this skill to reduce context bloat while preserving continuity.

Required project location

Run from this repo root (or pass explicit paths):

  • memory_local.py
  • MEMORY.md
  • memory/*.md

Core workflow

  1. Write/append technical detail to history/YYYY-MM-DD-topic.md.
  2. Generate compact handoff summary.
  3. Start a clean session/model and continue from handoff only.
  4. Use semantic search only when needed to recover details.

Commands

Build index (when memory changed)

bash
python memory_local.py index --workspace "C:\Users\<username>\.openclaw\workspace"

Semantic search (on demand)

bash
python memory_local.py search "consulta o tema" --top-k 5

Generate handoff (before session/model switch)

bash
python memory_local.py handoff \
  --output "handoff/latest.md" \
  --objective "<objetivo actual>" \
  --status "<estado actual>" \
  --decisions "<decisiones clave>" \
  --next-step "<siguiente paso>" \
  --tech-log "history/<archivo>.md"

Operational policy

  • Prefer new session + handoff over carrying long chat history.
  • Keep handoff short (objective, status, decisions, next step, tech-log path).
  • Keep technical logs separate; do not paste large logs into chat.
  • Reindex only after meaningful memory updates.

Model-switch guard integration

Before switching model:

  1. Check /status.
  2. Compact immediately if context is high.
  3. Confirm post-compaction status.
  4. Generate/update handoff if task is heavy.
  5. Switch model and continue from handoff.