返回顶部
c

context-doctor

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
1,165
下载量
0
收藏
概述
安装方式
版本历史

context-doctor

# Context Doctor Diagnose and visualize how the context window budget is allocated. ## Quick Start Run the visualization script: ```bash python3 scripts/context-doctor.py ``` The script auto-detects: - Workspace path (`~/.openclaw/workspace` or `OPENCLAW_WORKSPACE` env) - OpenClaw version (via `openclaw --version`) - Installed skills (system + workspace) - Bootstrap file sizes and status ## Output Sections ### 1. Workspace Files Shows each bootstrap file with: - **Status**: ✓ OK / ✗ MISSING / ⚠ TRUNCATED (symlink target missing = MISSING) - **Characters & Tokens**: Raw size and estimated token count (chars/4) - **Visual bar**: Proportional to file size ### 2. Installed Skills Lists all discovered SKILL.md files from system and workspace skill directories. Skills are loaded on-demand, not in bootstrap — shown for awareness only. ### 3. Token Budget Breaks down bootstrap overhead: - System Prompt (framework) - Workspace Files (from scan) - Skills List (metadata descriptions) - Tool Schemas + Summaries Shows total bootstrap % vs free conversation space. ## Diagnostic Signals | Signal | Meaning | Action | |--------|---------|--------| | 🔴 TRUNCATED | File exceeded max chars, silently cut | Reduce file size or split content | | 🟡 MISSING | File not found or broken symlink | Check path, fix symlink target | | 🟢 Bootstrap <10% | Healthy | No action needed | | 🟠 Bootstrap >15% | Heavy | Review workspace files for bloat | ## Image Output (for chat / sharing) Generate a PNG image directly — no terminal screenshot needed: ```bash python3 scripts/context-doctor.py --png /tmp/context-doctor.png ``` The script renders a colored terminal-style image via Rich SVG export. Requires: `rich` (pip3 install rich) + one of: `rsvg-convert` (brew install librsvg) or `cairosvg` (pip3 install cairosvg). **Agent workflow**: When a user asks about context health in chat, run with `--png` and send the image directly. The output path is printed to stdout on success.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 context-doctor-1775882957 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 context-doctor-1775882957 技能

通过命令行安装

skillhub install context-doctor-1775882957

下载 Zip 包

⬇ 下载 context-doctor v1.2.0

文件大小: 8.43 KB | 发布时间: 2026-4-12 09:34

v1.2.0 最新 2026-4-12 09:34
feat: --summary flag for concise text output (emoji, health verdict, top files, budget). --png --summary combo for agent chat workflow. Fix: ANSI leak in PNG mode. Add --png/--json mutual exclusion.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部