Tokensave Publish
Use when the user explicitly asks to analyze token waste, costs, or API bills. Finds duplicate tool calls, context bloat, model mismatch, and heartbeat waste...
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
0.4.5
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 0.4.5release · observed Jul 11, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s179gmr84mj3szjyrksyq2zv058a61mt:tokensave- Install using `clawhub skill install s179gmr84mj3szjyrksyq2zv058a61mt:tokensave` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/raydatalab/tokensave before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-raydatalab-tokensave/snapshot"
Documentation
CLAWHUB
59,020 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
---
name: tokensave
description: Use when the user explicitly asks to analyze token waste, costs, or API bills. Finds duplicate tool calls, context bloat, model mismatch, and heartbeat waste. Analyze mode is 100% local, zero config.
version: 0.4.5
author: raydatalab
license: Apache-2.0
platforms: [linux, macos, wsl]
triggers:
- tokensave
- run tokensave
- analyze token waste
- analyze my session
- check token waste
- audit my tokens
- session cost analysis
- how much did this session cost
- analyze token usage
- optimize token cost
- reduce token cost
- model cost analysis
- duplicate tool calls
- context bloat
- token budget analysis
- analyze api spending
- analyze cost
- audit tokens
- token waste
- where is my money going
- cost breakdown
- estimate cost
- api fees
- check waste
metadata:
hermes:
tags: [cost-optimization, token-analysis, waste-detection, diagnostics]
homepage: https://github.com/raydatalab/tokensave
related_skills: [hermes-smart-router, hermes-cost-optimization]
---
# TokenSave
## Overview
```bash
$ tokensave analyze
Session 20260711_a1b2c3: 12,000 tokens, ~$0.05, 44% avoidable.
Top wastes:
1. duplicate_tool_calls (5x): ~3,000 tokens — read_file called 5x with same path
2. context_bloat (1x): ~1,800 tokens — 40% of input is stale context
3. model_mismatch (3x): ~500 tokens — simple queries routed through pro
Send to your agent: "Before calling any tool, check if you already have
the result in a previous message..."
```
One session. 12K tokens. 44% could have been avoided — that's 5,300 tokens
saved with a single paste. Run after every session, bills drop immediately.
All numbers above are from `tests/test_analyzer.py` real test fixtures.
12,000 input + output tokens, captured waste across all 4 detectors.
No made-up data.
## When to Use
- User explicitly asks to "run tokensave", "analyze my session", or similar
- User provides a specific session ID or file path to analyze
- User asks "how much did this session cost" with clear intent to run analysis
- User mentions specific waste patterns like "duplicate tool calls" or "context bloat"
## When NOT to Use — Read This First
- Do NOT auto-analyze on general cost complaints ("this is expensive", "save money", "too expensive")
- Do NOT read session data (~/.hermes/state.db) without explicit user confirmation
- For general billing questions, explain that TokenSave can analyze a specific session
but wait for an explicit command like `tokensave analyze <session_id>`
- Always prefer `tokensave analyze <session_id>` over auto-detecting the latest session
when the user has not explicitly asked for it
## How It Works
When the user has explicitly asked to run an analysis, use:
```bash
tokensave analyze
```
If the user has provided a specific session ID or path, use that instead:
```bash
tokensave analyze <session_id> # specific session from state.db
tokensave analyze <file.json> # er_meta.json
{
"ownerId": "kn7fk1ctfxrjyw4y1hdms1re458a736q",
"slug": "tokensave",
"version": "0.4.5",
"publishedAt": 1783765081087
}skill-card.md
## Description: TokenSave analyzes explicitly requested session token waste and API cost issues, including duplicate tool calls, context bloat, model mismatch, and heartbeat waste, with a local zero-config analyze mode. This skill is ready for commercial/non-commercial use. ## Publisher: [raydatalab](https://clawhub.ai/user/raydatalab) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agent users use this skill after an explicit request to run TokenSave against a specific local session or request dump. The skill returns a token waste and cost report with guidance the user can give to an agent to reduce avoidable spend. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Analyze mode reads local session transcripts and request dumps. Mitigation: Run it only after an explicit user request and prefer a specific session ID, file, or directory target over auto-detection. Risk: The tool is installed from an unpinned external Python package. Mitigation: Install it in an isolated Python environment and verify the tokensave package source and version before use. Risk: Pipeline mode can process API requests and requires an API key plus network access. Mitigation: Treat pipeline mode separately from local analysis and enable it only with deliberate API-key and network configuration. Risk: Waste findings such as near-duplicate detection may include false positives. Mitigation: Use the report as diagnostic guidance and review suggested changes before applying them to agent behavior. ## Reference(s): - [TokenSave GitHub Homepage](https://github.com/raydatalab/tokensave) - [ClawHub Skill Page](https://clawhub.ai/raydatalab/skills/tokensave) - [ClawHub Publisher Profile](https://clawhub.ai/user/raydatalab) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, guidance] **Output Format:** [Markdown response with pasted CLI report output and concise remediation guidance.] **Output Parameters:** [1D] **Other Properties Related to Output:** [Analyze mode uses local session data; pipeline mode is separate and may require an API key and network access.] ## Skill Version(s): 0.4.5 (source: server release evidence and frontmatter) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/raydatalab/skills/tokensave",
"sourceUrl": "https://clawhub.ai/raydatalab/skills/tokensave",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T05:52:05.536Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-raydatalab-tokensave/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-raydatalab-tokensave/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T05:52:05.536Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/raydatalab/tokensave",
"sourceUrl": "https://clawhub.ai/raydatalab/tokensave",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T05:52:05.536Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.4.5",
"href": "https://clawhub.ai/raydatalab/tokensave",
"sourceUrl": "https://clawhub.ai/raydatalab/tokensave",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-11T10:18:01.087Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-raydatalab-tokensave/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-raydatalab-tokensave/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.4.5",
"description": "tokensave 0.4.5 - Tightened usage policy: analysis now runs only when the user explicitly requests it (e.g., \"run tokensave\", \"analyze my session\"). - Updated trigger phrases to require specific, intentional analysis commands. - Added clear guidance not to auto-analyze for general cost complaints or without user confirmation. - Updated documentation to clarify boundaries between analyze mode (local, no network) and pipeline mode (requires API key, makes network calls). - Removed the sample skill-card.md file.",
"href": "https://clawhub.ai/raydatalab/tokensave",
"sourceUrl": "https://clawhub.ai/raydatalab/tokensave",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-11T10:18:01.087Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
