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:
code --install-extension ctok-cli.ctokAlternatively, 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/coredirectly
Commands
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search ctok:
| Command | Description |
|---|---|
| ctok: Check Token Count | Estimate tokens for selected text or the active file |
| ctok: Refine Selection | Run the 7-pass refiner on the selected text |
| ctok: Scan Project | Scan the workspace folder and show token footprint |
| ctok: Open Panel | Open the ctok tool window |
| ctok: Set Plan | Set 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
| Setting | Default | Description |
|---|---|---|
ctok.plan | pro | Your Claude subscription plan for quota estimates |
ctok.defaultModel | (auto) | Override the recommended model |
Configure via Settings → Extensions → ctok.