{
  "schemaVersion": "1.0",
  "item": {
    "slug": "token-optimizer",
    "name": "Tokenoptimizer",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/smartpeopleconnected/token-optimizer",
    "canonicalUrl": "https://clawhub.ai/smartpeopleconnected/token-optimizer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/token-optimizer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=token-optimizer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "README.md",
      "SKILL.md",
      "_meta.json",
      "cli.py",
      "requirements.txt"
    ],
    "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",
      "slug": "token-optimizer",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T12:59:14.535Z",
      "expiresAt": "2026-05-08T12:59:14.535Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=token-optimizer",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=token-optimizer",
        "contentDisposition": "attachment; filename=\"token-optimizer-1.0.18.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "token-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/token-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/token-optimizer",
    "agentPageUrl": "https://openagent3.xyz/skills/token-optimizer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/token-optimizer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/token-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. 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 Optimizer for OpenClaw",
        "body": "Slash your AI costs from $1,500+/month to under $50/month."
      },
      {
        "title": "The Problem",
        "body": "OpenClaw defaults prioritize capability over cost. You're burning expensive Sonnet/Opus tokens on tasks Haiku handles perfectly, paying for API heartbeats that could run free locally, and loading 50KB of context when 8KB suffices."
      },
      {
        "title": "The Solution",
        "body": "Four core optimizations plus powerful tooling:"
      },
      {
        "title": "Model Routing (92% savings)",
        "body": "Haiku by default, Sonnet/Opus only when needed"
      },
      {
        "title": "Multi-Provider Heartbeats (100% savings)",
        "body": "Route heartbeats to Ollama, LM Studio, Groq, or disable entirely. Not locked to one provider."
      },
      {
        "title": "Session Management (80% savings)",
        "body": "Load 8KB instead of 50KB context"
      },
      {
        "title": "Caching (90% savings)",
        "body": "Reuse prompts at 10% cost"
      },
      {
        "title": "New in v1.0.8",
        "body": "Rollback - List and restore config backups instantly\nHealth Check - Quick system status in one command\nDiff Preview - See exactly what changes before applying\n--no-color - CI/pipeline friendly output"
      },
      {
        "title": "Cost Comparison",
        "body": "PeriodBeforeAfterDaily$2-3$0.10Monthly$70-90$3-5Yearly$800+$40-60"
      },
      {
        "title": "What's Included",
        "body": "One-command optimizer with diff preview\nMulti-provider heartbeat (Ollama, LM Studio, Groq)\nConfig rollback and health check commands\nReady-to-use config templates\nSOUL.md & USER.md templates\nOptimization rules for agent prompts\nVerification and savings reports"
      },
      {
        "title": "What This Tool Modifies",
        "body": "All changes are written under ~/.openclaw/. A backup is created before any modification.\n\nPathPurpose~/.openclaw/openclaw.jsonMain OpenClaw config (model routing, heartbeat, budgets)~/.openclaw/backups/Timestamped config backups (created automatically)~/.openclaw/workspace/Template files (SOUL.md, USER.md, IDENTITY.md)~/.openclaw/prompts/Agent prompt optimization rules~/.openclaw/token-optimizer-stats.jsonUsage stats for savings reports\n\nSafe by default - All commands run in dry-run (preview) mode. Pass --apply to write changes."
      },
      {
        "title": "Quick Start",
        "body": "# Install\nclawhub install token-optimizer\n\n# Analyze current setup\npython cli.py analyze\n\n# Preview changes (dry-run by default)\npython cli.py optimize\n\n# Apply all optimizations\npython cli.py optimize --apply\n\n# Verify setup\npython cli.py verify\n\n# Quick health check\npython cli.py health\n\n# Configure heartbeat provider (preview)\npython cli.py setup-heartbeat --provider ollama\n\n# Configure heartbeat provider (apply)\npython cli.py setup-heartbeat --provider ollama --apply\n\n# List and restore backups\npython cli.py rollback --list\npython cli.py rollback --to <backup-file>"
      },
      {
        "title": "Configuration Generated",
        "body": "{\n  \"agents\": {\n    \"defaults\": {\n      \"model\": { \"primary\": \"anthropic/claude-haiku-4-5\" },\n      \"cache\": { \"enabled\": true, \"ttl\": \"5m\" }\n    }\n  },\n  \"heartbeat\": {\n    \"provider\": \"ollama\",\n    \"model\": \"ollama/llama3.2:3b\"\n  },\n  \"budgets\": {\n    \"daily\": 5.00,\n    \"monthly\": 200.00\n  }\n}"
      },
      {
        "title": "Links",
        "body": "GitHub: https://github.com/smartpeopleconnected/openclaw-token-optimizer\nIssues: https://github.com/smartpeopleconnected/openclaw-token-optimizer/issues"
      },
      {
        "title": "Author",
        "body": "Smart People Connected\n\nGitHub: @smartpeopleconnected\nEmail: smartpeopleconnected@gmail.com"
      },
      {
        "title": "License",
        "body": "MIT License - Free to use, modify, and distribute.\n\n5 minutes to setup. 97% cost reduction. Stop burning tokens. Start building."
      }
    ],
    "body": "Token Optimizer for OpenClaw\n\nSlash your AI costs from $1,500+/month to under $50/month.\n\nThe Problem\n\nOpenClaw defaults prioritize capability over cost. You're burning expensive Sonnet/Opus tokens on tasks Haiku handles perfectly, paying for API heartbeats that could run free locally, and loading 50KB of context when 8KB suffices.\n\nThe Solution\n\nFour core optimizations plus powerful tooling:\n\nModel Routing (92% savings)\n\nHaiku by default, Sonnet/Opus only when needed\n\nMulti-Provider Heartbeats (100% savings)\n\nRoute heartbeats to Ollama, LM Studio, Groq, or disable entirely. Not locked to one provider.\n\nSession Management (80% savings)\n\nLoad 8KB instead of 50KB context\n\nCaching (90% savings)\n\nReuse prompts at 10% cost\n\nNew in v1.0.8\nRollback - List and restore config backups instantly\nHealth Check - Quick system status in one command\nDiff Preview - See exactly what changes before applying\n--no-color - CI/pipeline friendly output\nCost Comparison\nPeriod\tBefore\tAfter\nDaily\t$2-3\t$0.10\nMonthly\t$70-90\t$3-5\nYearly\t$800+\t$40-60\nWhat's Included\nOne-command optimizer with diff preview\nMulti-provider heartbeat (Ollama, LM Studio, Groq)\nConfig rollback and health check commands\nReady-to-use config templates\nSOUL.md & USER.md templates\nOptimization rules for agent prompts\nVerification and savings reports\nWhat This Tool Modifies\n\nAll changes are written under ~/.openclaw/. A backup is created before any modification.\n\nPath\tPurpose\n~/.openclaw/openclaw.json\tMain OpenClaw config (model routing, heartbeat, budgets)\n~/.openclaw/backups/\tTimestamped config backups (created automatically)\n~/.openclaw/workspace/\tTemplate files (SOUL.md, USER.md, IDENTITY.md)\n~/.openclaw/prompts/\tAgent prompt optimization rules\n~/.openclaw/token-optimizer-stats.json\tUsage stats for savings reports\n\nSafe by default - All commands run in dry-run (preview) mode. Pass --apply to write changes.\n\nQuick Start\n# Install\nclawhub install token-optimizer\n\n# Analyze current setup\npython cli.py analyze\n\n# Preview changes (dry-run by default)\npython cli.py optimize\n\n# Apply all optimizations\npython cli.py optimize --apply\n\n# Verify setup\npython cli.py verify\n\n# Quick health check\npython cli.py health\n\n# Configure heartbeat provider (preview)\npython cli.py setup-heartbeat --provider ollama\n\n# Configure heartbeat provider (apply)\npython cli.py setup-heartbeat --provider ollama --apply\n\n# List and restore backups\npython cli.py rollback --list\npython cli.py rollback --to <backup-file>\n\nConfiguration Generated\n{\n  \"agents\": {\n    \"defaults\": {\n      \"model\": { \"primary\": \"anthropic/claude-haiku-4-5\" },\n      \"cache\": { \"enabled\": true, \"ttl\": \"5m\" }\n    }\n  },\n  \"heartbeat\": {\n    \"provider\": \"ollama\",\n    \"model\": \"ollama/llama3.2:3b\"\n  },\n  \"budgets\": {\n    \"daily\": 5.00,\n    \"monthly\": 200.00\n  }\n}\n\nLinks\nGitHub: https://github.com/smartpeopleconnected/openclaw-token-optimizer\nIssues: https://github.com/smartpeopleconnected/openclaw-token-optimizer/issues\nAuthor\n\nSmart People Connected\n\nGitHub: @smartpeopleconnected\nEmail: smartpeopleconnected@gmail.com\nLicense\n\nMIT License - Free to use, modify, and distribute.\n\n5 minutes to setup. 97% cost reduction. Stop burning tokens. Start building."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/smartpeopleconnected/token-optimizer",
    "publisherUrl": "https://clawhub.ai/smartpeopleconnected/token-optimizer",
    "owner": "smartpeopleconnected",
    "version": "1.0.18",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/token-optimizer",
    "downloadUrl": "https://openagent3.xyz/downloads/token-optimizer",
    "agentUrl": "https://openagent3.xyz/skills/token-optimizer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/token-optimizer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/token-optimizer/agent.md"
  }
}