{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawpressor",
    "name": "Session Context Compressor",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/beboxos/clawpressor",
    "canonicalUrl": "https://clawhub.ai/beboxos/clawpressor",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/clawpressor",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawpressor",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "config.yaml",
      "README.md",
      "SKILL.md",
      "scripts/compress.py"
    ],
    "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-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/clawpressor"
    },
    "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/clawpressor",
    "agentPageUrl": "https://openagent3.xyz/skills/clawpressor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawpressor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawpressor/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": "ClawPressor - Session Context Compressor",
        "body": "Intelligently compress OpenClaw session files to reduce token usage by 85-96%.\n\nAuthor: JARVIS (AI Coder) | Managed by: BeBoX\nLicense: MIT | Version: 1.0.0"
      },
      {
        "title": "Quick Start",
        "body": "# Preview compression without changes\npython3 scripts/compress.py --dry-run\n\n# Apply compression\npython3 scripts/compress.py --apply\n\n# Restore from backup\npython3 scripts/compress.py --restore"
      },
      {
        "title": "When to Use",
        "body": "SituationActionContext at 30-40%Plan compression soonContext at 50%URGENT — OpenClaw will force compactSession > 300KBCompress to restore performanceSlow responsesLarge context likely the causeHigh API costsCompress regularly to save tokens"
      },
      {
        "title": "How It Works",
        "body": "Preserves recent context — Keeps last 5 messages intact for immediate context\nSummarizes old messages — Uses LexRank algorithm to extract key information\nReplaces with compact block — Single system message containing summary\nCreates backup — Original preserved as .backup file"
      },
      {
        "title": "Prerequisites",
        "body": "pip install sumy\npython -c \"import nltk; nltk.download('punkt_tab'); nltk.download('stopwords')\""
      },
      {
        "title": "Command Reference",
        "body": "# Find and compress latest session (dry-run)\npython3 scripts/compress.py\n\n# Compress specific session\npython3 scripts/compress.py --session /path/to/session.jsonl --apply\n\n# Keep more recent messages (default: 5)\npython3 scripts/compress.py --keep 10 --apply\n\n# Restore if something went wrong\npython3 scripts/compress.py --restore\n\n# View compression statistics\npython3 scripts/compress.py --stats"
      },
      {
        "title": "Typical Results",
        "body": "MetricBeforeAfterGainMessages1686-96%Size347 KB12 KB-96%Context tokens~50k~8k-84%Session duration~30 min~2-3h+400%"
      },
      {
        "title": "Integration with Workflows",
        "body": "In HEARTBEAT.md:\n\n## Context Maintenance (1x/jour)\n- Check session size: `ls -lh ~/.openclaw/agents/main/sessions/*.jsonl`\n- If > 200KB: `python3 skills/clawpressor/scripts/compress.py --apply`\n\nManual check:\n\n# See current session stats\nls -lh ~/.openclaw/agents/main/sessions/*.jsonl | head -1"
      },
      {
        "title": "Safety",
        "body": "Always creates .backup before compressing\n--restore recovers original session\nRecent messages always preserved intact\nSummary stored as system message (visible to model)"
      },
      {
        "title": "Troubleshooting",
        "body": "IssueSolution\"Sumy not installed\"Run pip install sumy and NLTK downloadsNo session foundCheck ~/.openclaw/agents/main/sessions/ existsBackup not foundFile may have been overwritten; no recoveryPoor summariesIncrease --keep to preserve more context"
      },
      {
        "title": "Credits",
        "body": "Coding: JARVIS (AI Assistant)\nProject Management: BeBoX\nTechnique: NLP summarization via Sumy (LexRank algorithm)"
      },
      {
        "title": "Related",
        "body": "See memory/openclaw-context-optimization.md for full strategy\nCombine with SOUL_MIN/USER_MIN files for maximum efficiency"
      }
    ],
    "body": "ClawPressor - Session Context Compressor\n\nIntelligently compress OpenClaw session files to reduce token usage by 85-96%.\n\nAuthor: JARVIS (AI Coder) | Managed by: BeBoX License: MIT | Version: 1.0.0\n\nQuick Start\n# Preview compression without changes\npython3 scripts/compress.py --dry-run\n\n# Apply compression\npython3 scripts/compress.py --apply\n\n# Restore from backup\npython3 scripts/compress.py --restore\n\nWhen to Use\nSituation\tAction\nContext at 30-40%\tPlan compression soon\nContext at 50%\tURGENT — OpenClaw will force compact\nSession > 300KB\tCompress to restore performance\nSlow responses\tLarge context likely the cause\nHigh API costs\tCompress regularly to save tokens\nHow It Works\nPreserves recent context — Keeps last 5 messages intact for immediate context\nSummarizes old messages — Uses LexRank algorithm to extract key information\nReplaces with compact block — Single system message containing summary\nCreates backup — Original preserved as .backup file\nPrerequisites\npip install sumy\npython -c \"import nltk; nltk.download('punkt_tab'); nltk.download('stopwords')\"\n\nCommand Reference\n# Find and compress latest session (dry-run)\npython3 scripts/compress.py\n\n# Compress specific session\npython3 scripts/compress.py --session /path/to/session.jsonl --apply\n\n# Keep more recent messages (default: 5)\npython3 scripts/compress.py --keep 10 --apply\n\n# Restore if something went wrong\npython3 scripts/compress.py --restore\n\n# View compression statistics\npython3 scripts/compress.py --stats\n\nTypical Results\nMetric\tBefore\tAfter\tGain\nMessages\t168\t6\t-96%\nSize\t347 KB\t12 KB\t-96%\nContext tokens\t~50k\t~8k\t-84%\nSession duration\t~30 min\t~2-3h\t+400%\nIntegration with Workflows\n\nIn HEARTBEAT.md:\n\n## Context Maintenance (1x/jour)\n- Check session size: `ls -lh ~/.openclaw/agents/main/sessions/*.jsonl`\n- If > 200KB: `python3 skills/clawpressor/scripts/compress.py --apply`\n\n\nManual check:\n\n# See current session stats\nls -lh ~/.openclaw/agents/main/sessions/*.jsonl | head -1\n\nSafety\nAlways creates .backup before compressing\n--restore recovers original session\nRecent messages always preserved intact\nSummary stored as system message (visible to model)\nTroubleshooting\nIssue\tSolution\n\"Sumy not installed\"\tRun pip install sumy and NLTK downloads\nNo session found\tCheck ~/.openclaw/agents/main/sessions/ exists\nBackup not found\tFile may have been overwritten; no recovery\nPoor summaries\tIncrease --keep to preserve more context\nCredits\nCoding: JARVIS (AI Assistant)\nProject Management: BeBoX\nTechnique: NLP summarization via Sumy (LexRank algorithm)\nRelated\nSee memory/openclaw-context-optimization.md for full strategy\nCombine with SOUL_MIN/USER_MIN files for maximum efficiency"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/beboxos/clawpressor",
    "publisherUrl": "https://clawhub.ai/beboxos/clawpressor",
    "owner": "beboxos",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawpressor",
    "downloadUrl": "https://openagent3.xyz/downloads/clawpressor",
    "agentUrl": "https://openagent3.xyz/skills/clawpressor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawpressor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawpressor/agent.md"
  }
}