{
  "schemaVersion": "1.0",
  "item": {
    "slug": "memory-sync",
    "name": "Automated daily memory backfill for OpenClaw sessions",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/mpesavento/memory-sync",
    "canonicalUrl": "https://clawhub.ai/mpesavento/memory-sync",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/memory-sync",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-sync",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "memory_sync.py",
      "SECRET_PATTERNS.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/memory-sync"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/memory-sync",
    "agentPageUrl": "https://openagent3.xyz/skills/memory-sync/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-sync/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-sync/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Memory Sync",
        "body": "Tool for maintaining agent memory continuity across model switches with automatic secret sanitization."
      },
      {
        "title": "Installation",
        "body": "Requires Python 3.11+ and click:\n\npip install click\n\n# Optional: for direct API summarization (only if not using OpenClaw backend)\npip install openai"
      },
      {
        "title": "Quick Start",
        "body": "# Run directly from skill directory\npython ~/.openclaw/skills/memory-sync/memory_sync.py compare\n\n# Or create an alias for convenience\nalias memory-sync=\"python ~/.openclaw/skills/memory-sync/memory_sync.py\"\n\n# Check for gaps\nmemory-sync compare\n\n# Backfill today's memory (simple extraction - fast, no LLM)\nmemory-sync backfill --today\n\n# Backfill with LLM narrative (uses OpenClaw's native model - no API key needed)\nmemory-sync backfill --today --summarize\n\n# Backfill all missing\nmemory-sync backfill --all"
      },
      {
        "title": "Commands",
        "body": "CommandDescriptioncompareFind gaps between session logs and memory filesbackfill --todayGenerate memory for current daybackfill --since YYYY-MM-DDBackfill from date to presentbackfill --allBackfill all missing datesbackfill --incrementalBackfill only changed dates since last runextractExtract conversations matching criteriasummarize --date YYYY-MM-DDGenerate LLM summary for a single daytransitionsList model transitionsvalidateCheck memory files for consistency issuesstatsShow coverage statistics"
      },
      {
        "title": "Simple Extraction vs LLM Summarization",
        "body": "The backfill command supports two modes:\n\nSimple Extraction (default, without --summarize):\n\nFast, no LLM or API calls needed\nExtracts topics via keyword frequency analysis\nIdentifies key user questions and assistant responses\nDetects decision markers from text patterns\nProduces structured output with Topics, Key Exchanges, Decisions sections\nWith --preserve: Hand-written content is appended to the end of the new file\nBest for: Quick backfills, initial setup, systems without LLM access\n\nLLM Summarization (with --summarize) - Recommended:\n\nUses LLM to generate narrative summaries\nProduces coherent 2-4 paragraph prose\nBetter context and insight extraction\nWith --preserve: Existing content is passed to the LLM with instructions to incorporate it into the new summary, maintaining temporal order and thematic structure\nBest for: Daily automation, high-quality memory files\n\nRecommended for regular use:\n\n# Best quality: LLM summary that incorporates any existing notes\nmemory-sync backfill --today --summarize --preserve\n\nBoth modes automatically sanitize secrets before writing."
      },
      {
        "title": "Initial Setup",
        "body": "# Check what's missing\nmemory-sync compare\n\n# Backfill everything (may take time)\nmemory-sync backfill --all"
      },
      {
        "title": "Nightly Automation (Recommended)",
        "body": "# Best: LLM summary that incorporates any existing notes\nmemory-sync backfill --today --summarize --preserve\n\n# Smart: Process only days changed since last run\nmemory-sync backfill --incremental --summarize --preserve\n\n# Or use a specific backend if preferred\nmemory-sync backfill --today --summarize --preserve --summarize-backend anthropic"
      },
      {
        "title": "Catch-Up After Gaps",
        "body": "# Backfill from last week to present\nmemory-sync backfill --since 2026-01-28 --summarize"
      },
      {
        "title": "Regenerate with Preserved Content",
        "body": "# Keep hand-written notes when regenerating\nmemory-sync backfill --date 2026-02-05 --force --preserve --summarize"
      },
      {
        "title": "Secret Sanitization",
        "body": "All content is automatically sanitized to prevent secret leakage:\n\n30+ explicit patterns: OpenAI, Anthropic, GitHub, AWS, Stripe, Discord, Slack, Notion, Google, Brave, Tavily, SerpAPI, etc.\nStructural detection: JWT tokens, SSH keys, database connection strings, high-entropy base64\nGeneric patterns: API keys, tokens, passwords, environment variables\nDefense-in-depth: Secrets redacted at every stage (extraction, LLM processing, file writes, CLI display)\n\nSecrets are replaced with [REDACTED-TYPE] placeholders.\n\nSee SECRET_PATTERNS.md for complete pattern list."
      },
      {
        "title": "Summarization Backends",
        "body": "The --summarize flag supports multiple backends via --summarize-backend:\n\nBackendDescriptionAPI Key Requiredopenclaw (default)Uses OpenClaw's sessions spawn with your configured modelNoanthropicDirect Anthropic API via openai packageANTHROPIC_API_KEYopenaiDirect OpenAI API via openai packageOPENAI_API_KEY"
      },
      {
        "title": "Examples",
        "body": "# Default: use OpenClaw's native model (no API key needed)\nmemory-sync backfill --today --summarize\n\n# Explicit backend selection\nmemory-sync backfill --today --summarize --summarize-backend openclaw\nmemory-sync backfill --today --summarize --summarize-backend anthropic\nmemory-sync backfill --today --summarize --summarize-backend openai\n\n# Override model for any backend\nmemory-sync backfill --today --summarize --model claude-sonnet-4-20250514\nmemory-sync backfill --today --summarize --summarize-backend openai --model gpt-4o\n\nThe openclaw backend is recommended as it:\n\nUses your existing OpenClaw configuration\nRequires no separate API keys\nLeverages whatever model you have configured in OpenClaw"
      },
      {
        "title": "Nightly Cron (3am)",
        "body": "Process today with LLM summary, preserving any existing notes:\n\n0 3 * * * cd ~/.openclaw/skills/memory-sync && python memory_sync.py backfill --today --summarize --preserve >> ~/.memory-sync/cron.log 2>&1"
      },
      {
        "title": "Smart Incremental Mode",
        "body": "Automatically detects changes since last run:\n\n# Initial backfill (run once, simple extraction for speed)\npython memory_sync.py backfill --all\n\n# Then set up nightly incremental with LLM summaries\n0 3 * * * cd ~/.openclaw/skills/memory-sync && python memory_sync.py backfill --incremental --summarize --preserve >> ~/.memory-sync/cron.log 2>&1\n\nState is tracked in ~/.memory-sync/state.json."
      },
      {
        "title": "Configuration",
        "body": "Default paths:\n\nSession logs: ~/.openclaw/agents/main/sessions/*.jsonl\nMemory files: ~/.openclaw/workspace/memory/\n\nOverride with CLI flags:\n\n--sessions-dir /path/to/sessions\n--memory-dir /path/to/memory\n\nEnvironment variables (only for direct API backends):\n\nANTHROPIC_API_KEY - Required for --summarize-backend anthropic\nOPENAI_API_KEY - Required for --summarize-backend openai\n\nThe default openclaw backend requires no API keys - it uses your OpenClaw configuration.\n\n# Only needed if using direct API backends\nexport ANTHROPIC_API_KEY=sk-ant-...\nexport OPENAI_API_KEY=sk-..."
      },
      {
        "title": "Content Preservation",
        "body": "The --preserve flag behavior depends on whether --summarize is used:\n\nWithout --summarize (simple extraction):\n\nHand-written content (after footer marker) is appended verbatim to the end of the newly generated file\nThe new extraction replaces the auto-generated portion, your notes are kept at the end\n\nWith --summarize (LLM mode):\n\nExisting hand-written content is passed to the LLM as context\nThe LLM is instructed to incorporate your notes into the new summary\nResult: Your insights are woven into a coherent narrative, not just appended\n\nExample:\n\n# Regenerate with LLM, incorporating existing notes into the summary\nmemory-sync backfill --date 2026-02-05 --force --preserve --summarize\n\nAuto-generated markers:\n\nHeader: *Auto-generated from N session messages*\nFooter: *Review and edit this draft to capture what's actually important.*\n\nContent after the footer marker is considered hand-written and will be preserved."
      },
      {
        "title": "Backfill Options",
        "body": "Date selection (choose one):\n\n--date YYYY-MM-DD - Single specific date\n--today - Current date only (for nightly automation)\n--since YYYY-MM-DD - From date to present (for catch-up)\n--all - All missing dates (for initial setup)\n--incremental - Only dates changed since last run (smart automation)\n\nAdditional flags:\n\n--dry-run - Show what would be created without creating files\n--force - Overwrite existing files (required for regeneration)\n--preserve - Keep hand-written content when regenerating\n--summarize - Use LLM for narrative summaries\n--summarize-backend BACKEND - Backend for summarization: openclaw (default), anthropic, openai\n--model MODEL - Model override for summarization (default varies by backend)"
      },
      {
        "title": "Performance",
        "body": "ModeTime per DayBest For--all5-10 min × N daysInitial setup only--since5-10 min × N daysRecovery after gaps--today30-60 secNightly automation--incremental30-60 sec × changed daysSmart automation"
      }
    ],
    "body": "Memory Sync\n\nTool for maintaining agent memory continuity across model switches with automatic secret sanitization.\n\nInstallation\n\nRequires Python 3.11+ and click:\n\npip install click\n\n# Optional: for direct API summarization (only if not using OpenClaw backend)\npip install openai\n\nQuick Start\n# Run directly from skill directory\npython ~/.openclaw/skills/memory-sync/memory_sync.py compare\n\n# Or create an alias for convenience\nalias memory-sync=\"python ~/.openclaw/skills/memory-sync/memory_sync.py\"\n\n# Check for gaps\nmemory-sync compare\n\n# Backfill today's memory (simple extraction - fast, no LLM)\nmemory-sync backfill --today\n\n# Backfill with LLM narrative (uses OpenClaw's native model - no API key needed)\nmemory-sync backfill --today --summarize\n\n# Backfill all missing\nmemory-sync backfill --all\n\nCommands\nCommand\tDescription\ncompare\tFind gaps between session logs and memory files\nbackfill --today\tGenerate memory for current day\nbackfill --since YYYY-MM-DD\tBackfill from date to present\nbackfill --all\tBackfill all missing dates\nbackfill --incremental\tBackfill only changed dates since last run\nextract\tExtract conversations matching criteria\nsummarize --date YYYY-MM-DD\tGenerate LLM summary for a single day\ntransitions\tList model transitions\nvalidate\tCheck memory files for consistency issues\nstats\tShow coverage statistics\nSimple Extraction vs LLM Summarization\n\nThe backfill command supports two modes:\n\nSimple Extraction (default, without --summarize):\n\nFast, no LLM or API calls needed\nExtracts topics via keyword frequency analysis\nIdentifies key user questions and assistant responses\nDetects decision markers from text patterns\nProduces structured output with Topics, Key Exchanges, Decisions sections\nWith --preserve: Hand-written content is appended to the end of the new file\nBest for: Quick backfills, initial setup, systems without LLM access\n\nLLM Summarization (with --summarize) - Recommended:\n\nUses LLM to generate narrative summaries\nProduces coherent 2-4 paragraph prose\nBetter context and insight extraction\nWith --preserve: Existing content is passed to the LLM with instructions to incorporate it into the new summary, maintaining temporal order and thematic structure\nBest for: Daily automation, high-quality memory files\n\nRecommended for regular use:\n\n# Best quality: LLM summary that incorporates any existing notes\nmemory-sync backfill --today --summarize --preserve\n\n\nBoth modes automatically sanitize secrets before writing.\n\nCommon Workflows\nInitial Setup\n# Check what's missing\nmemory-sync compare\n\n# Backfill everything (may take time)\nmemory-sync backfill --all\n\nNightly Automation (Recommended)\n# Best: LLM summary that incorporates any existing notes\nmemory-sync backfill --today --summarize --preserve\n\n# Smart: Process only days changed since last run\nmemory-sync backfill --incremental --summarize --preserve\n\n# Or use a specific backend if preferred\nmemory-sync backfill --today --summarize --preserve --summarize-backend anthropic\n\nCatch-Up After Gaps\n# Backfill from last week to present\nmemory-sync backfill --since 2026-01-28 --summarize\n\nRegenerate with Preserved Content\n# Keep hand-written notes when regenerating\nmemory-sync backfill --date 2026-02-05 --force --preserve --summarize\n\nSecret Sanitization\n\nAll content is automatically sanitized to prevent secret leakage:\n\n30+ explicit patterns: OpenAI, Anthropic, GitHub, AWS, Stripe, Discord, Slack, Notion, Google, Brave, Tavily, SerpAPI, etc.\nStructural detection: JWT tokens, SSH keys, database connection strings, high-entropy base64\nGeneric patterns: API keys, tokens, passwords, environment variables\nDefense-in-depth: Secrets redacted at every stage (extraction, LLM processing, file writes, CLI display)\n\nSecrets are replaced with [REDACTED-TYPE] placeholders.\n\nSee SECRET_PATTERNS.md for complete pattern list.\n\nSummarization Backends\n\nThe --summarize flag supports multiple backends via --summarize-backend:\n\nBackend\tDescription\tAPI Key Required\nopenclaw (default)\tUses OpenClaw's sessions spawn with your configured model\tNo\nanthropic\tDirect Anthropic API via openai package\tANTHROPIC_API_KEY\nopenai\tDirect OpenAI API via openai package\tOPENAI_API_KEY\nExamples\n# Default: use OpenClaw's native model (no API key needed)\nmemory-sync backfill --today --summarize\n\n# Explicit backend selection\nmemory-sync backfill --today --summarize --summarize-backend openclaw\nmemory-sync backfill --today --summarize --summarize-backend anthropic\nmemory-sync backfill --today --summarize --summarize-backend openai\n\n# Override model for any backend\nmemory-sync backfill --today --summarize --model claude-sonnet-4-20250514\nmemory-sync backfill --today --summarize --summarize-backend openai --model gpt-4o\n\n\nThe openclaw backend is recommended as it:\n\nUses your existing OpenClaw configuration\nRequires no separate API keys\nLeverages whatever model you have configured in OpenClaw\nAutomated Usage\nNightly Cron (3am)\n\nProcess today with LLM summary, preserving any existing notes:\n\n0 3 * * * cd ~/.openclaw/skills/memory-sync && python memory_sync.py backfill --today --summarize --preserve >> ~/.memory-sync/cron.log 2>&1\n\nSmart Incremental Mode\n\nAutomatically detects changes since last run:\n\n# Initial backfill (run once, simple extraction for speed)\npython memory_sync.py backfill --all\n\n# Then set up nightly incremental with LLM summaries\n0 3 * * * cd ~/.openclaw/skills/memory-sync && python memory_sync.py backfill --incremental --summarize --preserve >> ~/.memory-sync/cron.log 2>&1\n\n\nState is tracked in ~/.memory-sync/state.json.\n\nConfiguration\n\nDefault paths:\n\nSession logs: ~/.openclaw/agents/main/sessions/*.jsonl\nMemory files: ~/.openclaw/workspace/memory/\n\nOverride with CLI flags:\n\n--sessions-dir /path/to/sessions\n--memory-dir /path/to/memory\n\nEnvironment variables (only for direct API backends):\n\nANTHROPIC_API_KEY - Required for --summarize-backend anthropic\nOPENAI_API_KEY - Required for --summarize-backend openai\n\nThe default openclaw backend requires no API keys - it uses your OpenClaw configuration.\n\n# Only needed if using direct API backends\nexport ANTHROPIC_API_KEY=sk-ant-...\nexport OPENAI_API_KEY=sk-...\n\nContent Preservation\n\nThe --preserve flag behavior depends on whether --summarize is used:\n\nWithout --summarize (simple extraction):\n\nHand-written content (after footer marker) is appended verbatim to the end of the newly generated file\nThe new extraction replaces the auto-generated portion, your notes are kept at the end\n\nWith --summarize (LLM mode):\n\nExisting hand-written content is passed to the LLM as context\nThe LLM is instructed to incorporate your notes into the new summary\nResult: Your insights are woven into a coherent narrative, not just appended\n\nExample:\n\n# Regenerate with LLM, incorporating existing notes into the summary\nmemory-sync backfill --date 2026-02-05 --force --preserve --summarize\n\n\nAuto-generated markers:\n\nHeader: *Auto-generated from N session messages*\nFooter: *Review and edit this draft to capture what's actually important.*\n\nContent after the footer marker is considered hand-written and will be preserved.\n\nBackfill Options\n\nDate selection (choose one):\n\n--date YYYY-MM-DD - Single specific date\n--today - Current date only (for nightly automation)\n--since YYYY-MM-DD - From date to present (for catch-up)\n--all - All missing dates (for initial setup)\n--incremental - Only dates changed since last run (smart automation)\n\nAdditional flags:\n\n--dry-run - Show what would be created without creating files\n--force - Overwrite existing files (required for regeneration)\n--preserve - Keep hand-written content when regenerating\n--summarize - Use LLM for narrative summaries\n--summarize-backend BACKEND - Backend for summarization: openclaw (default), anthropic, openai\n--model MODEL - Model override for summarization (default varies by backend)\nPerformance\nMode\tTime per Day\tBest For\n--all\t5-10 min × N days\tInitial setup only\n--since\t5-10 min × N days\tRecovery after gaps\n--today\t30-60 sec\tNightly automation\n--incremental\t30-60 sec × changed days\tSmart automation"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mpesavento/memory-sync",
    "publisherUrl": "https://clawhub.ai/mpesavento/memory-sync",
    "owner": "mpesavento",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/memory-sync",
    "downloadUrl": "https://openagent3.xyz/downloads/memory-sync",
    "agentUrl": "https://openagent3.xyz/skills/memory-sync/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-sync/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-sync/agent.md"
  }
}