Skip to content

VS Code Extension

The ctok VS Code extension brings token estimation, model recommendations, and prompt refinement into the editor sidebar, status bar, and command palette.

Install

Search “ctok - Claude Token Estimator” in the VS Code Marketplace, or:

Terminal window
code --install-extension ctok-cli.ctok

Alternatively, download the .vsix from the GitHub Releases page and install via Extensions → Install from VSIX…

Requirements

  • VS Code 1.85+
  • No external CLI needed - the extension uses @ctok/core directly

Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search ctok:

CommandDescription
ctok: Check Token CountEstimate tokens for selected text or the active file
ctok: Refine SelectionRun the 7-pass refiner on the selected text
ctok: Scan ProjectScan the workspace folder and show token footprint
ctok: Open PanelOpen the ctok tool window
ctok: Set PlanSet your Claude subscription plan

Tool window

The ctok panel (View → Open View → ctok) shows:

  • Input / output token estimates and ranges
  • Cost breakdown at the recommended model
  • Model + effort recommendation with reasoning
  • Reduction suggestions

Status bar

A ⚡ ~1.2k tok badge appears in the status bar when you have text selected. Click it to open the full panel.

Settings

SettingDefaultDescription
ctok.planproYour Claude subscription plan for quota estimates
ctok.defaultModel(auto)Override the recommended model

Configure via Settings → Extensions → ctok.