Skip to content
LogoLogo

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_base encoding, through js-tiktoken 1.0.21. No Anthropic count is published: no verified offline tokenizer exists for current Claude 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 code blocks as the cheat sheet writes them, without the docs checker's // run: and // Output: lines. The sides are not normalized, and the table understates the difference: each VibeLang snippet is a complete, runnable function, while many Effect TypeScript snippets are fragments, with yield* outside the Effect.gen it needs, and none imports effect.
  • Script: docs/tools/token-counts.ts in the VibeLang repository measures every number below. bun docs/tools/token-counts.ts --check fails when this page drifts from what it measures, and --write updates it.

What an agent loads

LoadTokens
The VibeLang skill, packages/compiler/skills/vibelang/SKILL.md4,578
The skill and the cheat sheet13,218
The skill and the user guide (130 pages)195,592
The user guide alone191,014
The specification (33 chapters)102,246
The decision log, docs/design/DECISIONS.md52,740

Effect TypeScript beside VibeLang

Each row is one cheat sheet entry: its Effect TypeScript blocks against its VibeLang blocks. A negative saving means the VibeLang snippet is longer.

EntryEffect TypeScriptVibeLangSaved
Effect types815828.4%
Errors28967.9%
Errors are classes896032.6%
Errors that encode291258.6%
Services372045.9%
Services of any shape472351.1%
Layers45418.9%
Schemas442445.5%
Schema aliases181044.4%
Readonly by default14140.0%
Statements instead of generators48448.3%
Programs passed by name28273.6%
Providing layers361947.2%
Providing one service51493.9%
Catching by tag50492.0%
Falling back in an expression402147.5%
Catching in an expression474112.8%
Entry point221150.0%
Catch every cause49482.0%
Rethrow a cause3545-28.6%
Run on every exit2933-13.8%
Exit, yield, and interrupt3334-3.0%
Interruption655810.8%
No imports from effect161131.3%
Common functions without the Effect. prefix433127.9%
Methods on Effect's data types46428.7%
The pipe operator2931-6.9%
Throw in an expression413026.8%
Blocks as values3446-35.3%
Blocks after calls7778-1.3%
Match a value534024.5%
Match errors by class594425.4%
Option, Exit, and Result6062-3.3%
Test and bind4445-2.3%
Plain, self-contained TypeScript inside sync, try, and callback120164-36.7%
TypeScript modules inline99945.1%
Fork and join433420.9%
Wait for several62578.1%
First success, expected outcomes53489.4%
Fork a block523728.8%
Detached and scoped fibers3545-28.6%
Wait for a Deferred30286.7%
Race4356-30.2%
A concurrent loop402830.0%
All 44 entries2,0441,80111.9%

Every page

Onboarding

PageTokens
Start Here2,097
Welcome1,497
Why VibeLang?600
Learning Path8,108
The Effect Type1,587
Installation1,827
Creating Effects2,607
Two Types of Errors646
Basic Concurrency1,441
Core Concepts13,271
Effect's Modules1,087
Running Effects1,511
Sequencing Effects1,184
Building Pipelines1,807
Devtools7,682
All 12 pages23,476

Setup

PageTokens
Set up VibeLang1,062
Start a project1,211
New project480
Existing project731
Build and test2,483
vibelang CLI1,498
Vite and Vitest985
Format and lint1,305
Format with dprint1,305
Frameworks6,996
React1,931
Vue2,687
Svelte2,378
Editors2,164
VS Code and Cursor407
Neovim999
Zed431
Other editors327
Upgrade1,887
Release notes1,887
All 14 pages17,108

Guides

PageTokens
Getting Started919
Error Management13,126
Expected Errors4,044
Unexpected Errors1,293
Fallback989
Matching741
Retrying764
Timing Out844
Sandboxing698
Error Accumulation605
Error Channel Operations1,334
Parallel and Sequential Errors729
Custom Error Classes1,085
Requirements Management5,967
Managing Services1,786
Default Services965
Managing Layers2,305
Layer Memoization911
Resource Management3,451
Introduction1,545
Scope1,906
Observability6,462
Logging1,945
Metrics1,331
Tracing2,453
Tracking Fibers733
Configuration2,689
Runtime1,416
Scheduling4,948
Using schedules924
Choosing and combining schedules1,591
Scheduling work with cron1,208
Schedule cookbook1,225
State Management2,343
Ref893
SynchronizedRef711
SubscriptionRef739
Batching2,335
Caching1,839
Caching Effects859
Cache980
Concurrency6,808
Fibers2,218
Deferred886
Queue1,266
PubSub1,132
Semaphore707
Latch599
Stream10,083
Introduction1,076
Creating Streams2,337
Consuming Streams775
Error Handling1,428
Operations3,809
Resourceful Streams658
Sink3,980
Introduction581
Creating Sinks2,041
Operations742
Leftovers616
Testing1,274
TestClock1,274
Code Style7,226
Guidelines818
Dual APIs1,043
Branded Types1,138
Pattern Matching1,595
Excessive Nesting916
Control Flow Operators1,716
Data Types15,628
BigDecimal1,308
Cause1,107
Chunk870
Data1,470
DateTime2,808
Duration1,171
Result1,480
Exit1,010
HashSet1,445
Option2,273
Redacted686
Trait1,611
Equal1,009
Hash602
Behaviour2,027
Equivalence646
Order1,381
Schema30,939
Introduction1,291
Getting Started2,202
Basic Usage2,610
Filters1,469
Advanced Usage2,818
Projections676
Transformations2,196
Annotations1,100
Canonical Codecs1,231
Error Messages1,442
Error Formatters1,088
Class APIs1,800
Default Constructors1,318
Effect Data Types1,685
Standard Schema843
Arbitrary1,788
JSON Schema1,860
Equivalence822
Formatter567
Schema Compilers2,133
Platform6,493
Introduction993
FileSystem1,164
Path848
PlatformLogger758
Runtime1,219
Terminal1,511
All 98 pages131,564

VibeLang features

PageTokens
Control operations and handlers1,746
Producers1,246
Building an HTTP API1,383
VibeLang for Effect users3,142
Cheat sheet8,640
Pattern matching with match and is2,709
All 6 pages18,866

Specification

PageTokens
Introduction1,605
Part I. The language by example28,923
1. A first look1,681
2. Functions and calls1,470
3. Errors: the E channel2,579
4. Dependency injection: the R channel4,788
5. Programs as values: retry, timeout, and pipe2,447
6. Resources1,550
7. Concurrency2,281
8. Producers: streams of values979
9. Handlers: defining your own effects2,414
10. Working with TypeScript3,278
11. The standard library2,171
12. Questions Effect users ask3,285
Part II. The rules12,384
13. What a call means4,669
14. Contracts and inference2,468
15. Which functions compile to plain JavaScript2,175
16. Callbacks and higher-order functions1,272
17. Failures, defects, interruption, and cleanup1,800
Part III. The runtime20,738
18. Why a continuation runtime2,127
19. The checkout trace, step by step1,582
20. The machine3,284
21. One-shot ownership and races1,885
22. What resume restores1,478
23. Boundaries and finalization1,663
24. What Effect provides and what the kernel adds3,816
25. Implementation strategies and costs1,933
26. What compiled code must guarantee2,970
Part IV. The compiler10,884
27. Compiler architecture1,662
28. Tooling9,222
Part V. Decisions14,639
29. Decisions11,993
30. Risks and experiments2,646
Appendices13,073
A. Evidence index and B. Prior art4,883
C. Every Effect feature in VibeLang8,190
All 33 pages102,246