Token Saver 中文版 — 压缩 AI 常驻上下文与 token 成本

    1

    Reduce AI costs and prevent context overflow by auditing resident instructions and throttling runtime token usage.

    $6.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Token Saver 中文版 — 压缩 AI 常驻上下文与 token 成本

    Example session with this skill installed

    My CLAUDE.md is getting huge and I'm hitting context limits. Can you audit it and suggest ways to save tokens?

    • Read your context and instructions
    • Compiled the token saver

    I have audited your resident context files using the token_meter.py script. Your current configuration is approaching the limits for the Codex harness.

    Resident Context Audit

    Current Harness: Codex
    Budget: 32,768 bytes

    FileBytesEstimated TokensBudget %Risk
    CLAUDE.md24,150~6,10073.7%High
    AGENTS.md4,200~1,05012.8%Low
    Total28,350~7,15086.5%Warning

    Estimated after optimization: 28,350 → 12,400 bytes.

    Proposed Modifications

    CLAUDE.md (Lines 80-150): Move the detailed React component styling guide to docs/style-guide.md. Replace with a single-line reference.

    • Impact: -8,400 bytes.
    1. CLAUDE.md (Lines 200-230): Remove redundant environment setup commands already covered by the setup MCP tool.
      • Impact: -1,200 bytes.
    2. AGENTS.md: Consolidate multiple project-specific rules into concise imperative statements.
      • Impact: -6,350 bytes.

    Next steps

    • Run python3 scripts/token_meter.py count --path CLAUDE.md to verify these specific segments.
    • Review the suggested diffs; say "Apply CLAUDE.md diff" to proceed with the migration to reference files.
    • Consider starting a new session to clear the accumulated history now that the base context is leaner.
    CLAUDE.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Large project files and bloated instruction documents (CLAUDE.md/AGENTS.md) drain context windows and drive up API costs. Developers often pay for thousands of tokens of redundant history or unread logs that never needed to be in the prompt.

    What it does

    • Enforces "Read-on-Demand" patterns, using grep and line offsets to avoid reading entire large source files.
    • Cuts log bloat by redirecting command outputs to disk and only extracting relevant error traces or tail segments.
    • Audits resident context files (AGENTS.md, CLAUDE.md) against specific harness budgets like Codex (32KB) and DeepSeek (64KB).
    • Generates diff-based compression proposals to move verbose instructions into reference files while keeping active context lean.
    • Calculates real-time token usage via a standalone Python script, using tiktoken for precision or weighted estimation as a fallback.

    Frameworks & tools

    Compatible with Claude Code, Codex, DeepSeek Harness, and WorkBuddy. Uses Python 3.10+ standard library, grep, and optional tiktoken.

    Why this beats prompting it yourself

    Generic "be concise" prompts fail because LLMs naturally want to read more to be sure. This skill enforces technical constraints like shell-level piping, file indexing, and specific byte-limit audits that a standard prompt cannot consistently execute across long sessions.

    Use cases

    • Reducing session costs when debugging long stack traces or build logs.
    • Optimizing CLAUDE.md or AGENTS.md files that have grown past harness budget limits.
    • Detecting session fatigue to signal when to start a fresh conversation.
    • Auditing MCP tool definitions and skill descriptions for hidden context overhead.

    Known limitations

    Does not modify session history files. Resident file optimizations require manual user confirmation of generated diffs. Precision counting requires tiktoken installation.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Does not modify session history. Resident file optimizations require manual user confirmation of diffs. Precision counting requires tiktoken; otherwise, it falls back to weighted estimation.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill implements a 'Read-on-Demand' architecture and diff-based compression to prevent large source files and logs from clogging your context window, directly lowering API costs and preventing session fatigue.

    Token Saver is optimized for Claude Code, Codex, DeepSeek Harness, and WorkBuddy, requiring a Python 3.10+ environment to handle the technical auditing and token calculations.

    You receive the core Python-based auditing scripts, the shell-level integration patterns for grep/log management, and the proprietary instructions needed to enforce context budget constraints across your session.

    While it uses weighted estimation by default, installing the `tiktoken` library allows the skill to provide precise token counts for OpenAI and Claude models, giving you exact visibility into your context usage.

    The skill acts as a technical auditor that generates diff-based proposals; it will identify bloated instructions in files like CLAUDE.md and propose leaner versions, but it requires your manual confirmation before applying changes.

    New in LLM Ops