{
  "schemaVersion": "1.0",
  "item": {
    "slug": "token-saver",
    "name": "Token Saver",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/RubenAQuispe/token-saver",
    "canonicalUrl": "https://clawhub.ai/RubenAQuispe/token-saver",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/token-saver",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=token-saver",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "audit.json",
      "package.json",
      "README.md",
      "scripts/analyzer.js",
      "scripts/compressor.js",
      "scripts/models.json"
    ],
    "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/token-saver"
    },
    "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/token-saver",
    "agentPageUrl": "https://openagent3.xyz/skills/token-saver/agent",
    "manifestUrl": "https://openagent3.xyz/skills/token-saver/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/token-saver/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": "Token Saver v3",
        "body": "💡 Did you know? Every API call sends your workspace files (SOUL.md, USER.md, MEMORY.md, AGENTS.md, etc.) along with your message. These files count toward your context window, slowing responses and costing real money on every message.\n\nToken Saver v3 is model-aware — it knows your model's context window and adapts recommendations accordingly. Using Gemini's 1M context? Presets scale up. On GPT-4o's 128K? Presets adjust down."
      },
      {
        "title": "What's New in v3",
        "body": "Featurev2v3Compaction presetsFixed (80K/120K/160K)Dynamic (% of model's context)Model detectionFragile, env-onlyRobust fallback chainContext windowsNot trackedFull registry (9 models)Model infoHardcoded pricingJSON registry, easy updatesAlready-optimizedRe-compressedSmart bypass"
      },
      {
        "title": "Commands",
        "body": "CommandWhat it does/optimizeFull dashboard — files, models, context usage %/optimize tokensCompress workspace files (auto-backup)/optimize compactionChat compaction control (model-aware)/optimize compaction balancedApply balanced preset (60% of context)/optimize compaction 120Custom threshold (compact at 120K)/optimize modelsDetailed model audit with registry/optimize revertRestore backups, disable persistent mode"
      },
      {
        "title": "📊 Model-Aware Dashboard",
        "body": "Shows current model, context window, and usage percentage:\n\n🤖 Model: Claude Opus 4.5 (200K context)\n   Detected: openclaw.json\n\n📊 Context Usage: [████████░░░░░░░░░░░░] 42% (84K/200K)"
      },
      {
        "title": "📁 Workspace File Compression",
        "body": "Scans all .md files, shows token count and potential savings. Smart bypass skips already-optimized files.\n\nFile-aware compression:\n\nSOUL.md — Light compression, keeps personality language\nAGENTS.md — Medium compression, dense instructions\nUSER.md / MEMORY.md — Heavy compression, key:value format\nPROJECTS.md — No compression (user structure preserved)"
      },
      {
        "title": "💬 Dynamic Compaction Presets",
        "body": "Presets adapt to your model's context window:\n\nPreset% of ContextClaude 200KGPT-4o 128KGemini 1MAggressive40%80K51K400KBalanced60%120K77K600KConservative80%160K102K800KOff95%190K122K950K"
      },
      {
        "title": "🤖 Model Registry",
        "body": "24+ models with context windows, pricing, and aliases:\n\nClaude: Opus 4.6 (1M), Opus 4.5, Sonnet 4.5, Sonnet 4, Haiku 4.5, Haiku 3.5 (200K)\nOpenAI: GPT-5.2, GPT-5.1, GPT-5-mini, GPT-5-nano (256K), GPT-4.1, GPT-4o (128K), o1, o3, o4-mini\nGemini: 3 Pro (2M), 2.5 Pro, 2.0 Flash (1M)\nOthers: DeepSeek V3 (64K), Kimi K2.5 (128K), Llama 3.3 70B, Mistral Large"
      },
      {
        "title": "🔍 Robust Model Detection",
        "body": "Detection priority:\n\nRuntime injection (--model=...)\nEnvironment variables (SKILL_MODEL, OPENCLAW_MODEL)\nConfig file (~/.openclaw/openclaw.json)\nFile inference (TOOLS.md, MEMORY.md mentions)\nFallback: Claude Sonnet 4 (safe default)\n\nUnknown model handling:\n\nStrict version matching — opus-6.5 won't fuzzy-match to opus-4.5\nUnknown models get safe defaults (200K context) + warning\nEasy to add new models to scripts/models.json"
      },
      {
        "title": "📝 Persistent Mode",
        "body": "Adds writing guidance to AGENTS.md for continued token efficiency:\n\nFileWriting StyleSOUL.mdEvocative, personality-shapingAGENTS.mdDense instructions, symbols OKUSER.mdKey:value factsMEMORY.mdUltra-dense data"
      },
      {
        "title": "Safety",
        "body": "Auto-backup — All modified files get .backup extension\nIntegrity > Size — Never sacrifices meaning for smaller tokens\nSmart bypass — Skips already-optimized files\nRevert anytime — /optimize revert restores everything\nNo external calls — All analysis runs locally"
      },
      {
        "title": "Installation",
        "body": "clawhub install token-saver --registry \"https://www.clawhub.ai\""
      },
      {
        "title": "Version History",
        "body": "3.0.0 — Model registry, dynamic presets, robust detection, smart bypass\n2.0.1 — Chat compaction, file-aware compression, persistent mode\n1.0.0 — Initial release"
      }
    ],
    "body": "Token Saver v3\n\n💡 Did you know? Every API call sends your workspace files (SOUL.md, USER.md, MEMORY.md, AGENTS.md, etc.) along with your message. These files count toward your context window, slowing responses and costing real money on every message.\n\nToken Saver v3 is model-aware — it knows your model's context window and adapts recommendations accordingly. Using Gemini's 1M context? Presets scale up. On GPT-4o's 128K? Presets adjust down.\n\nWhat's New in v3\nFeature\tv2\tv3\nCompaction presets\tFixed (80K/120K/160K)\tDynamic (% of model's context)\nModel detection\tFragile, env-only\tRobust fallback chain\nContext windows\tNot tracked\tFull registry (9 models)\nModel info\tHardcoded pricing\tJSON registry, easy updates\nAlready-optimized\tRe-compressed\tSmart bypass\nCommands\nCommand\tWhat it does\n/optimize\tFull dashboard — files, models, context usage %\n/optimize tokens\tCompress workspace files (auto-backup)\n/optimize compaction\tChat compaction control (model-aware)\n/optimize compaction balanced\tApply balanced preset (60% of context)\n/optimize compaction 120\tCustom threshold (compact at 120K)\n/optimize models\tDetailed model audit with registry\n/optimize revert\tRestore backups, disable persistent mode\nFeatures\n📊 Model-Aware Dashboard\n\nShows current model, context window, and usage percentage:\n\n🤖 Model: Claude Opus 4.5 (200K context)\n   Detected: openclaw.json\n\n📊 Context Usage: [████████░░░░░░░░░░░░] 42% (84K/200K)\n\n📁 Workspace File Compression\n\nScans all .md files, shows token count and potential savings. Smart bypass skips already-optimized files.\n\nFile-aware compression:\n\nSOUL.md — Light compression, keeps personality language\nAGENTS.md — Medium compression, dense instructions\nUSER.md / MEMORY.md — Heavy compression, key:value format\nPROJECTS.md — No compression (user structure preserved)\n💬 Dynamic Compaction Presets\n\nPresets adapt to your model's context window:\n\nPreset\t% of Context\tClaude 200K\tGPT-4o 128K\tGemini 1M\nAggressive\t40%\t80K\t51K\t400K\nBalanced\t60%\t120K\t77K\t600K\nConservative\t80%\t160K\t102K\t800K\nOff\t95%\t190K\t122K\t950K\n🤖 Model Registry\n\n24+ models with context windows, pricing, and aliases:\n\nClaude: Opus 4.6 (1M), Opus 4.5, Sonnet 4.5, Sonnet 4, Haiku 4.5, Haiku 3.5 (200K)\nOpenAI: GPT-5.2, GPT-5.1, GPT-5-mini, GPT-5-nano (256K), GPT-4.1, GPT-4o (128K), o1, o3, o4-mini\nGemini: 3 Pro (2M), 2.5 Pro, 2.0 Flash (1M)\nOthers: DeepSeek V3 (64K), Kimi K2.5 (128K), Llama 3.3 70B, Mistral Large\n🔍 Robust Model Detection\n\nDetection priority:\n\nRuntime injection (--model=...)\nEnvironment variables (SKILL_MODEL, OPENCLAW_MODEL)\nConfig file (~/.openclaw/openclaw.json)\nFile inference (TOOLS.md, MEMORY.md mentions)\nFallback: Claude Sonnet 4 (safe default)\n\nUnknown model handling:\n\nStrict version matching — opus-6.5 won't fuzzy-match to opus-4.5\nUnknown models get safe defaults (200K context) + warning\nEasy to add new models to scripts/models.json\n📝 Persistent Mode\n\nAdds writing guidance to AGENTS.md for continued token efficiency:\n\nFile\tWriting Style\nSOUL.md\tEvocative, personality-shaping\nAGENTS.md\tDense instructions, symbols OK\nUSER.md\tKey:value facts\nMEMORY.md\tUltra-dense data\nSafety\nAuto-backup — All modified files get .backup extension\nIntegrity > Size — Never sacrifices meaning for smaller tokens\nSmart bypass — Skips already-optimized files\nRevert anytime — /optimize revert restores everything\nNo external calls — All analysis runs locally\nInstallation\nclawhub install token-saver --registry \"https://www.clawhub.ai\"\n\nVersion History\n3.0.0 — Model registry, dynamic presets, robust detection, smart bypass\n2.0.1 — Chat compaction, file-aware compression, persistent mode\n1.0.0 — Initial release"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/RubenAQuispe/token-saver",
    "publisherUrl": "https://clawhub.ai/RubenAQuispe/token-saver",
    "owner": "RubenAQuispe",
    "version": "3.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/token-saver",
    "downloadUrl": "https://openagent3.xyz/downloads/token-saver",
    "agentUrl": "https://openagent3.xyz/skills/token-saver/agent",
    "manifestUrl": "https://openagent3.xyz/skills/token-saver/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/token-saver/agent.md"
  }
}