{
  "schemaVersion": "1.0",
  "item": {
    "slug": "compaction-survival",
    "name": "Compaction Survival System",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/rustyorb/compaction-survival",
    "canonicalUrl": "https://clawhub.ai/rustyorb/compaction-survival",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/compaction-survival",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=compaction-survival",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "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-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/compaction-survival"
    },
    "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/compaction-survival",
    "agentPageUrl": "https://openagent3.xyz/skills/compaction-survival/agent",
    "manifestUrl": "https://openagent3.xyz/skills/compaction-survival/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/compaction-survival/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": "Compaction Survival System",
        "body": "Compaction destroys specifics: file paths, exact values, config details, reasoning chains. This skill ensures critical state survives.\n\nThe problem: When your context window fills up, OpenClaw compacts older messages into a summary. Summaries lose precision — exact numbers become \"approximately,\" file paths vanish, decisions lose their rationale. Your agent wakes up dumber after every compaction.\n\nThe fix: Three mechanisms that capture critical state before compaction hits, and recover it after."
      },
      {
        "title": "1. WAL Protocol (Write-Ahead Logging)",
        "body": "On EVERY incoming message, scan for:\n\n✏️ Corrections — \"It's X, not Y\" / \"Actually...\"\n📍 Proper nouns — names, places, companies, products\n🎨 Preferences — styles, approaches, \"I like/don't like\"\n📋 Decisions — \"Let's do X\" / \"Go with Y\"\n📝 Draft changes — edits to active work\n🔢 Specific values — numbers, dates, IDs, URLs, paths\n\nIf ANY appear:\n\nSTOP — do not compose response yet\nWRITE — update SESSION-STATE.md with the detail\nTHEN — respond to the human\n\nThe trigger fires on the human's INPUT, not your memory. Write what they said, not what you think."
      },
      {
        "title": "2. Working Buffer (Danger Zone)",
        "body": "At 60% context utilization (check via session_status):\n\nCreate/clear memory/working-buffer.md, write header:\n# Working Buffer (Danger Zone)\n**Status:** ACTIVE\n**Started:** [timestamp]\n\n\nEvery exchange after 60%: append human's message + your response summary\nBuffer is a file — it survives compaction\nLeave buffer as-is until next 60% threshold in a new session\n\nLocation: memory/working-buffer.md"
      },
      {
        "title": "3. Compaction Recovery",
        "body": "Auto-trigger when:\n\nSession starts with <summary> tag in context\nYou should know something but don't\nHuman says \"where were we?\" / \"continue\" / \"what were we doing?\"\n\nRecovery steps (in order):\n\nRead memory/working-buffer.md — raw danger-zone exchanges\nRead SESSION-STATE.md — active task state\nRead today's + yesterday's memory/YYYY-MM-DD.md\nRun memory_search if still missing context\nExtract important context from buffer → update SESSION-STATE.md\nReport: \"Recovered context. Last task was X. Continuing.\"\n\nNEVER ask \"what were we discussing?\" — the buffer has the answer."
      },
      {
        "title": "SESSION-STATE.md Format",
        "body": "# Session State — Active Working Memory\n\n## Current Task\n[What we're actively working on]\n\n## Key Details\n- [Specific values, paths, configs captured via WAL]\n\n## Decisions Made\n- [Decisions with rationale]\n\n## Pending\n- [What's waiting/blocked]\n\n## Last Updated\n[timestamp]\n\nUpdate this file frequently. It's your RAM — the only place specifics survive between compaction events."
      },
      {
        "title": "How It Works Together",
        "body": "┌──────────────────────────┐\n                    │    Human sends message    │\n                    └────────────┬─────────────┘\n                                 │\n                    ┌────────────▼─────────────┐\n                    │  WAL: Scan for specifics  │\n                    │  Found? Write first.      │\n                    └────────────┬─────────────┘\n                                 │\n               ┌─────────────────▼─────────────────┐\n               │  Context > 60%? Buffer everything  │\n               └─────────────────┬─────────────────┘\n                                 │\n                    ┌────────────▼─────────────┐\n                    │    Respond to human       │\n                    └────────────┬─────────────┘\n                                 │\n                        ┌────────▼────────┐\n                        │  COMPACTION HIT  │\n                        └────────┬────────┘\n                                 │\n                    ┌────────────▼─────────────┐\n                    │  Recovery: Read buffer,   │\n                    │  SESSION-STATE, daily log  │\n                    │  → Full context restored   │\n                    └──────────────────────────┘"
      },
      {
        "title": "Integration",
        "body": "Works alongside MEMORY.md (long-term) and memory/YYYY-MM-DD.md (daily logs)\nSESSION-STATE.md = working memory for current task\nWorking buffer = emergency capture for the danger zone\nAll three layers stack: WAL → Buffer → Recovery\nNo dependencies. No API keys. Pure behavioral patterns."
      },
      {
        "title": "Why This Works",
        "body": "Most \"memory\" solutions try to store everything forever. That's the wrong problem. The real problem is precision loss during compaction. You don't need to remember everything — you need to remember the RIGHT things at the RIGHT time.\n\nWAL catches specifics the moment they appear. The buffer captures the danger zone. Recovery restores context after the reset. Three layers, zero dependencies, zero data leakage.\n\nBuilt by @rustyorb + S1nthetta ⚡ — Battle-tested across 30+ compaction events."
      }
    ],
    "body": "Compaction Survival System\n\nCompaction destroys specifics: file paths, exact values, config details, reasoning chains. This skill ensures critical state survives.\n\nThe problem: When your context window fills up, OpenClaw compacts older messages into a summary. Summaries lose precision — exact numbers become \"approximately,\" file paths vanish, decisions lose their rationale. Your agent wakes up dumber after every compaction.\n\nThe fix: Three mechanisms that capture critical state before compaction hits, and recover it after.\n\nThree Mechanisms\n1. WAL Protocol (Write-Ahead Logging)\n\nOn EVERY incoming message, scan for:\n\n✏️ Corrections — \"It's X, not Y\" / \"Actually...\"\n📍 Proper nouns — names, places, companies, products\n🎨 Preferences — styles, approaches, \"I like/don't like\"\n📋 Decisions — \"Let's do X\" / \"Go with Y\"\n📝 Draft changes — edits to active work\n🔢 Specific values — numbers, dates, IDs, URLs, paths\n\nIf ANY appear:\n\nSTOP — do not compose response yet\nWRITE — update SESSION-STATE.md with the detail\nTHEN — respond to the human\n\nThe trigger fires on the human's INPUT, not your memory. Write what they said, not what you think.\n\n2. Working Buffer (Danger Zone)\n\nAt 60% context utilization (check via session_status):\n\nCreate/clear memory/working-buffer.md, write header:\n# Working Buffer (Danger Zone)\n**Status:** ACTIVE\n**Started:** [timestamp]\n\nEvery exchange after 60%: append human's message + your response summary\nBuffer is a file — it survives compaction\nLeave buffer as-is until next 60% threshold in a new session\n\nLocation: memory/working-buffer.md\n\n3. Compaction Recovery\n\nAuto-trigger when:\n\nSession starts with <summary> tag in context\nYou should know something but don't\nHuman says \"where were we?\" / \"continue\" / \"what were we doing?\"\n\nRecovery steps (in order):\n\nRead memory/working-buffer.md — raw danger-zone exchanges\nRead SESSION-STATE.md — active task state\nRead today's + yesterday's memory/YYYY-MM-DD.md\nRun memory_search if still missing context\nExtract important context from buffer → update SESSION-STATE.md\nReport: \"Recovered context. Last task was X. Continuing.\"\n\nNEVER ask \"what were we discussing?\" — the buffer has the answer.\n\nSESSION-STATE.md Format\n# Session State — Active Working Memory\n\n## Current Task\n[What we're actively working on]\n\n## Key Details\n- [Specific values, paths, configs captured via WAL]\n\n## Decisions Made\n- [Decisions with rationale]\n\n## Pending\n- [What's waiting/blocked]\n\n## Last Updated\n[timestamp]\n\n\nUpdate this file frequently. It's your RAM — the only place specifics survive between compaction events.\n\nHow It Works Together\n                    ┌──────────────────────────┐\n                    │    Human sends message    │\n                    └────────────┬─────────────┘\n                                 │\n                    ┌────────────▼─────────────┐\n                    │  WAL: Scan for specifics  │\n                    │  Found? Write first.      │\n                    └────────────┬─────────────┘\n                                 │\n               ┌─────────────────▼─────────────────┐\n               │  Context > 60%? Buffer everything  │\n               └─────────────────┬─────────────────┘\n                                 │\n                    ┌────────────▼─────────────┐\n                    │    Respond to human       │\n                    └────────────┬─────────────┘\n                                 │\n                        ┌────────▼────────┐\n                        │  COMPACTION HIT  │\n                        └────────┬────────┘\n                                 │\n                    ┌────────────▼─────────────┐\n                    │  Recovery: Read buffer,   │\n                    │  SESSION-STATE, daily log  │\n                    │  → Full context restored   │\n                    └──────────────────────────┘\n\nIntegration\nWorks alongside MEMORY.md (long-term) and memory/YYYY-MM-DD.md (daily logs)\nSESSION-STATE.md = working memory for current task\nWorking buffer = emergency capture for the danger zone\nAll three layers stack: WAL → Buffer → Recovery\nNo dependencies. No API keys. Pure behavioral patterns.\nWhy This Works\n\nMost \"memory\" solutions try to store everything forever. That's the wrong problem. The real problem is precision loss during compaction. You don't need to remember everything — you need to remember the RIGHT things at the RIGHT time.\n\nWAL catches specifics the moment they appear. The buffer captures the danger zone. Recovery restores context after the reset. Three layers, zero dependencies, zero data leakage.\n\nBuilt by @rustyorb + S1nthetta ⚡ — Battle-tested across 30+ compaction events."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/rustyorb/compaction-survival",
    "publisherUrl": "https://clawhub.ai/rustyorb/compaction-survival",
    "owner": "rustyorb",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/compaction-survival",
    "downloadUrl": "https://openagent3.xyz/downloads/compaction-survival",
    "agentUrl": "https://openagent3.xyz/skills/compaction-survival/agent",
    "manifestUrl": "https://openagent3.xyz/skills/compaction-survival/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/compaction-survival/agent.md"
  }
}