{
  "schemaVersion": "1.0",
  "item": {
    "slug": "context-viz",
    "name": "Context Visualization",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/furukama/context-viz",
    "canonicalUrl": "https://clawhub.ai/furukama/context-viz",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/context-viz",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-viz",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "scripts/estimate_tokens.py",
      "SKILL.md"
    ],
    "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. 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. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/context-viz"
    },
    "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/context-viz",
    "agentPageUrl": "https://openagent3.xyz/skills/context-viz/agent",
    "manifestUrl": "https://openagent3.xyz/skills/context-viz/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/context-viz/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. 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. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Context Visualization",
        "body": "Estimate and display a breakdown of the current context window usage."
      },
      {
        "title": "How It Works",
        "body": "Run the bundled script to estimate token counts for workspace files:\n\npython3 scripts/estimate_tokens.py /path/to/workspace\n\nThe script counts characters in known workspace files and estimates tokens (~4 chars/token).\n\nThen call session_status to get the actual context usage from OpenClaw."
      },
      {
        "title": "Generating the Visualization",
        "body": "Run session_status to get: model, context used/total, compactions\nRun scripts/estimate_tokens.py <workspace_path> to estimate file token sizes\nEstimate message tokens: context_used - system_overhead - file_tokens\nPresent the breakdown using the format below"
      },
      {
        "title": "Output Format",
        "body": "Use a monospace block with bar chart. Adapt the bar lengths proportionally.\n\n📊 Context Usage\n<model> • <used>k/<total>k tokens (<pct>%)\n\nComponent                    Tokens    %     \n─────────────────────────────────────────────\n⚙️  System prompt + tools    ~Xk      X%    ░░\n📋  AGENTS.md                ~Xk      X%    ░\n👻  SOUL.md                  ~Xk      X%    \n👤  USER.md                  ~Xk      X%    \n🔧  TOOLS.md                 ~Xk      X%    ░\n💓  HEARTBEAT.md             ~Xk      X%    \n🧠  MEMORY.md                ~Xk      X%    ░\n🪪  IDENTITY.md              ~Xk      X%    \n💬  Messages                 ~Xk      X%    ░░░░░░░░░░░░\n📭  Free space               ~Xk      X%    ░░░░░\n─────────────────────────────────────────────\n\nUse ░ blocks: 1 block per ~2% of total context. Round to nearest block."
      },
      {
        "title": "Memory Inventory (not in context)",
        "body": "Below the context chart, add a Memory on Disk section showing what's stored in memory/ — grouped by category. These files are NOT loaded into context but represent the agent's total knowledge base.\n\n💾 Memory on Disk (not in context)\nCategory                     Files  Tokens   Size\n──────────────────────────────────────────────────\n📰  chinese-ai-digests        12    ~23k     92KB\n📁  other                     11    ~12k     46KB\n📅  daily-notes                9    ~5k      17KB\n🗃️  zettelkasten               8    ~4k      15KB\n💼  linkedin                   2    ~1k       5KB\n──────────────────────────────────────────────────\n     Total:                   42    ~44k    177KB\n\nThe script auto-categorizes files by directory or filename pattern."
      },
      {
        "title": "Notes",
        "body": "Token estimates use ~4 chars/token (rough average for English/mixed content)\nSystem prompt + tools overhead is estimated at ~8-10k tokens for a typical OpenClaw setup\nMessage tokens are the remainder after subtracting files + system overhead\nMemory files are informational only — they show what the agent has accumulated\nFor Discord/WhatsApp: skip markdown tables, use the block format above"
      }
    ],
    "body": "Context Visualization\n\nEstimate and display a breakdown of the current context window usage.\n\nHow It Works\n\nRun the bundled script to estimate token counts for workspace files:\n\npython3 scripts/estimate_tokens.py /path/to/workspace\n\n\nThe script counts characters in known workspace files and estimates tokens (~4 chars/token).\n\nThen call session_status to get the actual context usage from OpenClaw.\n\nGenerating the Visualization\nRun session_status to get: model, context used/total, compactions\nRun scripts/estimate_tokens.py <workspace_path> to estimate file token sizes\nEstimate message tokens: context_used - system_overhead - file_tokens\nPresent the breakdown using the format below\nOutput Format\n\nUse a monospace block with bar chart. Adapt the bar lengths proportionally.\n\n📊 Context Usage\n<model> • <used>k/<total>k tokens (<pct>%)\n\nComponent                    Tokens    %     \n─────────────────────────────────────────────\n⚙️  System prompt + tools    ~Xk      X%    ░░\n📋  AGENTS.md                ~Xk      X%    ░\n👻  SOUL.md                  ~Xk      X%    \n👤  USER.md                  ~Xk      X%    \n🔧  TOOLS.md                 ~Xk      X%    ░\n💓  HEARTBEAT.md             ~Xk      X%    \n🧠  MEMORY.md                ~Xk      X%    ░\n🪪  IDENTITY.md              ~Xk      X%    \n💬  Messages                 ~Xk      X%    ░░░░░░░░░░░░\n📭  Free space               ~Xk      X%    ░░░░░\n─────────────────────────────────────────────\n\n\nUse ░ blocks: 1 block per ~2% of total context. Round to nearest block.\n\nMemory Inventory (not in context)\n\nBelow the context chart, add a Memory on Disk section showing what's stored in memory/ — grouped by category. These files are NOT loaded into context but represent the agent's total knowledge base.\n\n💾 Memory on Disk (not in context)\nCategory                     Files  Tokens   Size\n──────────────────────────────────────────────────\n📰  chinese-ai-digests        12    ~23k     92KB\n📁  other                     11    ~12k     46KB\n📅  daily-notes                9    ~5k      17KB\n🗃️  zettelkasten               8    ~4k      15KB\n💼  linkedin                   2    ~1k       5KB\n──────────────────────────────────────────────────\n     Total:                   42    ~44k    177KB\n\n\nThe script auto-categorizes files by directory or filename pattern.\n\nNotes\nToken estimates use ~4 chars/token (rough average for English/mixed content)\nSystem prompt + tools overhead is estimated at ~8-10k tokens for a typical OpenClaw setup\nMessage tokens are the remainder after subtracting files + system overhead\nMemory files are informational only — they show what the agent has accumulated\nFor Discord/WhatsApp: skip markdown tables, use the block format above"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/furukama/context-viz",
    "publisherUrl": "https://clawhub.ai/furukama/context-viz",
    "owner": "furukama",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/context-viz",
    "downloadUrl": "https://openagent3.xyz/downloads/context-viz",
    "agentUrl": "https://openagent3.xyz/skills/context-viz/agent",
    "manifestUrl": "https://openagent3.xyz/skills/context-viz/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/context-viz/agent.md"
  }
}