{
  "schemaVersion": "1.0",
  "item": {
    "slug": "memory-maintenance",
    "name": "Memory Maintenance",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/MaxLaurieHutchinson/memory-maintenance",
    "canonicalUrl": "https://clawhub.ai/MaxLaurieHutchinson/memory-maintenance",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/memory-maintenance",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-maintenance",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "config/settings.json",
      "scripts/apply.sh",
      "scripts/cleanup.sh",
      "scripts/install.sh"
    ],
    "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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.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-maintenance"
    },
    "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-maintenance",
    "agentPageUrl": "https://openagent3.xyz/skills/memory-maintenance/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-maintenance/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-maintenance/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Memory Maintenance Skill",
        "body": "Intelligent memory management for OpenClaw agents. Reviews daily notes, suggests MEMORY.md updates, maintains directory health, and auto-cleans old files."
      },
      {
        "title": "Why This Exists",
        "body": "Agents wake up fresh every session. Without maintenance:\n\nDaily notes pile up and become unsearchable\nImportant decisions get buried in old sessions\nContext windows fill with irrelevant history\nYou repeat the same context-setting every day\n\nThis skill automates the tedious work of keeping your agent's memory organized and actionable."
      },
      {
        "title": "Features",
        "body": "Content Review: Analyzes daily notes and suggests MEMORY.md updates\nDirectory Health: Monitors memory/ directory for naming issues, fragmentation, bloat\nAuto-Cleanup: Archives old reviews (7+ days) and enforces retention policy (30 days)\nSafe by Default: Content changes require approval; only safe maintenance auto-applies"
      },
      {
        "title": "Recommended Model",
        "body": "This skill works well with lightweight models. We recommend:\n\nPrimary: gemini-2.5-flash (fast, cost-effective)\nFallback: gemini-2.5-flash-lite (if rate limits hit)\n\nBoth handle the structured output and analysis tasks efficiently."
      },
      {
        "title": "Quick Start",
        "body": "# Install the skill\nclawhub install memory-maintenance\n\n# Configure (optional)\n# Edit config/settings.json to customize schedule, retention, etc.\n\n# Run manually\nopenclaw skill memory-maintenance run\n\n# Or let it run automatically via cron (configured during install)"
      },
      {
        "title": "Architecture",
        "body": "Daily Session Notes (memory/YYYY-MM-DD.md)\n    ↓\nReview Agent (scheduled daily)\n    ↓\nStructured Suggestions (JSON)\n    ↓\nHuman Review (markdown report)\n    ↓\nApproved Updates → MEMORY.md\n    ↓\nAuto-Cleanup (archive old files)"
      },
      {
        "title": "Workflow",
        "body": "Daily Review (23:00 by default)\n\nScans configurable lookback period (default: 7 days)\nChecks memory/ directory health\nGenerates suggestions via LLM\nOutputs structured JSON + human-readable markdown\n\n\n\nHuman Review\n\nRead agents/memory/review-v2-YYYY-MM-DD.md\nApprove/reject suggestions\n\n\n\nApply Changes\n# Dry run (preview)\nopenclaw skill memory-maintenance apply --dry-run 2026-02-05\n\n# Apply safe changes (archiving, cleanup)\nopenclaw skill memory-maintenance apply --safe 2026-02-05\n\n# Apply all (requires confirmation)\nopenclaw skill memory-maintenance apply --all 2026-02-05\n\n\n\nAuto-Cleanup (runs after successful review)\n\nArchives reviews older than configured threshold\nDeletes archive files older than retention period\nCleans up error logs"
      },
      {
        "title": "Configuration",
        "body": "Edit config/settings.json:\n\n{\n  \"schedule\": {\n    \"enabled\": true,\n    \"time\": \"23:00\",\n    \"timezone\": \"Europe/London\"\n  },\n  \"review\": {\n    \"lookback_days\": 7,\n    \"model\": \"gemini-2.5-flash\",\n    \"max_suggestions\": 10\n  },\n  \"maintenance\": {\n    \"archive_after_days\": 7,\n    \"retention_days\": 30,\n    \"consolidate_fragments\": true,\n    \"auto_archive_safe\": true\n  },\n  \"safety\": {\n    \"require_approval_for_content\": true,\n    \"require_approval_for_delete\": true,\n    \"trash_instead_of_delete\": true\n  }\n}"
      },
      {
        "title": "Safety",
        "body": "Content suggestions: Never auto-applied (human review mandatory)\nSafe maintenance (archiving): Auto-applied with --safe\nRisky operations (delete, rename): Require --all + confirmation\nTrash recovery: Deleted files go to agents/memory/.trash/ (recoverable for retention period)"
      },
      {
        "title": "Commands",
        "body": "# Run review manually\nopenclaw skill memory-maintenance review\n\n# Apply changes\nopenclaw skill memory-maintenance apply [--dry-run|--safe|--all] DATE\n\n# Run cleanup\nopenclaw skill memory-maintenance cleanup\n\n# Check status\nopenclaw skill memory-maintenance status\n\n# View stats\nopenclaw skill memory-maintenance stats"
      },
      {
        "title": "Integration with MEMORY.md",
        "body": "The skill suggests updates to standard MEMORY.md sections:\n\nAgent Identity and Core Preferences\nInfrastructure/Setup\nMemory Management\nBackup & Migration\nContacts\nScheduled Operations\nContent Creation & Projects\nActive Projects"
      },
      {
        "title": "Output",
        "body": "agents/memory/review-v2-YYYY-MM-DD.json — Structured suggestions\nagents/memory/review-v2-YYYY-MM-DD.md — Human-readable report\nagents/memory/stats.json — Aggregate statistics"
      },
      {
        "title": "Archive",
        "body": "agents/memory/archive/YYYY-MM/ — Monthly buckets\nagents/memory/.trash/ — Recoverable deletions"
      },
      {
        "title": "Requirements",
        "body": "OpenClaw >= 2026.2.0\nGemini CLI (brew install gemini-cli)\njq (brew install jq)\nGemini API key (from Google AI Studio)"
      },
      {
        "title": "Troubleshooting",
        "body": "\"Gemini failed\"\n→ Check GEMINI_API_KEY is set in .env or environment\n\n\"No suggestions generated\"\n→ Check daily notes exist in memory/YYYY-MM-DD.md\n→ Review error logs in agents/memory/error-*.txt\n\n\"Too many maintenance tasks\"\n→ Run openclaw skill memory-maintenance apply --safe to archive old files\n→ Adjust archive_after_days in config"
      },
      {
        "title": "Author",
        "body": "Built by Max Hutchinson as part of an AI agent infrastructure exploration.\n\nGitHub: @MaxLaurieHutchinson\nAgent: Ash (OpenClaw)"
      },
      {
        "title": "License",
        "body": "MIT — Free to use, modify, distribute.\n\nPart of the Hybrid Agent Architecture. Built for agents that improve over time."
      }
    ],
    "body": "Memory Maintenance Skill\n\nIntelligent memory management for OpenClaw agents. Reviews daily notes, suggests MEMORY.md updates, maintains directory health, and auto-cleans old files.\n\nWhy This Exists\n\nAgents wake up fresh every session. Without maintenance:\n\nDaily notes pile up and become unsearchable\nImportant decisions get buried in old sessions\nContext windows fill with irrelevant history\nYou repeat the same context-setting every day\n\nThis skill automates the tedious work of keeping your agent's memory organized and actionable.\n\nFeatures\nContent Review: Analyzes daily notes and suggests MEMORY.md updates\nDirectory Health: Monitors memory/ directory for naming issues, fragmentation, bloat\nAuto-Cleanup: Archives old reviews (7+ days) and enforces retention policy (30 days)\nSafe by Default: Content changes require approval; only safe maintenance auto-applies\nRecommended Model\n\nThis skill works well with lightweight models. We recommend:\n\nPrimary: gemini-2.5-flash (fast, cost-effective)\nFallback: gemini-2.5-flash-lite (if rate limits hit)\n\nBoth handle the structured output and analysis tasks efficiently.\n\nQuick Start\n# Install the skill\nclawhub install memory-maintenance\n\n# Configure (optional)\n# Edit config/settings.json to customize schedule, retention, etc.\n\n# Run manually\nopenclaw skill memory-maintenance run\n\n# Or let it run automatically via cron (configured during install)\n\nArchitecture\nDaily Session Notes (memory/YYYY-MM-DD.md)\n    ↓\nReview Agent (scheduled daily)\n    ↓\nStructured Suggestions (JSON)\n    ↓\nHuman Review (markdown report)\n    ↓\nApproved Updates → MEMORY.md\n    ↓\nAuto-Cleanup (archive old files)\n\nWorkflow\n\nDaily Review (23:00 by default)\n\nScans configurable lookback period (default: 7 days)\nChecks memory/ directory health\nGenerates suggestions via LLM\nOutputs structured JSON + human-readable markdown\n\nHuman Review\n\nRead agents/memory/review-v2-YYYY-MM-DD.md\nApprove/reject suggestions\n\nApply Changes\n\n# Dry run (preview)\nopenclaw skill memory-maintenance apply --dry-run 2026-02-05\n\n# Apply safe changes (archiving, cleanup)\nopenclaw skill memory-maintenance apply --safe 2026-02-05\n\n# Apply all (requires confirmation)\nopenclaw skill memory-maintenance apply --all 2026-02-05\n\n\nAuto-Cleanup (runs after successful review)\n\nArchives reviews older than configured threshold\nDeletes archive files older than retention period\nCleans up error logs\nConfiguration\n\nEdit config/settings.json:\n\n{\n  \"schedule\": {\n    \"enabled\": true,\n    \"time\": \"23:00\",\n    \"timezone\": \"Europe/London\"\n  },\n  \"review\": {\n    \"lookback_days\": 7,\n    \"model\": \"gemini-2.5-flash\",\n    \"max_suggestions\": 10\n  },\n  \"maintenance\": {\n    \"archive_after_days\": 7,\n    \"retention_days\": 30,\n    \"consolidate_fragments\": true,\n    \"auto_archive_safe\": true\n  },\n  \"safety\": {\n    \"require_approval_for_content\": true,\n    \"require_approval_for_delete\": true,\n    \"trash_instead_of_delete\": true\n  }\n}\n\nSafety\nContent suggestions: Never auto-applied (human review mandatory)\nSafe maintenance (archiving): Auto-applied with --safe\nRisky operations (delete, rename): Require --all + confirmation\nTrash recovery: Deleted files go to agents/memory/.trash/ (recoverable for retention period)\nCommands\n# Run review manually\nopenclaw skill memory-maintenance review\n\n# Apply changes\nopenclaw skill memory-maintenance apply [--dry-run|--safe|--all] DATE\n\n# Run cleanup\nopenclaw skill memory-maintenance cleanup\n\n# Check status\nopenclaw skill memory-maintenance status\n\n# View stats\nopenclaw skill memory-maintenance stats\n\nIntegration with MEMORY.md\n\nThe skill suggests updates to standard MEMORY.md sections:\n\nAgent Identity and Core Preferences\nInfrastructure/Setup\nMemory Management\nBackup & Migration\nContacts\nScheduled Operations\nContent Creation & Projects\nActive Projects\nFiles\nOutput\nagents/memory/review-v2-YYYY-MM-DD.json — Structured suggestions\nagents/memory/review-v2-YYYY-MM-DD.md — Human-readable report\nagents/memory/stats.json — Aggregate statistics\nArchive\nagents/memory/archive/YYYY-MM/ — Monthly buckets\nagents/memory/.trash/ — Recoverable deletions\nRequirements\nOpenClaw >= 2026.2.0\nGemini CLI (brew install gemini-cli)\njq (brew install jq)\nGemini API key (from Google AI Studio)\nTroubleshooting\n\n\"Gemini failed\" → Check GEMINI_API_KEY is set in .env or environment\n\n\"No suggestions generated\" → Check daily notes exist in memory/YYYY-MM-DD.md → Review error logs in agents/memory/error-*.txt\n\n\"Too many maintenance tasks\" → Run openclaw skill memory-maintenance apply --safe to archive old files → Adjust archive_after_days in config\n\nAuthor\n\nBuilt by Max Hutchinson as part of an AI agent infrastructure exploration.\n\nGitHub: @MaxLaurieHutchinson\nAgent: Ash (OpenClaw)\nLicense\n\nMIT — Free to use, modify, distribute.\n\nPart of the Hybrid Agent Architecture. Built for agents that improve over time."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/MaxLaurieHutchinson/memory-maintenance",
    "publisherUrl": "https://clawhub.ai/MaxLaurieHutchinson/memory-maintenance",
    "owner": "MaxLaurieHutchinson",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/memory-maintenance",
    "downloadUrl": "https://openagent3.xyz/downloads/memory-maintenance",
    "agentUrl": "https://openagent3.xyz/skills/memory-maintenance/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-maintenance/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-maintenance/agent.md"
  }
}