anthropics/claude-agent-sdk-python
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 37 files with 8,183 lines of code.
- 1 very long files (1,113 lines of code)
- 5 long files (3,319 lines of code)
- 7 medium size files (2,202 lines of code)
- 7 small files (1,011 lines of code)
- 17 very small files (538 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 37)
| File | # lines | # units |
|---|---|---|
| 1113 | 48 | |
| 894 | 7 | |
| 731 | 21 | |
| 678 | 20 | |
| 508 | 15 | |
| 508 | 11 | |
| 489 | 21 | |
| 380 | 10 | |
| 340 | 2 | |
| 300 | 14 | |
| 239 | 1 | |
| 233 | 7 | |
| 221 | 2 | |
| 200 | 14 | |
| 167 | - | |
| 149 | 1 | |
| 142 | 5 | |
| 132 | 1 | |
| 119 | 7 | |
| 102 | 3 | |
| 95 | 13 | |
| 79 | 1 | |
| 66 | 4 | |
| 59 | 6 | |
| 38 | 3 | |
| 34 | 1 | |
| 31 | 1 | |
| 27 | 2 | |
| 24 | 2 | |
| 23 | 2 | |
| 20 | 1 | |
| 19 | - | |
| 18 | - | |
| 2 | - | |
| 1 | - | |
| 1 | - | |
| 1 | - |
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 |
|---|---|---|---|---|---|
| 894 | ~5k–15k | 84 | ~30 | ~30 | |
| 731 | ~5k–15k | 52 | ~30 | ~20 | |
| 678 | ~3k–10k | 41 | ~50 | ~15 | |
| 508 | ~3k–10k | 43 | ~30 | ~20 | |
| 1113 | ~7k–20k | 10 | ~200 | ~5 | |
| 340 | ~2k–5k | 22 | ~20 | ~20 | |
| 239 | ~1.5k–5k | 28 | ~30 | ~10 | |
| 149 | ~1k–3k | 19 | ~20 | ~7 | |
| 508 | ~3k–10k | 5 | ~200 | ~2 | |
| 489 | ~3k–7k | 4 | ~200 | ~3 | |
| 380 | ~2k–7k | 5 | ~150 | ~3 | |
| 200 | ~1k–3k | 4 | ~150 | ~2 | |
| 221 | ~1.5k–5k | 3 | ~100 | ~2 | |
| 132 | ~700–2k | 4 | ~70 | ~2 | |
| 102 | ~700–1.5k | 3 | ~50 | ~2 | |
| 300 | ~2k–5k | 1 | ~300 | ~1 | |
| 142 | ~700–2k | 2 | ~100 | ~1 | |
| 1 | under 1k | 256 | ~2 | ~0 | |
| 119 | ~700–2k | 2 | ~100 | ~1 | |
| 233 | ~1.5k–5k | 1 | ~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 30)
| File | # lines | # units |
|---|---|---|
| 1113 | 48 | |
| 489 | 21 | |
| 731 | 21 | |
| 678 | 20 | |
| 508 | 15 | |
| 200 | 14 | |
| 300 | 14 | |
| 95 | 13 | |
| 508 | 11 | |
| 380 | 10 | |
| 233 | 7 | |
| 119 | 7 | |
| 894 | 7 | |
| 59 | 6 | |
| 142 | 5 | |
| 66 | 4 | |
| 102 | 3 | |
| 38 | 3 | |
| 24 | 2 | |
| 23 | 2 | |
| 340 | 2 | |
| 27 | 2 | |
| 221 | 2 | |
| 31 | 1 | |
| 34 | 1 | |
| 20 | 1 | |
| 79 | 1 | |
| 149 | 1 | |
| 132 | 1 | |
| 239 | 1 |
Files With Long Lines (Top 3)
There are 3 files with lines longer than 120 characters. In total, there are 5 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 167 | - | 3 | |
| 300 | 14 | 1 | |
| 678 | 20 | 1 |
Correlations
File Size vs. Commits (all time): 37 points
|
|
1113.0 | lines of code min: 1.0average: 221.16 25th percentile: 25.5 median: 119.0 75th percentile: 320.0 max: 1113.0 |
|
| 0 | 256.0 | ||
|
commits (all time) min: 1.0 | average: 21.54 | 25th percentile: 1.0 | median: 3.0 | 75th percentile: 15.0 | max: 256.0
|
|||
File Size vs. Contributors (all time): 37 points
|
|
1113.0 | lines of code min: 1.0average: 221.16 25th percentile: 25.5 median: 119.0 75th percentile: 320.0 max: 1113.0 |
|
| 0 | 32.0 | ||
|
contributors (all time) min: 1.0 | average: 4.92 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 4.0 | max: 32.0
|
|||
File Size vs. Commits (30 days): 15 points
|
|
1113.0 | lines of code min: 1.0average: 328.27 25th percentile: 19.0 median: 167.0 75th percentile: 678.0 max: 1113.0 |
|
| 0 | 28.0 | ||
|
commits (30d) min: 1.0 | average: 4.27 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 4.0 | max: 28.0
|
|||
File Size vs. Contributors (30 days): 15 points
|
|
1113.0 | lines of code min: 1.0average: 328.27 25th percentile: 19.0 median: 167.0 75th percentile: 678.0 max: 1113.0 |
|
| 0 | 3.0 | ||
|
contributors (30d) min: 1.0 | average: 1.6 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 3.0
|
|||
File Size vs. Commits (90 days): 27 points
|
|
1113.0 | lines of code min: 1.0average: 258.52 25th percentile: 34.0 median: 149.0 75th percentile: 380.0 max: 1113.0 |
|
| 0 | 78.0 | ||
|
commits (90d) min: 1.0 | average: 7.44 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 5.0 | max: 78.0
|
|||
File Size vs. Contributors (90 days): 27 points
|
|
1113.0 | lines of code min: 1.0average: 258.52 25th percentile: 34.0 median: 149.0 75th percentile: 380.0 max: 1113.0 |
|
| 0 | 6.0 | ||
|
contributors (90d) min: 1.0 | average: 1.74 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 6.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