跳到正文
TakoAPI
返回技能列表

context-viz

由 furukama 提供

Web & Frontend Development
427下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Visualize the current context window usage — token estimates per component (system prompt, tools, workspace files.

描述

该技能的功能

Estimates and displays a breakdown of the current context window, showing how many tokens each component (system prompt, workspace files, messages, free space) is consuming. Uses a Python script for file token estimation and the session_status tool for live context data. Also lists memory files stored on disk that aren't currently loaded.

Gives a per-component token breakdown rather than just a single usage percentage, so you can pinpoint exactly what to trim.

何时使用

  • Checking how full the context is before a long task
  • Diagnosing which workspace files are eating the most tokens
  • Deciding when to compact or clear context
  • Auditing memory accumulation across sessions
  • Comparing token usage across different model context sizes

示例工作流

输入

User asks: how full is my context right now?

智能体
  1. 1

    Call session_status to get model, tokens used, tokens total, and compaction count

  2. 2

    Run scripts/estimate_tokens.py against the workspace path to get per-file token estimates

  3. 3

    Subtract file tokens and system overhead from total context used to estimate message tokens

  4. 4

    Calculate free space as total minus used

  5. 5

    Render the monospace bar chart with proportional ░ blocks per component

输出

A formatted context breakdown showing ~Xk tokens per component with bar lengths scaled to percentage of total context, followed by a memory-on-disk inventory grouped by category

安装

clawhub install furukama/context-viz

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接