{
  "schemaVersion": "1.0",
  "item": {
    "slug": "openclaw-context-optimizer",
    "name": "Openclaw Context Optimizer",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/AtlasPA/openclaw-context-optimizer",
    "canonicalUrl": "https://clawhub.ai/AtlasPA/openclaw-context-optimizer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/openclaw-context-optimizer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-context-optimizer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "AGENT-PAYMENTS.md",
      "hooks/request-after.js",
      "hooks/request-before.js",
      "hooks/session-end.js",
      "IMPLEMENTATION_SUMMARY.md",
      "migrations/001-init.sql"
    ],
    "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",
      "slug": "openclaw-context-optimizer",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T23:32:24.746Z",
      "expiresAt": "2026-05-09T23:32:24.746Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-context-optimizer",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=openclaw-context-optimizer",
        "contentDisposition": "attachment; filename=\"openclaw-context-optimizer-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "openclaw-context-optimizer"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/openclaw-context-optimizer"
    },
    "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/openclaw-context-optimizer",
    "agentPageUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer/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": "OpenClaw Context Optimizer",
        "body": "Reduce context/token usage by 40-60% through intelligent compression and learning."
      },
      {
        "title": "What is it?",
        "body": "The first OpenClaw skill that intelligently compresses context to reduce token costs by 40-60%. Uses multiple strategies (deduplication, pruning, summarization) and learns what context matters over time. Works seamlessly with Memory System for maximum efficiency."
      },
      {
        "title": "Key Features",
        "body": "⚡ 40-60% Token Savings - Intelligent compression without information loss\n🧠 Learning System - Adapts to what context matters in your workflow\n🔄 Multiple Strategies - Dedup, prune, summarize, hybrid\n💾 Memory Integration - Works with OpenClaw Memory System\n💰 x402 Payments - Agents can pay for unlimited compressions (0.5 USDT/month)\n📊 ROI Tracking - Automatically calculates return on investment"
      },
      {
        "title": "Free vs Pro Tier",
        "body": "Free Tier:\n\n100 compressions per day\nAll compression strategies\nBasic statistics and ROI tracking\n\nPro Tier (0.5 USDT/month):\n\nUnlimited compressions\nAdvanced learning algorithms\nPriority compression\nDetailed analytics\nCustom compression rules"
      },
      {
        "title": "Installation",
        "body": "claw skill install openclaw-context-optimizer"
      },
      {
        "title": "Commands",
        "body": "# Compress context manually\nclaw optimize compress \"Long context...\" --strategy=hybrid\n\n# Show compression stats\nclaw optimize stats\n\n# View compression history\nclaw optimize history --limit=10\n\n# Calculate ROI\nclaw optimize roi\n\n# Open dashboard\nclaw optimize dashboard\n\n# Subscribe to Pro\nclaw optimize subscribe"
      },
      {
        "title": "How It Works",
        "body": "Hooks into requests - Automatically intercepts context before API calls\nAnalyzes content - Identifies redundant, irrelevant, or summarizable info\nApplies strategy - Deduplication → Pruning → Summarization\nLearns patterns - Tracks what context was useful vs. wasted\nCompresses intelligently - Reduces tokens by 40-60%"
      },
      {
        "title": "Compression Strategies",
        "body": "Deduplication (20-30% savings):\n\nRemoves repeated information across messages\nBest for long conversations with repeated facts\n\nPruning (30-40% savings):\n\nRemoves low-importance messages (greetings, confirmations)\nBest for conversations with filler content\n\nSummarization (40-60% savings):\n\nCondenses long exchanges into key points\nBest for technical discussions and planning\n\nHybrid (40-60% savings - Recommended):\n\nCombines all strategies intelligently\nBest for most use cases"
      },
      {
        "title": "Use Cases",
        "body": "Reduce token costs on long conversations\nCompress repeated project context\nSummarize technical discussions\nRemove filler from chat history\nLearn compression patterns over time"
      },
      {
        "title": "Agent Economy",
        "body": "Agents can autonomously evaluate if Pro tier is worth it:\n\nCost: 0.5 USDT/month\nValue: Saves 40-60% on token costs\nROI: If saves >0.5 USDT/month in tokens, it pays for itself\n\nExample:\n\nOriginal: 5,000 tokens × $0.003/1K = $0.015 per request\nCompressed: 2,000 tokens × $0.003/1K = $0.006 per request\nSavings: $0.009 per request\n\n60 requests/day = $0.54/day = $16.20/month saved\nPro cost: $0.50/month\nNet profit: $15.70/month\n\nSee AGENT-PAYMENTS.md for x402 integration details."
      },
      {
        "title": "Memory System Integration",
        "body": "Works best with OpenClaw Memory System:\n\nStores compression patterns as memories\nLearns what context is important over time\nRecalls successful strategies from past sessions\nCombined savings: 50-70%\n\nclaw skill install openclaw-memory\nclaw skill install openclaw-context-optimizer"
      },
      {
        "title": "Privacy",
        "body": "All data stored locally in ~/.openclaw/openclaw-context-optimizer/\nNo external servers or telemetry\nCompression happens locally (no API calls)\nOpen source - audit the code yourself"
      },
      {
        "title": "Dashboard",
        "body": "Access web UI at http://localhost:9092:\n\nReal-time compression statistics\nToken savings over time\nROI calculation (savings vs. Pro cost)\nStrategy performance comparison\nCompression history with before/after view\nQuota usage and license status"
      },
      {
        "title": "ROI Tracking",
        "body": "Context Optimizer automatically calculates return on investment:\n\n$ claw optimize roi\n\nROI Analysis (Last 30 Days)\n────────────────────────────────\nTotal compressions: 1,247\nAverage savings: 60%\n\nCost without optimizer: $10.28\nCost with optimizer: $4.11\nSavings: $6.17\n\nPro tier cost: $0.50/month\nNet savings: $5.67/month\nROI: 1,134% 🎉"
      },
      {
        "title": "Requirements",
        "body": "Node.js 18+\nOpenClaw v2026.1.30+\nOS: Windows, macOS, Linux\nOptional: OpenClaw Memory System (recommended)"
      },
      {
        "title": "API Reference",
        "body": "# Compress context\nPOST /api/compress\n{\n  \"agent_wallet\": \"0x...\",\n  \"context\": \"Long context...\",\n  \"strategy\": \"hybrid\"\n}\n\n# Get stats\nGET /api/stats?agent_wallet=0x...\n\n# Get ROI analysis\nGET /api/roi?agent_wallet=0x...\n\n# x402 payment endpoints\nPOST /api/x402/subscribe\nPOST /api/x402/verify\nGET /api/x402/license/:wallet"
      },
      {
        "title": "Statistics Example",
        "body": "Token Savings:\n- Original: 3,425,000 tokens\n- Compressed: 1,370,000 tokens\n- Saved: 2,055,000 tokens (60%)\n\nCost Savings (30 days):\n- Without optimizer: $10.28\n- With optimizer: $4.11\n- Savings: $6.17\n\nStrategy Performance:\n- Hybrid: 60% avg (800 uses)\n- Summarization: 55% avg (250 uses)\n- Pruning: 35% avg (47 uses)\n- Deduplication: 25% avg (150 uses)"
      },
      {
        "title": "Economic Rationale",
        "body": "Should you upgrade to Pro?\n\nIf you make enough API calls where 40-60% token savings exceed 0.5 USDT/month, Pro tier pays for itself.\n\nTypical savings:\n\nSmall projects: $2-5/month saved → $1.50-4.50 profit\nMedium projects: $10-20/month saved → $9.50-19.50 profit\nLarge projects: $50+/month saved → $49.50+ profit"
      },
      {
        "title": "Links",
        "body": "Documentation\nAgent Payments Guide\nGitHub Repository\nClawHub Page\n\nBuilt by the OpenClaw community | First context optimizer with x402 payments"
      }
    ],
    "body": "OpenClaw Context Optimizer\n\nReduce context/token usage by 40-60% through intelligent compression and learning.\n\nWhat is it?\n\nThe first OpenClaw skill that intelligently compresses context to reduce token costs by 40-60%. Uses multiple strategies (deduplication, pruning, summarization) and learns what context matters over time. Works seamlessly with Memory System for maximum efficiency.\n\nKey Features\n⚡ 40-60% Token Savings - Intelligent compression without information loss\n🧠 Learning System - Adapts to what context matters in your workflow\n🔄 Multiple Strategies - Dedup, prune, summarize, hybrid\n💾 Memory Integration - Works with OpenClaw Memory System\n💰 x402 Payments - Agents can pay for unlimited compressions (0.5 USDT/month)\n📊 ROI Tracking - Automatically calculates return on investment\nFree vs Pro Tier\n\nFree Tier:\n\n100 compressions per day\nAll compression strategies\nBasic statistics and ROI tracking\n\nPro Tier (0.5 USDT/month):\n\nUnlimited compressions\nAdvanced learning algorithms\nPriority compression\nDetailed analytics\nCustom compression rules\nInstallation\nclaw skill install openclaw-context-optimizer\n\nCommands\n# Compress context manually\nclaw optimize compress \"Long context...\" --strategy=hybrid\n\n# Show compression stats\nclaw optimize stats\n\n# View compression history\nclaw optimize history --limit=10\n\n# Calculate ROI\nclaw optimize roi\n\n# Open dashboard\nclaw optimize dashboard\n\n# Subscribe to Pro\nclaw optimize subscribe\n\nHow It Works\nHooks into requests - Automatically intercepts context before API calls\nAnalyzes content - Identifies redundant, irrelevant, or summarizable info\nApplies strategy - Deduplication → Pruning → Summarization\nLearns patterns - Tracks what context was useful vs. wasted\nCompresses intelligently - Reduces tokens by 40-60%\nCompression Strategies\n\nDeduplication (20-30% savings):\n\nRemoves repeated information across messages\nBest for long conversations with repeated facts\n\nPruning (30-40% savings):\n\nRemoves low-importance messages (greetings, confirmations)\nBest for conversations with filler content\n\nSummarization (40-60% savings):\n\nCondenses long exchanges into key points\nBest for technical discussions and planning\n\nHybrid (40-60% savings - Recommended):\n\nCombines all strategies intelligently\nBest for most use cases\nUse Cases\nReduce token costs on long conversations\nCompress repeated project context\nSummarize technical discussions\nRemove filler from chat history\nLearn compression patterns over time\nAgent Economy\n\nAgents can autonomously evaluate if Pro tier is worth it:\n\nCost: 0.5 USDT/month\nValue: Saves 40-60% on token costs\nROI: If saves >0.5 USDT/month in tokens, it pays for itself\n\nExample:\n\nOriginal: 5,000 tokens × $0.003/1K = $0.015 per request\nCompressed: 2,000 tokens × $0.003/1K = $0.006 per request\nSavings: $0.009 per request\n\n60 requests/day = $0.54/day = $16.20/month saved\nPro cost: $0.50/month\nNet profit: $15.70/month\n\n\nSee AGENT-PAYMENTS.md for x402 integration details.\n\nMemory System Integration\n\nWorks best with OpenClaw Memory System:\n\nStores compression patterns as memories\nLearns what context is important over time\nRecalls successful strategies from past sessions\nCombined savings: 50-70%\nclaw skill install openclaw-memory\nclaw skill install openclaw-context-optimizer\n\nPrivacy\nAll data stored locally in ~/.openclaw/openclaw-context-optimizer/\nNo external servers or telemetry\nCompression happens locally (no API calls)\nOpen source - audit the code yourself\nDashboard\n\nAccess web UI at http://localhost:9092:\n\nReal-time compression statistics\nToken savings over time\nROI calculation (savings vs. Pro cost)\nStrategy performance comparison\nCompression history with before/after view\nQuota usage and license status\nROI Tracking\n\nContext Optimizer automatically calculates return on investment:\n\n$ claw optimize roi\n\nROI Analysis (Last 30 Days)\n────────────────────────────────\nTotal compressions: 1,247\nAverage savings: 60%\n\nCost without optimizer: $10.28\nCost with optimizer: $4.11\nSavings: $6.17\n\nPro tier cost: $0.50/month\nNet savings: $5.67/month\nROI: 1,134% 🎉\n\nRequirements\nNode.js 18+\nOpenClaw v2026.1.30+\nOS: Windows, macOS, Linux\nOptional: OpenClaw Memory System (recommended)\nAPI Reference\n# Compress context\nPOST /api/compress\n{\n  \"agent_wallet\": \"0x...\",\n  \"context\": \"Long context...\",\n  \"strategy\": \"hybrid\"\n}\n\n# Get stats\nGET /api/stats?agent_wallet=0x...\n\n# Get ROI analysis\nGET /api/roi?agent_wallet=0x...\n\n# x402 payment endpoints\nPOST /api/x402/subscribe\nPOST /api/x402/verify\nGET /api/x402/license/:wallet\n\nStatistics Example\nToken Savings:\n- Original: 3,425,000 tokens\n- Compressed: 1,370,000 tokens\n- Saved: 2,055,000 tokens (60%)\n\nCost Savings (30 days):\n- Without optimizer: $10.28\n- With optimizer: $4.11\n- Savings: $6.17\n\nStrategy Performance:\n- Hybrid: 60% avg (800 uses)\n- Summarization: 55% avg (250 uses)\n- Pruning: 35% avg (47 uses)\n- Deduplication: 25% avg (150 uses)\n\nEconomic Rationale\n\nShould you upgrade to Pro?\n\nIf you make enough API calls where 40-60% token savings exceed 0.5 USDT/month, Pro tier pays for itself.\n\nTypical savings:\n\nSmall projects: $2-5/month saved → $1.50-4.50 profit\nMedium projects: $10-20/month saved → $9.50-19.50 profit\nLarge projects: $50+/month saved → $49.50+ profit\nLinks\nDocumentation\nAgent Payments Guide\nGitHub Repository\nClawHub Page\n\nBuilt by the OpenClaw community | First context optimizer with x402 payments"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/AtlasPA/openclaw-context-optimizer",
    "publisherUrl": "https://clawhub.ai/AtlasPA/openclaw-context-optimizer",
    "owner": "AtlasPA",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer",
    "downloadUrl": "https://openagent3.xyz/downloads/openclaw-context-optimizer",
    "agentUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/openclaw-context-optimizer/agent.md"
  }
}