anthropics/claude-quickstarts
A collection of projects designed to help developers quickly get started with building deployable applications using the Claude API
Python★ 20,124+551 that day#4 on trending
D54.4/100
Duplication77
3.2% in python, tsx, typescript, bash, javascript, docker, makefileDead code36
11.4%Complexity57
41% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
3.46%duplicated code · 1,718 of 49,620 lines
80clones in code
330code files of 642 scanned
3.97%duplicated over all files · 142 clones
Most complex files
- managed-agents/knowledge-wiki/utilities.py708 cx
- browser-use-demo/browser_use_demo/tools/browser.py191 cx
- managed-agents/assistant-ui/lib/managed-agents/reducer.ts165 cx
- managed-agents/self-hosted-sandboxes/openshell-policy/src/agentpolicy/cli.py132 cx
- browser-use-demo/browser_use_demo/browser_tool_utils/browser_dom_script.js131 cx
- computer-use-best-practices/computer_use/loop.py115 cx
- managed-agents/self-hosted-sandboxes/openshell-policy/tests/test_stop.py112 cx
- computer-use-demo/computer_use_demo/tools/computer.py111 cx
- managed-agents/sentry-autofix/src/fixer.ts107 cx
- managed-agents/assistant-ui/lib/managed-agents/session-controller.ts101 cx
Dead code 11.38% unused · 63 findings
- managed-agents/knowledge-wiki/utilities.pyunused-file
- managed-agents/assistant-ui/components/assistant-ui/image.tsxunused-file
- browser-use-demo/browser_use_demo/browser_tool_utils/browser_dom_script.jsunused-file
- managed-agents/chat-sdk/web/app.tsxunused-file
- managed-agents/self-hosted-sandboxes/modal/modal_sandbox_webhook.pyunused-file
- managed-agents/self-hosted-sandboxes/daytona/daytona_webhook.pyunused-file
- managed-agents/assistant-ui/components/assistant-ui/file.tsxunused-file
- browser-use-demo/browser_use_demo/browser_tool_utils/browser_form_input_script.jsunused-file
- managed-agents/assistant-ui/components/assistant-ui/sources.tsxunused-file
- managed-agents/assistant-ui/components/assistant-ui/shiki-highlighter.tsxunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 95 lines in 2 placespython619 tokensmanaged-agents/self-hosted-sandboxes/daytona/sandbox_runner.py:1–95managed-agents/self-hosted-sandboxes/modal/sandbox_runner.py:1–95
1"""Runs inside the sandbox (Modal and Daytona use the same file). 2 3``client.beta.environments.work.worker(...).handle_item()`` is the whole runner: 4it builds the per-session ``AgentToolContext`` at ``workdir`` and downloads the 5agent's skills into ``{workdir}/skills/<name>/``, then runs a 6``SessionToolRunner`` (heartbeat + reconcile + event stream + tool dispatch + 7result posting) for the session, and force-stops the work item on exit. It 8reads the same ``ANTHROPIC_*`` env vars ``ant beta:worker poll --on-work`` sets, 9which the webhook injects when it creates the sandbox. 10First 10 of 95 lines.
- 120 lines in 2 placestypescript558 tokensmanaged-agents/self-hosted-sandboxes/cloudflare-containers/src/index.ts:21–140managed-agents/self-hosted-sandboxes/cloudflare-worker/src/index.ts:19–138
21 ALLOW_ENVIRONMENT_KEY_IN_SANDBOX?: string; 22} 23 24const MAX_DRAIN = 25; 25// Anthropic's deliveries are a few hundred bytes. Anything near this is not 26// one, and the cap bounds the work an unsigned caller can make us do. 27const MAX_BODY_BYTES = 1024 * 1024; 28 29// These become Durable Object names and env values, so check their shape 30// before use even though they come from Anthropic's API.First 10 of 120 lines.
- 63 lines in 2 placestypescript487 tokensmanaged-agents/self-hosted-sandboxes/cloudflare-containers/src/index.ts:181–243managed-agents/self-hosted-sandboxes/cloudflare-worker/src/index.ts:153–215
181 baseURL: env.ANTHROPIC_BASE_URL, 182 }); 183 } 184 spawned.push({ session_id: sessionId, work_id: work.id, created: !wasLive }); 185} catch (e) { 186 // Skip and keep draining. The lease lapses and the next webhook reclaims. 187 const detail = errDetail(e); 188 console.warn(`[webhook] FAILED work=${work.id} session=${sessionId}: ${detail}`); 189 spawned.push({ session_id: sessionId, work_id: work.id, error: detail }); 190}First 10 of 63 lines.
7 more
- 82 lines in 2 placestypescript382 tokens
- 69 lines in 2 placespython315 tokens
- 68 lines in 2 placestsx281 tokens
- 43 lines in 2 placestsx236 tokens
- 25 lines in 2 placestypescript207 tokens
- 43 lines in 2 placestsx205 tokens
- 11 lines in 3 placestypescript95 tokens
Largest clones over all files, tests and data included
- 95 lines in 2 placespython619 tokensmanaged-agents/self-hosted-sandboxes/daytona/sandbox_runner.py:1–95managed-agents/self-hosted-sandboxes/modal/sandbox_runner.py:1–95
1"""Runs inside the sandbox (Modal and Daytona use the same file). 2 3``client.beta.environments.work.worker(...).handle_item()`` is the whole runner: 4it builds the per-session ``AgentToolContext`` at ``workdir`` and downloads the 5agent's skills into ``{workdir}/skills/<name>/``, then runs a 6``SessionToolRunner`` (heartbeat + reconcile + event stream + tool dispatch + 7result posting) for the session, and force-stops the work item on exit. It 8reads the same ``ANTHROPIC_*`` env vars ``ant beta:worker poll --on-work`` sets, 9which the webhook injects when it creates the sandbox. 10First 10 of 95 lines.
- 120 lines in 2 placestypescript558 tokensmanaged-agents/self-hosted-sandboxes/cloudflare-containers/src/index.ts:21–140managed-agents/self-hosted-sandboxes/cloudflare-worker/src/index.ts:19–138
21 ALLOW_ENVIRONMENT_KEY_IN_SANDBOX?: string; 22} 23 24const MAX_DRAIN = 25; 25// Anthropic's deliveries are a few hundred bytes. Anything near this is not 26// one, and the cap bounds the work an unsigned caller can make us do. 27const MAX_BODY_BYTES = 1024 * 1024; 28 29// These become Durable Object names and env values, so check their shape 30// before use even though they come from Anthropic's API.First 10 of 120 lines.
- 63 lines in 2 placestypescript487 tokensmanaged-agents/self-hosted-sandboxes/cloudflare-containers/src/index.ts:181–243managed-agents/self-hosted-sandboxes/cloudflare-worker/src/index.ts:153–215
181 baseURL: env.ANTHROPIC_BASE_URL, 182 }); 183 } 184 spawned.push({ session_id: sessionId, work_id: work.id, created: !wasLive }); 185} catch (e) { 186 // Skip and keep draining. The lease lapses and the next webhook reclaims. 187 const detail = errDetail(e); 188 console.warn(`[webhook] FAILED work=${work.id} session=${sessionId}: ${detail}`); 189 spawned.push({ session_id: sessionId, work_id: work.id, error: detail }); 190}First 10 of 63 lines.
- 130 lines in 2 placesjsondata files427 tokens
- 82 lines in 2 placestypescript382 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 91 | 11,728 | 29 | 604 | 5.15% |
| tsx | 83 | 13,338 | 22 | 491 | 3.68% |
| python | 105 | 21,106 | 13 | 345 | 1.63% |
| bash | 41 | 2,091 | 9 | 197 | 9.42% |
| javascript | 10 | 1,357 | 7 | 81 | 5.97% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 96 | 12,563 | 29 | 604 | 4.81% |
| tsx | 83 | 13,338 | 22 | 491 | 3.68% |
| python | 152 | 29,256 | 21 | 444 | 1.52% |
| markdown | 93 | 10,643 | 17 | 295 | 2.77% |
| bash | 70 | 2,682 | 16 | 254 | 9.47% |
| json | 38 | 2,108 | 14 | 654 | 31.02% |
| javascript | 11 | 1,373 | 7 | 81 | 5.9% |
| markup | 15 | 852 | 7 | 196 | 23% |
| docker | 8 | 404 | 5 | 64 | 15.84% |
| css | 7 | 2,072 | 2 | 28 | 1.35% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 10, 2026 | #4 | 20,124 (+551) | 642 | 79,147 | 142 | 3.97% | 3.46% | D 54.4 | 4a4224b |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.