File Complexity Overall
  • There are 88 files with units, with 13,670 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 632 lines of code)
    • 7 medium complex files (McCabe index sum 51-125; 1,733 lines of code)
    • 14 slightly complex files (McCabe index sum 26-50; 2,915 lines of code)
    • 66 simple files (McCabe index sum 1-25; 8,390 lines of code)
  • 95 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 4% | 12% | 21% | 61%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
py0% | 4% | 13% | 20% | 61%
ts0% | 0% | 0% | 52% | 47%
c0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
scripts0% | 85% | 0% | 0% | 14%
claude_agent_sdk0% | 0% | 9% | 8% | 81%
tool_use0% | 0% | 19% | 29% | 50%
.claude0% | 0% | 100% | 0% | 0%
capabilities0% | 0% | 13% | 9% | 76%
.github0% | 0% | 100% | 0% | 0%
skills0% | 0% | 0% | 55% | 44%
managed_agents0% | 0% | 0% | 46% | 53%
evals0% | 0% | 0% | 0% | 100%
patterns0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
632 14 194 31 36
agent_visualizer.py
in claude_agent_sdk/utils
285 8 124 44 46
validate_notebook.py
in .claude/skills/cookbook-audit
346 17 96 28 25
html_renderer.py
in claude_agent_sdk/utils
220 19 88 40 28
engine.py
in capabilities/content_moderation
222 7 85 38 28
visualize.py
in tool_use/utils
247 16 76 31 11
memory_tool.py
in tool_use
207 10 69 33 16
verify_registry.py
in .github/scripts
206 7 59 29 20
validate_brand.py
in skills/custom_skills/applying-brand-guidelines
185 11 45 24 10
184 9 44 24 24
interpret_ratios.py
in skills/custom_skills/analyzing-financial-statements
260 9 44 17 15
calculate_ratios.py
in skills/custom_skills/analyzing-financial-statements
231 12 41 18 17
vectordb.py
in capabilities/retrieval_augmented_generation/evaluation
149 12 40 27 6
customer_service_tools.py
in tool_use/utils
209 12 37 18 11
tools.py
in managed_agents/mongodb_on_cma
201 15 34 17 12
file_utils.py
in skills
126 5 34 27 25
scheduled_review.py
in claude_agent_sdk/scheduled_repository_reviewer
340 11 33 10 11
talent_scorer.py
in claude_agent_sdk/chief_of_staff_agent/scripts
119 5 32 27 10
ap2_mandates.py
in managed_agents/mongodb_on_cma
169 6 31 18 22
webhook.ts
in managed_agents/self_hosted_sandboxes/vercel/api
275 12 31 11 8
research_corpus.py
in tool_use/context_engineering
275 1 29 11 29
code_review_demo.py
in tool_use/memory_demo
192 9 27 14 13
customer_service_api.py
in tool_use/utils
289 6 24 8 10
dcf_model.py
in skills/custom_skills/creating-financial-models
289 12 23 8 6
apply_brand.py
in skills/custom_skills/applying-brand-guidelines
286 10 23 8 7
vectordb.py
in capabilities/classification/evaluation
63 4 22 35 12
embeddings.py
in managed_agents/mongodb_on_cma
96 12 22 23 4
demo_helpers.py
in tool_use/memory_demo
133 4 21 16 16
decision_matrix.py
in claude_agent_sdk/chief_of_staff_agent/scripts
217 3 20 9 11
prompts.py
in capabilities/retrieval_augmented_generation/evaluation
100 7 19 19 10
39 2 19 49 10
eval_extraction.py
in capabilities/knowledge_graph/evaluation
103 5 18 17 10
data_processor_v1.py
in tool_use/memory_demo/sample_code
77 9 17 22 4
provider_retrieval.py
in capabilities/retrieval_augmented_generation/evaluation
94 4 17 18 10
team_expense_api.py
in tool_use/utils
435 4 16 4 10
run_eval.py
in capabilities/content_moderation/evaluation
86 3 15 17 9
infra_setup.py
in claude_agent_sdk/site_reliability_agent
552 8 15 3 5
build_creatives.py
in capabilities/content_moderation/data/ad_creatives
108 8 14 13 4
vectordb.py
in capabilities/text_to_sql/evaluation
54 5 14 26 6
container.ts
in managed_agents/self_hosted_sandboxes/cf/src
67 5 14 21 5
64 5 14 22 5
agentic_search.py
in evals/agentic_search/utils
137 5 13 9 6
canary.c
in claude_agent_sdk/vulnerability_detection_agent/canary
39 4 13 33 7
financial_forecast.py
in claude_agent_sdk/chief_of_staff_agent/scripts
99 4 13 13 6
pipeline.py
in capabilities/content_moderation
159 7 12 8 3
eval_retrieval.py
in capabilities/retrieval_augmented_generation/evaluation
87 3 12 14 5
prompts.py
in capabilities/text_to_sql/evaluation
57 5 12 21 5
s3_adapter.py
in capabilities/contextual-embeddings/contextual-rag-lambda-function
35 4 11 31 4
lambda_function.py
in capabilities/contextual-embeddings/contextual-rag-lambda-function
57 1 11 19 11
runner.ts
in managed_agents/self_hosted_sandboxes/cf-worker/src
73 6 11 15 3
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...