Token counts
How many tokens an agent reads to write VibeLang, and how many a VibeLang program takes beside the Effect TypeScript it replaces.
An agent that writes VibeLang loads the skill first: its forms, rules and idioms, with a link to the page that owns each one. The vibelang npm package ships it at node_modules/vibelang/skills/vibelang/SKILL.md.
Method
- Tokenizer: OpenAI's
o200k_baseencoding, through js-tiktoken 1.0.21. No Anthropic count is published: Anthropic offers no verified offline tokenizer for its current models, and these docs do not estimate one. - Pages: each file's exact, complete Markdown source, nothing stripped. This page is not counted.
- Cheat-sheet pairs: each entry's paired code blocks as written, after removing the docs checker's directives. Imports written in those blocks are counted. Shared declarations and companion files outside the paired blocks are excluded. Some fragments need a surrounding
Effect.genbody. - Reference programs: each program's exact, complete source, with its imports, whitespace and final newline. Nothing is removed.
- Scripts:
docs/tools/token-counts.tsin the VibeLang repository measures the loads, the cheat-sheet pairs and the page sizes.bun docs/tools/token-counts.ts --checkfails when this page drifts from what it measures, and--writeupdates it.docs/user/benchmarks/reference-tokens/count.mjsmeasures the reference programs.
Thirty reference pairs
The repository's benchmark-30/v1 suite has 30 tasks in six categories. Each task has a reference pair: two programs that solve it, one in VibeLang and one in Effect TypeScript. This table counts both programs of every reference pair.
| Category | Reference pairs | Effect TypeScript | VibeLang | Saved |
|---|---|---|---|---|
| Typed Errors & Recovery | 5 | 1,170 | 790 | 32.5% |
| Services & Layers | 5 | 937 | 659 | 29.7% |
| Structured Concurrency | 5 | 671 | 478 | 28.8% |
| Resource Safety & Streams | 5 | 822 | 590 | 28.2% |
| Platform & Boundary Soundness | 5 | 822 | 669 | 18.6% |
| Effect UI Components | 5 | 1,761 | 1,502 | 14.7% |
| All 30 reference pairs | 30 | 6,183 | 4,688 | 24.2% |
- Across the 30 reference pairs, the VibeLang programs take 4,688 tokens and the Effect TypeScript programs take 6,183: 24.2% fewer in total.
- VibeLang is shorter in all 30 reference pairs.
- The saving in one reference pair runs from 5.4% to 43.7%, with a median of 26.9%.
- In characters, the totals are 17,391 and 23,982: 27.5% fewer.
- The Effect TypeScript programs run from 102 to 481 tokens each.
The reference token count produced these numbers. Its results.json records both counts of every reference pair and the SHA-256 of each source file. node count.mjs there counts again and fails when results.json differs.
What the count shows
A token count is the size of the source text. A person reads that text and a model reads or writes it, so a smaller count means less text for either. The count is exact for a model that uses o200k_base. Other models' tokenizers give other counts.
The count does not show more than that:
- No model ran. The count says nothing about whether an agent finishes a task, how long it takes or what it costs.
- The project wrote both programs of every pair. A different author could write either side shorter or longer.
- The count does not compile or run the programs. The suite's own verifier does that. It needs a compiler build, and the linked README names it.
Two measurements, two totals
This page reports two savings, and they do not combine. Each has its own programs and its own total.
| Aspect | Reference pairs | Cheat-sheet entries |
|---|---|---|
| Table | Thirty reference pairs | Effect TypeScript beside VibeLang |
| One row | A category of five reference pairs | One snippet that shows one form |
| What is counted | The whole file. Every Effect TypeScript program imports from effect. | The paired code blocks. Shared declarations outside them are excluded. |
| Where VibeLang is longer | In no reference pair | In the entries that table marks with a negative saving |
A cheat-sheet entry isolates one form, and for some forms the VibeLang spelling is the longer one. A reference program solves a whole task, so it also counts the imports, declarations and signatures around those forms. Quote each saving with its own count of reference pairs or entries.
What an agent loads
| Load | Tokens |
|---|---|
The VibeLang skill, packages/compiler/skills/vibelang/SKILL.md | 5,187 |
| The skill and the cheat sheet | 17,552 |
| The skill and the user guide (173 pages) | 640,000 |
| The user guide alone | 630,000 |
| The specification (11 chapters) | 320,000 |
The decision log, docs/design/history/DECISIONS.md | 140,000 |
Effect TypeScript beside VibeLang
6.7% fewer tokens across 47 pairs in total; VibeLang is longer in 20 pairs. This is the saving over the combined source tokens, not the arithmetic mean of the percentages below.
Each row is one cheat sheet entry: its Effect TypeScript blocks against its VibeLang blocks. A negative saving means the VibeLang snippet is longer.
| Entry | Effect TypeScript | VibeLang | Saved |
|---|---|---|---|
| Effect types | 81 | 62 | 23.5% |
| Errors | 36 | 9 | 75.0% |
| Errors are classes | 97 | 89 | 8.2% |
| Errors that encode | 37 | 12 | 67.6% |
| Services | 37 | 31 | 16.2% |
| Services of any shape | 57 | 43 | 24.6% |
| Layers | 45 | 44 | 2.2% |
| Schemas | 48 | 27 | 43.8% |
| Schema aliases | 26 | 10 | 61.5% |
| Data types | 41 | 14 | 65.9% |
| Readonly members | 14 | 14 | 0.0% |
| Statements instead of generators | 47 | 49 | -4.3% |
| Programs as Effect values | 28 | 30 | -7.1% |
| Providing layers | 36 | 28 | 22.2% |
| Providing one service | 63 | 54 | 14.3% |
| Catching by tag | 50 | 49 | 2.0% |
| Falling back in an expression | 40 | 30 | 25.0% |
| Catching in an expression | 47 | 48 | -2.1% |
| Entry point | 22 | 38 | -72.7% |
| Catch every cause | 49 | 50 | -2.0% |
| Rethrow a cause | 35 | 52 | -48.6% |
| Run on every exit | 29 | 31 | -6.9% |
| Exit, yield, and interrupt | 33 | 38 | -15.2% |
| Interruption | 65 | 66 | -1.5% |
No imports from effect or its subpath packages | 29 | 16 | 44.8% |
| Look up platform services | 63 | 31 | 50.8% |
Effect's functions without the Effect. prefix | 43 | 34 | 20.9% |
| Operators on Effect's data types | 54 | 53 | 1.9% |
| The pipe operator | 34 | 27 | 20.6% |
| Fail on a missing value | 41 | 43 | -4.9% |
| Blocks as values | 34 | 48 | -41.2% |
| Effect blocks as arguments | 77 | 83 | -7.8% |
| Match a value | 61 | 40 | 34.4% |
| Match errors by class | 59 | 43 | 27.1% |
| Match a data type's variants | 29 | 55 | -89.7% |
| Option, Exit, and Result | 60 | 62 | -3.3% |
| Test and bind | 44 | 45 | -2.3% |
Native await | 189 | 267 | -41.3% |
| TypeScript companion files | 88 | 30 | 65.9% |
| Fork and join | 43 | 35 | 18.6% |
| Wait for several | 62 | 66 | -6.5% |
| First success, all outcomes | 52 | 49 | 5.8% |
| Fork scoped work | 52 | 39 | 25.0% |
| Detached and scoped fibers | 35 | 50 | -42.9% |
| Wait for a Deferred | 30 | 34 | -13.3% |
| Race | 43 | 66 | -53.5% |
| A concurrent loop | 40 | 36 | 10.0% |
| All 47 entries | 2,325 | 2,170 | 6.7% |
Every page
Onboarding
| Page | Tokens |
|---|---|
| Start Here | 8,100 |
| Welcome | 3,500 |
| Why VibeLang? | 3,100 |
| A Real Provider, Before and After | 1,500 |
| Learning Path | 11,000 |
| The Effect Type | 2,100 |
| Installation | 2,500 |
| Creating Effects | 2,900 |
| Two Types of Errors | 960 |
| Basic Concurrency | 2,100 |
| Core Concepts | 15,000 |
| Effect's Modules | 2,100 |
| Running Effects | 1,400 |
| Sequencing Effects | 1,200 |
| Building Pipelines | 1,500 |
| Devtools | 9,100 |
| All 13 pages | 34,000 |
Setup
| Page | Tokens |
|---|---|
| Set up VibeLang | 1,900 |
| What is in the alpha | 3,700 |
| Source maps | 920 |
| Docs freshness | 1,800 |
| Start a project | 5,500 |
| New project | 620 |
| Existing project | 2,000 |
| Migrating retired forms | 2,900 |
| Build and test | 8,900 |
| vibelang CLI | 6,600 |
| Vite and Vitest | 2,400 |
| Format and lint | 11,000 |
| Format with dprint | 2,000 |
| Developer tools | 8,600 |
| Frameworks | 15,000 |
| Effect UI | 3,900 |
| React | 1,900 |
| React Native and Metro | 530 |
| Vue | 2,700 |
| Svelte | 2,400 |
| Foldkit | 3,300 |
| Editors | 5,100 |
| VS Code and Cursor | 1,200 |
| Neovim | 1,200 |
| Zed | 840 |
| Other editors | 740 |
| Coding agents | 1,100 |
| Keep .ts file names | 1,700 |
| VibeLang in .ts files | 1,700 |
| Upgrade | 210,000 |
| Release notes | 210,000 |
| All 24 pages | 270,000 |
Guides
VibeLang features
Experimental
| Page | Tokens |
|---|---|
| Durable workflows | 9,000 |
| Build agents | 8,000 |
| Durable tasks and workflows | 2,000 |
| Fuzzing with Experimental.Fuzz | 3,400 |
| Spec functions and proofs | 3,600 |
| Observability with Experimental.Otlp | 3,200 |
| Sandboxes with Experimental.Sandbox | 3,100 |
| Test agentic programs with Experimental.Test | 3,900 |
| Schema services and worker imports | 2,800 |
| Orchestration patterns and PACKAGE.vibe | 3,200 |
| Ahead-of-time compilation | 4,000 |
| All 11 pages | 46,000 |
For teams
| Page | Tokens |
|---|---|
| VibeLang for your team | 370 |
| Why we trust Vibe works | 17,000 |
| All 2 pages | 17,000 |
Specification
| Page | Tokens |
|---|---|
| Introduction | 3,400 |
| The language | 130,000 |
| 1. Functions and Effect types | 14,000 |
| 2. Running Effects | 30,000 |
| 3. Failures | 11,000 |
| 4. Pattern matching | 25,000 |
| 5. Services and the environment | 16,000 |
| 6. Data | 9,900 |
| 7. Configuration and tooling | 18,000 |
| 8. Runtime guarantees | 8,000 |
| Appendices | 180,000 |
| Grammar, diagnostics, and denied and open VIPs | 160,000 |
| Module resolution matrix | 27,000 |
| All 11 pages | 320,000 |