anthropics/anthropic-sdk-typescript
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 307 files with 39,000 lines of code.
- 4 very long files (7,991 lines of code)
- 11 long files (7,621 lines of code)
- 33 medium size files (9,839 lines of code)
- 53 small files (7,655 lines of code)
- 206 very small files (5,894 lines of code)
Legend:
1001+
501-1000
201-500
101-200
1-100
explore: grouped by folders | grouped by size | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
File Size per Logical Decomposition
primary
Longest Files (Top 50)
| File | # lines | # units |
|---|---|---|
| 2799 | 4 | |
| 2008 | 2 | |
| 1601 | 32 | |
| 1583 | - | |
| 934 | 3 | |
| 771 | 34 | |
| 733 | 22 | |
| 728 | - | |
| 701 | 6 | |
| 683 | 5 | |
| 657 | 25 | |
| 650 | 28 | |
| 649 | 23 | |
| 604 | 27 | |
| 511 | 10 | |
| 495 | - | |
| 485 | - | |
| 469 | 14 | |
| 418 | 8 | |
| 413 | 7 | |
| 390 | - | |
| 387 | 32 | |
| 360 | - | |
| 324 | 9 | |
| 322 | 14 | |
| 316 | - | |
| 308 | 14 | |
| 301 | 14 | |
| 281 | 9 | |
| 278 | - | |
| 273 | 6 | |
| 273 | 8 | |
| 264 | 18 | |
| 260 | 6 | |
| 255 | 7 | |
| 248 | 12 | |
| 247 | 5 | |
| 247 | 6 | |
| 246 | 4 | |
| 244 | - | |
| 241 | - | |
| 225 | - | |
| 221 | 5 | |
| 219 | 5 | |
| 215 | 10 | |
| 209 | 6 | |
| 204 | 7 | |
| 201 | 9 | |
| 196 | 8 | |
| 194 | 2 |
Large Files That Change Often (Top 20)
To change a file, an AI coding agent (or a person) has to read it: these files are read the most for the changes in the past year (lines × changes).
| File | # lines | ≈ tokens to read | # changes (1y) | ≈ lines edited per change | lines read per line changed |
|---|---|---|---|---|---|
| 2799 | ~15k–50k | 81 | ~100 | ~30 | |
| 2008 | ~10k–30k | 66 | ~70 | ~30 | |
| 1583 | ~10k–30k | 67 | ~20 | ~70 | |
| 1601 | ~10k–30k | 64 | ~50 | ~30 | |
| 728 | ~5k–15k | 55 | ~20 | ~30 | |
| 934 | ~5k–15k | 31 | ~100 | ~7 | |
| 701 | ~3k–10k | 33 | ~70 | ~10 | |
| 683 | ~3k–10k | 31 | ~70 | ~7 | |
| 649 | ~3k–10k | 25 | ~100 | ~7 | |
| 360 | ~2k–7k | 35 | ~10 | ~30 | |
| 650 | ~3k–10k | 18 | ~70 | ~10 | |
| 771 | ~5k–15k | 12 | ~100 | ~7 | |
| 316 | ~2k–5k | 26 | ~10 | ~30 | |
| 255 | ~1.5k–5k | 28 | ~50 | ~5 | |
| 495 | ~3k–7k | 14 | ~50 | ~7 | |
| 657 | ~3k–10k | 10 | ~100 | ~5 | |
| 278 | ~1.5k–5k | 22 | ~7 | ~30 | |
| 413 | ~2k–7k | 14 | ~100 | ~5 | |
| 418 | ~2k–7k | 12 | ~100 | ~3 | |
| 604 | ~3k–10k | 8 | ~70 | ~10 |
Tokens are lines × 7 to 14 (analysis.fileReadsForChanges). Lines edited per change are the file's lines added and deleted divided by its commits over the whole history. Agents read about 2,000 lines at a time: when a 17,000-line file was split into modules, the tokens an agent read for the same change fell by 83% (The Economic Benefit of Refactoring, 2026).
Files With Most Units (Top 50)
| File | # lines | # units |
|---|---|---|
| 771 | 34 | |
| 387 | 32 | |
| 1601 | 32 | |
| 650 | 28 | |
| 604 | 27 | |
| 657 | 25 | |
| 649 | 23 | |
| 733 | 22 | |
| 264 | 18 | |
| 105 | 18 | |
| 308 | 14 | |
| 301 | 14 | |
| 469 | 14 | |
| 322 | 14 | |
| 248 | 12 | |
| 215 | 10 | |
| 138 | 10 | |
| 511 | 10 | |
| 178 | 9 | |
| 201 | 9 | |
| 281 | 9 | |
| 74 | 9 | |
| 324 | 9 | |
| 196 | 8 | |
| 273 | 8 | |
| 418 | 8 | |
| 191 | 7 | |
| 148 | 7 | |
| 255 | 7 | |
| 413 | 7 | |
| 204 | 7 | |
| 135 | 6 | |
| 119 | 6 | |
| 184 | 6 | |
| 273 | 6 | |
| 701 | 6 | |
| 260 | 6 | |
| 247 | 6 | |
| 19 | 6 | |
| 123 | 6 | |
| 137 | 6 | |
| 194 | 6 | |
| 209 | 6 | |
| 103 | 5 | |
| 116 | 5 | |
| 69 | 5 | |
| 176 | 5 | |
| 247 | 5 | |
| 138 | 5 | |
| 155 | 5 |
Files With Long Lines (Top 30)
There are 30 files with lines longer than 120 characters. In total, there are 83 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 1583 | - | 14 | |
| 418 | 8 | 13 | |
| 178 | 9 | 5 | |
| 657 | 25 | 5 | |
| 48 | 1 | 4 | |
| 196 | 8 | 3 | |
| 308 | 14 | 3 | |
| 1601 | 32 | 3 | |
| 103 | 5 | 2 | |
| 135 | 6 | 2 | |
| 2799 | 4 | 2 | |
| 413 | 7 | 2 | |
| 260 | 6 | 2 | |
| 2008 | 2 | 2 | |
| 174 | 3 | 2 | |
| 74 | 9 | 2 | |
| 469 | 14 | 2 | |
| 111 | 4 | 2 | |
| 97 | 1 | 2 | |
| 100 | 1 | 1 | |
| 191 | 7 | 1 | |
| 105 | - | 1 | |
| 201 | 9 | 1 | |
| 69 | - | 1 | |
| 771 | 34 | 1 | |
| 301 | 14 | 1 | |
| 194 | 2 | 1 | |
| 41 | 2 | 1 | |
| 650 | 28 | 1 | |
| 194 | 6 | 1 |
Correlations
File Size vs. Commits (all time): 307 points
|
|
2799.0 | lines of code min: 1.0average: 127.04 25th percentile: 8.0 median: 51.0 75th percentile: 137.0 max: 2799.0 |
|
| 0 | 267.0 | ||
|
commits (all time) min: 1.0 | average: 11.3 | 25th percentile: 2.0 | median: 3.0 | 75th percentile: 9.0 | max: 267.0
|
|||
File Size vs. Contributors (all time): 307 points
|
|
2799.0 | lines of code min: 1.0average: 127.04 25th percentile: 8.0 median: 51.0 75th percentile: 137.0 max: 2799.0 |
|
| 0 | 23.0 | ||
|
contributors (all time) min: 1.0 | average: 4.1 | 25th percentile: 2.0 | median: 3.0 | 75th percentile: 5.0 | max: 23.0
|
|||
File Size vs. Commits (30 days): 204 points
|
|
2799.0 | lines of code min: 1.0average: 156.97 25th percentile: 19.5 median: 67.0 75th percentile: 162.25 max: 2799.0 |
|
| 0 | 26.0 | ||
|
commits (30d) min: 1.0 | average: 3.29 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 3.0 | max: 26.0
|
|||
File Size vs. Contributors (30 days): 204 points
|
|
2799.0 | lines of code min: 1.0average: 156.97 25th percentile: 19.5 median: 67.0 75th percentile: 162.25 max: 2799.0 |
|
| 0 | 8.0 | ||
|
contributors (30d) min: 1.0 | average: 2.22 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 3.0 | max: 8.0
|
|||
File Size vs. Commits (90 days): 246 points
|
|
2799.0 | lines of code min: 1.0average: 149.96 25th percentile: 18.75 median: 67.0 75th percentile: 164.0 max: 2799.0 |
|
| 0 | 62.0 | ||
|
commits (90d) min: 1.0 | average: 5.02 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 5.0 | max: 62.0
|
|||
File Size vs. Contributors (90 days): 246 points
|
|
2799.0 | lines of code min: 1.0average: 149.96 25th percentile: 18.75 median: 67.0 75th percentile: 164.0 max: 2799.0 |
|
| 0 | 9.0 | ||
|
contributors (90d) min: 1.0 | average: 2.86 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 4.0 | max: 9.0
|
|||
About This Analysis
- File size measurements show the distribution of size of files.
- Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
- It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
- To learn more about bloaters and how to deal with long code structures, Sokrates recommends the following resources:
- Refactoring bloaters, sourcemaking.com
- The Blob Software Development Anti-Pattern, sourcemaking.com