6 views
anthropics/claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
TypeScript★ 152,755+167 that day#7 on trending
B72/100
Duplication81
2.5% in typescript, python, bash, hcl, tsx, powershell, perlDead code93
0.7%Complexity49
52.1% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1.18%duplicated code · 260 of 22,023 lines
14clones in code
292code files of 732 scanned
1.81%duplicated over all files · 127 clones
Most complex files
- plugins/security-guidance/hooks/security_reminder_hook.py342 cx
- mods/types/claude-code.d.ts306 cx
- mods/sec-default/tests/register.test.ts285 cx
- mods/diff/hooks/register.ts266 cx
- plugins/security-guidance/hooks/llm.py221 cx
- mods/diff/tests/register.test.ts158 cx
- plugins/security-guidance/hooks/gitutil.py139 cx
- .github/scripts/check_workflow_hardening.py118 cx
- mods/diff/tests/git/fetch-diff.test.ts99 cx
- examples/gateway/aws/setup.sh89 cx
Dead code 0.71% unused · 70 findings
- plugins/security-guidance/hooks/security_reminder_hook.py:_diff_pathspecunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:_find_git_indexunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:_temp_indexunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:ANTHROPIC_API_KEYunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:ANTHROPIC_AUTH_TOKENunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:CLAUDE_CODE_SYSTEM_PROMPTunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:SECURITY_REVIEW_MODELunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:_git_name_onlyunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:_last_call_claude_http_errorunused-import
- plugins/security-guidance/hooks/security_reminder_hook.py:_git_status_porcelainunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 28 lines in 2 placespython144 tokens
4This script is called by Claude Code after a tool executes. 5It reads .claude/hookify.*.local.md files and evaluates rules. 6""" 7 8import os 9import sys 10import json 11 12# CRITICAL: Add plugin root to Python path for imports 13PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT')First 10 of 28 lines.
- 12 lines in 2 placespython129 tokensplugins/security-guidance/hooks/llm.py:1391–1402plugins/security-guidance/hooks/review_api.py:306–323
1391added = [ln[1:] for ln in diff_text.splitlines() 1392 if ln.startswith("+") and not ln.startswith("+++")] 1393removed = [ln[1:] for ln in diff_text.splitlines() 1394 if ln.startswith("-") and not ln.startswith("---")] 1395 1396def _norm(s: str) -> str: 1397 return " ".join(t for t in " ".join(s.split()).split() if len(t) > 2) 1398 1399added_norm = _norm("\n".join(added)) 1400removed_norm = _norm("\n".join(removed))306added = [ 307 ln[1:] 308 for ln in diff_text.splitlines() 309 if ln.startswith("+") and not ln.startswith("+++") 310] 311removed = [ 312 ln[1:] 313 for ln in diff_text.splitlines() 314 if ln.startswith("-") and not ln.startswith("---") 315]First 10 of 12 lines, the second copy on the right.
- 27 lines in 2 placespython128 tokens
5It reads .claude/hookify.*.local.md files and evaluates rules. 6""" 7 8import os 9import sys 10import json 11 12# CRITICAL: Add plugin root to Python path for imports 13PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT') 14if PLUGIN_ROOT:First 10 of 27 lines.
7 more
- 9 lines in 2 placespython103 tokens
- 73 lines in 2 placespython91 tokens
- 18 lines in 2 placespython82 tokens
- 22 lines in 2 placespython79 tokens
- 10 lines in 2 placespython72 tokens
- 14 lines in 2 placestypescript65 tokens
- 10 lines in 2 placestypescript62 tokens
Largest clones over all files, tests and data included
- 120 lines in 2 placesmarkdowndocs and examples1,149 tokensplugins/plugin-dev/skills/skill-development/SKILL.md:9–128plugins/plugin-dev/skills/skill-development/references/skill-creator-original.md:9–128
9This skill provides guidance for creating effective skills for Claude Code plugins. 10 11## About Skills 12 13Skills are modular, self-contained packages that extend Claude's capabilities by providing 14specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific 15domains or tasks—they transform Claude from a general-purpose agent into a specialized agent 16equipped with procedural knowledge that no model can fully possess. 17 18### What Skills ProvideFirst 10 of 120 lines.
- 8 lines in 8 placestypescripttests56 tokensmods/sec-default/tests/register.test.ts:676–683mods/sec-default/tests/register.test.ts:778–785mods/sec-default/tests/register.test.ts:796–803mods/sec-default/tests/register.test.ts:814–821mods/sec-default/tests/register.test.ts:832–839and 3 more
676'a deny rule holds over an allow from a plugin the person installed', 677{ plugins: [Fixtures.allowing('easy')] }, 678async ($, on) => { 679 on('settings.read', () => ({ value: Fixtures.MANAGED_POLICY })) 680 681 const lines = Fixtures.logged(on) 682 683 Fixtures.checksAnswered(on, Fixtures.RULE_DENY)778'an ask rule holds over an allow from a plugin the person installed', 779{ plugins: [Fixtures.allowing('easy')] }, 780async ($, on) => { 781 on('settings.read', () => ({ value: Fixtures.MANAGED_POLICY })) 782 783 const lines = Fixtures.logged(on) 784 785 Fixtures.checksAnswered(on, Fixtures.RULE_ASK) - 12 lines in 5 placestypescripttests72 tokensmods/sec-default/tests/register.test.ts:2288–2299mods/sec-default/tests/register.test.ts:2314–2325mods/sec-default/tests/register.test.ts:2342–2353mods/sec-default/tests/register.test.ts:2368–2379mods/sec-default/tests/register.test.ts:2393–2404
2288 Fixtures.settingLdPreload('bundled', 'builtin'), 2289 ], 2290}, 2291async ($, on) => { 2292 on('settings.read', () => ({ value: Fixtures.MANAGED_POLICY })) 2293 2294 const lines = Fixtures.logged(on) 2295 const set = Fixtures.variablesSet(on) 2296 2297 await $.session.start(Fixtures.SESSION)First 10 of 12 lines.
- 11 lines in 5 placestypescripttests69 tokens
- 10 lines in 6 placestypescripttests50 tokensmods/sec-default/tests/fixtures/repointing-settings.ts:11–20mods/sec-default/tests/fixtures/setting-bash-env.ts:13–22mods/sec-default/tests/fixtures/setting-dyld-insert.ts:13–22mods/sec-default/tests/fixtures/setting-ld-preload.ts:13–22mods/sec-default/tests/fixtures/setting-node-options.ts:13–22and 1 more
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 17 | 7,827 | 11 | 223 | 2.85% |
| typescript | 230 | 10,200 | 3 | 37 | 0.36% |
| bash | 22 | 2,470 | 0 | 0 | 0% |
| tsx | 21 | 1,206 | 0 | 0 | 0% |
| perl | 1 | 168 | 0 | 0 | 0% |
| powershell | 1 | 152 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 416 | 36,470 | 95 | 1,028 | 2.82% |
| markdown | 108 | 28,143 | 13 | 251 | 0.89% |
| python | 18 | 7,910 | 11 | 223 | 2.82% |
| yaml | 50 | 1,682 | 3 | 42 | 2.5% |
| hcl | 8 | 1,387 | 3 | 24 | 1.73% |
| bash | 47 | 5,597 | 1 | 7 | 0.13% |
| text | 32 | 1,145 | 1 | 10 | 0.87% |
| json | 27 | 1,993 | 0 | 0 | 0% |
| markup | 2 | 1,817 | 0 | 0 | 0% |
| tsx | 21 | 1,206 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 20, 2026 | #7 | 152,755 (+167) | 732 | 87,698 | 127 | 1.81% | 1.18% | B 72 | a6e289a |
| Oct 18, 2026 | #5 | 151,915 (+179) | 733 | 97,077 | 127 | 1.63% | 1.18% | B 72 | dd6bee3 |
| Oct 4, 2026 | #7 | 149,297 (+128) | 689 | 91,928 | 90 | 1.3% | 1.21% | B 73.4 | 2bfb629 |
| Sep 21, 2026 | #5 | 147,243 (+419) | 645 | 86,608 | 67 | 1.07% | 1.26% | B 73.6 | 7974a70 |
| Sep 20, 2026 | #3 | 146,789 (+483) | 594 | 83,878 | 57 | 1% | 1.37% | B 72.6 | bf7d404 |
| Sep 19, 2026 | #2 | 146,390 (+444) | 594 | 83,878 | 57 | 1% | 1.37% | B 72.6 | bf7d404 |
| Sep 18, 2026 | #6 | 145,943 (+538) | 566 | 79,974 | 53 | 0.95% | 1.43% | — | 31a3b00 |
| Sep 17, 2026 | #8 | 145,628 (+165) | 566 | 79,824 | 53 | 0.95% | 1.43% | — | 68ac8bb |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.