anthropics/claude-agent-sdk-demos
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 148 files with 15,385 lines of code.
- 0 very long files (0 lines of code)
- 3 long files (1,768 lines of code)
- 15 medium size files (4,426 lines of code)
- 37 small files (5,248 lines of code)
- 93 very small files (3,943 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 |
|---|---|---|
| 690 | 30 | |
| 559 | 25 | |
| 519 | 35 | |
| 469 | 4 | |
| 464 | 2 | |
| 395 | 18 | |
| 303 | 6 | |
| 301 | 2 | |
| 283 | 2 | |
| 276 | 10 | |
| 273 | 4 | |
| 273 | - | |
| 271 | 4 | |
| 245 | 6 | |
| 233 | 3 | |
| 221 | - | |
| 211 | - | |
| 208 | - | |
| 200 | - | |
| 197 | 6 | |
| 188 | 3 | |
| 186 | - | |
| 186 | 2 | |
| 174 | 1 | |
| 170 | 10 | |
| 169 | 2 | |
| 168 | 7 | |
| 168 | 13 | |
| 165 | 1 | |
| 158 | 10 | |
| 152 | - | |
| 151 | 4 | |
| 148 | - | |
| 148 | 1 | |
| 144 | - | |
| 143 | 1 | |
| 142 | 1 | |
| 134 | - | |
| 127 | 5 | |
| 124 | 1 | |
| 124 | 2 | |
| 122 | 3 | |
| 120 | 1 | |
| 120 | 4 | |
| 119 | 10 | |
| 115 | 1 | |
| 113 | 1 | |
| 113 | 1 | |
| 113 | 1 | |
| 112 | - |
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 |
|---|---|---|---|---|---|
| 690 | ~3k–10k | 6 | ~70 | ~10 | |
| 519 | ~3k–10k | 5 | ~150 | ~3 | |
| 469 | ~3k–7k | 5 | ~30 | ~20 | |
| 273 | ~1.5k–5k | 8 | ~30 | ~10 | |
| 395 | ~2k–7k | 5 | ~200 | ~2 | |
| 559 | ~3k–10k | 3 | ~150 | ~3 | |
| 200 | ~1k–3k | 5 | ~150 | ~1 | |
| 464 | ~3k–7k | 2 | ~5 | ~70 | |
| 152 | ~1k–3k | 6 | ~30 | ~3 | |
| 208 | ~1k–3k | 3 | ~30 | ~5 | |
| 303 | ~2k–5k | 2 | ~50 | ~7 | |
| 301 | ~2k–5k | 2 | ~300 | ~1 | |
| 148 | ~1k–3k | 4 | ~70 | ~2 | |
| 144 | ~1k–3k | 4 | ~20 | ~5 | |
| 283 | ~1.5k–5k | 2 | ~300 | ~1 | |
| 276 | ~1.5k–5k | 2 | ~300 | ~1 | |
| 273 | ~1.5k–5k | 2 | ~7 | ~50 | |
| 271 | ~1.5k–5k | 2 | ~30 | ~10 | |
| 168 | ~1k–3k | 3 | ~200 | ~1 | |
| 245 | ~1.5k–5k | 2 | ~300 | ~1 |
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 |
|---|---|---|
| 519 | 35 | |
| 690 | 30 | |
| 559 | 25 | |
| 395 | 18 | |
| 168 | 13 | |
| 93 | 10 | |
| 119 | 10 | |
| 276 | 10 | |
| 158 | 10 | |
| 170 | 10 | |
| 30 | 7 | |
| 168 | 7 | |
| 197 | 6 | |
| 303 | 6 | |
| 245 | 6 | |
| 86 | 5 | |
| 127 | 5 | |
| 99 | 5 | |
| 53 | 5 | |
| 30 | 4 | |
| 100 | 4 | |
| 271 | 4 | |
| 273 | 4 | |
| 120 | 4 | |
| 68 | 4 | |
| 100 | 4 | |
| 38 | 4 | |
| 469 | 4 | |
| 23 | 4 | |
| 151 | 4 | |
| 60 | 4 | |
| 122 | 3 | |
| 188 | 3 | |
| 54 | 3 | |
| 78 | 3 | |
| 233 | 3 | |
| 72 | 2 | |
| 61 | 2 | |
| 169 | 2 | |
| 301 | 2 | |
| 283 | 2 | |
| 66 | 2 | |
| 464 | 2 | |
| 124 | 2 | |
| 53 | 2 | |
| 50 | 2 | |
| 186 | 2 | |
| 64 | 1 | |
| 124 | 1 | |
| 18 | 1 |
Files With Long Lines (Top 38)
There are 38 files with lines longer than 120 characters. In total, there are 78 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 469 | 4 | 7 | |
| 301 | 2 | 6 | |
| 559 | 25 | 6 | |
| 78 | 3 | 4 | |
| 27 | - | 4 | |
| 273 | - | 4 | |
| 221 | - | 4 | |
| 109 | 1 | 3 | |
| 54 | 1 | 3 | |
| 271 | 4 | 3 | |
| 85 | 1 | 3 | |
| 77 | 1 | 2 | |
| 169 | 2 | 2 | |
| 53 | 5 | 2 | |
| 208 | - | 2 | |
| 72 | 2 | 1 | |
| 61 | 2 | 1 | |
| 197 | 6 | 1 | |
| 100 | 4 | 1 | |
| 27 | 1 | 1 | |
| 11 | - | 1 | |
| 124 | 2 | 1 | |
| 120 | 4 | 1 | |
| 76 | 1 | 1 | |
| 75 | 1 | 1 | |
| 113 | 1 | 1 | |
| 58 | 1 | 1 | |
| 102 | 1 | 1 | |
| 142 | 1 | 1 | |
| 100 | 4 | 1 | |
| 143 | 1 | 1 | |
| 152 | - | 1 | |
| 112 | - | 1 | |
| 148 | 1 | 1 | |
| 186 | 2 | 1 | |
| 134 | - | 1 | |
| 110 | 1 | 1 | |
| 115 | 1 | 1 |
Correlations
File Size vs. Commits (all time): 138 points
|
|
690.0 | lines of code min: 2.0average: 106.78 25th percentile: 27.75 median: 77.0 75th percentile: 143.25 max: 690.0 |
|
| 0 | 12.0 | ||
|
commits (all time) min: 2.0 | average: 2.59 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 2.0 | max: 12.0
|
|||
File Size vs. Contributors (all time): 138 points
|
|
690.0 | lines of code min: 2.0average: 106.78 25th percentile: 27.75 median: 77.0 75th percentile: 143.25 max: 690.0 |
|
| 0 | 2.0 | ||
|
contributors (all time) min: 1.0 | average: 1.17 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 2.0
|
|||
File Size vs. Commits (30 days): 0 points
No data for "commits (30d)" vs. "lines of code".
File Size vs. Contributors (30 days): 0 points
No data for "contributors (30d)" vs. "lines of code".
File Size vs. Commits (90 days): 0 points
No data for "commits (90d)" vs. "lines of code".
File Size vs. Contributors (90 days): 0 points
No data for "contributors (90d)" vs. "lines of code".
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