{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawsaver",
    "name": "ClawSaver",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ragesaq/clawsaver",
    "canonicalUrl": "https://clawhub.ai/ragesaq/clawsaver",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/clawsaver",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawsaver",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "AUTO-INTEGRATION.md",
      "CHANGELOG.md",
      "CHECKLIST.md",
      "DECISION_RECORD.md",
      "INDEX.md",
      "INTEGRATION.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/clawsaver"
    },
    "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/clawsaver",
    "agentPageUrl": "https://openagent3.xyz/skills/clawsaver/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawsaver/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawsaver/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": "ClawSaver",
        "body": "Reduce model API costs by 20–40% through intelligent message batching and buffering.\n\nMost agent systems waste money on redundant API calls. When users send follow-up messages, you call the model separately for each one. ClawSaver fixes this by waiting ~800ms to collect related messages, then sending them together in a single optimized request. Same response quality. Lower cost. No user friction."
      },
      {
        "title": "How It Works: Batching & Buffering",
        "body": "WITHOUT CLAWSAVER (Context Overhead Hidden):\nUser:  \"What is ML?\"\nModel: → API Call #1 [Context: system prompt, chat history] (cost: $X)\n       Returns: definition\n\nUser:  \"Give an example\"\nModel: → API Call #2 [Context: system prompt, chat history, Q1, A1] (cost: $X)\n       Returns: example\n\nUser:  \"Apply to finance?\"\nModel: → API Call #3 [Context: system prompt, chat history, Q1–A2] (cost: $X)\n       Returns: finance application\n\nTotal: 3 calls × full context = 3X cost, each call repeats context overhead\n\n───────────────────────────────────────\n\nWITH CLAWSAVER (Single Context Load):\nUser:  \"What is ML?\"          ← Buffer (800ms wait)\nUser:  \"Give an example\"      ← Buffer (800ms wait)\nUser:  \"Apply to finance?\"    ← Flush: Send all 3 together\n\nModel: → API Call #1 [Context loaded ONCE: system prompt, chat history]\n       Processes all 3 questions together\n       Returns: comprehensive answer addressing all three\n\nTotal: 1 call × full context = 1X cost, context overhead paid once\n\nActual savings (with context): 67% reduction\nCost per token: 1/3 (fewer context re-loads + consolidation)\n\nWhy it matters: Context (system prompts, history, instructions) gets re-sent on every API call. With ClawSaver, you pay that context overhead once per batch instead of three times. This compounds the savings beyond just \"fewer calls.\"\n\nExample (4K token context, 200 output tokens):\n\nWithout ClawSaver: 3 calls × 4,200 tokens = 12,600 tokens\nWith ClawSaver: 1 call × 4,600 tokens = 4,600 tokens\nActual savings: 63% token reduction (even better than call reduction)"
      },
      {
        "title": "The Problem",
        "body": "User: \"What is machine learning?\"\n(pause)\nUser: \"Give an example\"\n(pause)\nUser: \"How does that apply to healthcare?\"\n\nWithout optimization: 3 API calls = 3x cost\nWith ClawSaver: 1 batched call = 1/3 the price\n\nAcross thousands of conversations, this compounds fast."
      },
      {
        "title": "How It Works",
        "body": "User sends message → ClawSaver buffers it\nWaits ~800ms for follow-ups from same user\nIf more messages arrive → keep buffering\nTimer expires → send all messages together\nModel responds once → you get complete answer\n\nWhy users don't notice: They're already waiting for your model response. Buffering input doesn't feel slower because the response comes right after the batch sends."
      },
      {
        "title": "Install",
        "body": "clawhub install clawsaver"
      },
      {
        "title": "Quick Start (10 lines)",
        "body": "import SessionDebouncer from 'clawsaver';\n\nconst debouncers = new Map();\n\nfunction handleMessage(userId, text) {\n  if (!debouncers.has(userId)) {\n    debouncers.set(userId, new SessionDebouncer(\n      userId,\n      (msgs) => callModel(userId, msgs)\n    ));\n  }\n  debouncers.get(userId).enqueue({ text });\n}"
      },
      {
        "title": "Impact",
        "body": "MetricValueCost reduction20–40% typicalSetup time10 minutesCode added~10 linesDependencies0File size4.2 KBLatency added+800ms (user-imperceptible)MaintenanceNone"
      },
      {
        "title": "Three Profiles",
        "body": "Choose based on your use case:"
      },
      {
        "title": "Balanced (Default)",
        "body": "25–35% savings\n800ms buffer\nChat, Q&A, general conversation"
      },
      {
        "title": "Aggressive",
        "body": "35–45% savings\n1.5s buffer\nBatch workflows, high-volume ingestion"
      },
      {
        "title": "Real-Time",
        "body": "5–10% savings\n200ms buffer\nInteractive, voice-first systems"
      },
      {
        "title": "When to Use",
        "body": "✅ Chat applications\n✅ Customer support bots\n✅ Multi-turn Q&A\n✅ Any conversation with follow-ups\n\n❌ Single-request workflows\n❌ Sub-100ms response requirements"
      },
      {
        "title": "API",
        "body": "new SessionDebouncer(userId, handler, {\n  debounceMs: 800,      // wait time\n  maxWaitMs: 3000,      // absolute max\n  maxMessages: 5,       // batch size cap\n  maxTokens: 2048       // reserved\n})\n\n// Methods\ndebouncer.enqueue(message)      // add to batch\ndebouncer.forceFlush(reason)    // send now\ndebouncer.getState()            // buffer + metrics\ndebouncer.getStatusString()     // human-readable"
      },
      {
        "title": "Docs",
        "body": "START_HERE.md — Navigation (pick your role/timeline)\nAUTO-INTEGRATION.md — ⭐ Drop-in middleware wrapper (2 min setup)\nQUICKSTART.md — 5-minute integration\nINTEGRATION.md — Patterns, edge cases, full config\nSUMMARY.md — Metrics and ROI (decision makers)\nSKILL.md — Full API reference\nexample-integration.js — Copy-paste templates"
      },
      {
        "title": "Security",
        "body": "No telemetry — Doesn't phone home\nNo network calls — Runs locally\nNo dependencies — Pure JavaScript\nYou control output — You decide what goes to your model\n\nData never leaves your machine."
      },
      {
        "title": "License",
        "body": "MIT\n\nStart here: Pick your path in START_HERE.md, or jump to QUICKSTART.md for 5-minute setup."
      }
    ],
    "body": "ClawSaver\n\nReduce model API costs by 20–40% through intelligent message batching and buffering.\n\nMost agent systems waste money on redundant API calls. When users send follow-up messages, you call the model separately for each one. ClawSaver fixes this by waiting ~800ms to collect related messages, then sending them together in a single optimized request. Same response quality. Lower cost. No user friction.\n\nHow It Works: Batching & Buffering\nWITHOUT CLAWSAVER (Context Overhead Hidden):\nUser:  \"What is ML?\"\nModel: → API Call #1 [Context: system prompt, chat history] (cost: $X)\n       Returns: definition\n\nUser:  \"Give an example\"\nModel: → API Call #2 [Context: system prompt, chat history, Q1, A1] (cost: $X)\n       Returns: example\n\nUser:  \"Apply to finance?\"\nModel: → API Call #3 [Context: system prompt, chat history, Q1–A2] (cost: $X)\n       Returns: finance application\n\nTotal: 3 calls × full context = 3X cost, each call repeats context overhead\n\n───────────────────────────────────────\n\nWITH CLAWSAVER (Single Context Load):\nUser:  \"What is ML?\"          ← Buffer (800ms wait)\nUser:  \"Give an example\"      ← Buffer (800ms wait)\nUser:  \"Apply to finance?\"    ← Flush: Send all 3 together\n\nModel: → API Call #1 [Context loaded ONCE: system prompt, chat history]\n       Processes all 3 questions together\n       Returns: comprehensive answer addressing all three\n\nTotal: 1 call × full context = 1X cost, context overhead paid once\n\nActual savings (with context): 67% reduction\nCost per token: 1/3 (fewer context re-loads + consolidation)\n\n\nWhy it matters: Context (system prompts, history, instructions) gets re-sent on every API call. With ClawSaver, you pay that context overhead once per batch instead of three times. This compounds the savings beyond just \"fewer calls.\"\n\nExample (4K token context, 200 output tokens):\n\nWithout ClawSaver: 3 calls × 4,200 tokens = 12,600 tokens\nWith ClawSaver: 1 call × 4,600 tokens = 4,600 tokens\nActual savings: 63% token reduction (even better than call reduction)\nThe Problem\nUser: \"What is machine learning?\"\n(pause)\nUser: \"Give an example\"\n(pause)\nUser: \"How does that apply to healthcare?\"\n\n\nWithout optimization: 3 API calls = 3x cost\nWith ClawSaver: 1 batched call = 1/3 the price\n\nAcross thousands of conversations, this compounds fast.\n\nHow It Works\nUser sends message → ClawSaver buffers it\nWaits ~800ms for follow-ups from same user\nIf more messages arrive → keep buffering\nTimer expires → send all messages together\nModel responds once → you get complete answer\n\nWhy users don't notice: They're already waiting for your model response. Buffering input doesn't feel slower because the response comes right after the batch sends.\n\nInstall\nclawhub install clawsaver\n\nQuick Start (10 lines)\nimport SessionDebouncer from 'clawsaver';\n\nconst debouncers = new Map();\n\nfunction handleMessage(userId, text) {\n  if (!debouncers.has(userId)) {\n    debouncers.set(userId, new SessionDebouncer(\n      userId,\n      (msgs) => callModel(userId, msgs)\n    ));\n  }\n  debouncers.get(userId).enqueue({ text });\n}\n\nImpact\nMetric\tValue\nCost reduction\t20–40% typical\nSetup time\t10 minutes\nCode added\t~10 lines\nDependencies\t0\nFile size\t4.2 KB\nLatency added\t+800ms (user-imperceptible)\nMaintenance\tNone\nThree Profiles\n\nChoose based on your use case:\n\nBalanced (Default)\n25–35% savings\n800ms buffer\nChat, Q&A, general conversation\nAggressive\n35–45% savings\n1.5s buffer\nBatch workflows, high-volume ingestion\nReal-Time\n5–10% savings\n200ms buffer\nInteractive, voice-first systems\nWhen to Use\n\n✅ Chat applications\n✅ Customer support bots\n✅ Multi-turn Q&A\n✅ Any conversation with follow-ups\n\n❌ Single-request workflows\n❌ Sub-100ms response requirements\n\nAPI\nnew SessionDebouncer(userId, handler, {\n  debounceMs: 800,      // wait time\n  maxWaitMs: 3000,      // absolute max\n  maxMessages: 5,       // batch size cap\n  maxTokens: 2048       // reserved\n})\n\n// Methods\ndebouncer.enqueue(message)      // add to batch\ndebouncer.forceFlush(reason)    // send now\ndebouncer.getState()            // buffer + metrics\ndebouncer.getStatusString()     // human-readable\n\nDocs\nSTART_HERE.md — Navigation (pick your role/timeline)\nAUTO-INTEGRATION.md — ⭐ Drop-in middleware wrapper (2 min setup)\nQUICKSTART.md — 5-minute integration\nINTEGRATION.md — Patterns, edge cases, full config\nSUMMARY.md — Metrics and ROI (decision makers)\nSKILL.md — Full API reference\nexample-integration.js — Copy-paste templates\nSecurity\nNo telemetry — Doesn't phone home\nNo network calls — Runs locally\nNo dependencies — Pure JavaScript\nYou control output — You decide what goes to your model\n\nData never leaves your machine.\n\nLicense\n\nMIT\n\nStart here: Pick your path in START_HERE.md, or jump to QUICKSTART.md for 5-minute setup."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ragesaq/clawsaver",
    "publisherUrl": "https://clawhub.ai/ragesaq/clawsaver",
    "owner": "ragesaq",
    "version": "1.4.7",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawsaver",
    "downloadUrl": "https://openagent3.xyz/downloads/clawsaver",
    "agentUrl": "https://openagent3.xyz/skills/clawsaver/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawsaver/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawsaver/agent.md"
  }
}