[{"data":1,"prerenderedAt":1449},["ShallowReactive",2],{"navigation_docs":3,"-articles":178,"-articles-surround":1446},[4,50,72,89,125,147,163,168,173],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35,40,45],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"icon":39},"Changelog","\u002Fgetting-started\u002Fchangelog","1.getting-started\u002F7.changelog","i-lucide-scroll-text",{"title":41,"path":42,"stem":43,"icon":44},"Migrating from v4 to v5","\u002Fgetting-started\u002Fmigration","1.getting-started\u002F8.migration","i-lucide-arrow-right-left",{"title":46,"path":47,"stem":48,"icon":49},"jscpd v4 (TypeScript)","\u002Fgetting-started\u002Fv4","1.getting-started\u002F9.v4","i-simple-icons-typescript",{"title":51,"path":52,"stem":53,"children":54,"icon":6},"Guides","\u002Fguides","2.guides\u002F1.index",[55,57,62,67],{"title":51,"path":52,"stem":53,"icon":56},"i-lucide-book-open",{"title":58,"path":59,"stem":60,"icon":61},"Types of Code Clones","\u002Fguides\u002Fclone-types","2.guides\u002F2.clone-types","i-lucide-copy",{"title":63,"path":64,"stem":65,"icon":66},"How Detection Works","\u002Fguides\u002Fhow-detection-works","2.guides\u002F3.how-detection-works","i-lucide-scan-search",{"title":68,"path":69,"stem":70,"icon":71},"Duplication Trend over Git History","\u002Fguides\u002Fhistory","2.guides\u002F4.history","i-lucide-chart-no-axes-combined",{"title":73,"path":74,"stem":75,"children":76,"icon":6},"CI & Hooks","\u002Fci-and-hooks","3.ci-and-hooks\u002F1.index",[77,79,84],{"title":73,"path":74,"stem":75,"icon":78},"i-lucide-git-pull-request",{"title":80,"path":81,"stem":82,"icon":83},"Use jscpd in CI","\u002Fci-and-hooks\u002Fci","3.ci-and-hooks\u002F2.ci","i-lucide-github",{"title":85,"path":86,"stem":87,"icon":88},"Use jscpd in Pre-Commit Hook","\u002Fci-and-hooks\u002Fpre-commit","3.ci-and-hooks\u002F3.pre-commit","i-lucide-git-commit",{"title":90,"path":91,"stem":92,"children":93,"icon":95},"Reporters","\u002Freporters","4.reporters\u002F1.index",[94,96,100,105,110,115,120],{"title":90,"path":91,"stem":92,"icon":95},"i-lucide-file-chart-column",{"title":97,"path":98,"stem":99,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","4.reporters\u002F2.html",{"title":101,"path":102,"stem":103,"icon":104},"JSON Reporter","\u002Freporters\u002Fjson","4.reporters\u002F3.json","i-lucide-braces",{"title":106,"path":107,"stem":108,"icon":109},"Badge Reporter","\u002Freporters\u002Fbadge","4.reporters\u002F4.badge","i-lucide-award",{"title":111,"path":112,"stem":113,"icon":114},"SARIF Reporter","\u002Freporters\u002Fsarif","4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":116,"path":117,"stem":118,"icon":119},"CodeClimate \u002F GitLab Reporter","\u002Freporters\u002Fcodeclimate","4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":121,"path":122,"stem":123,"icon":124},"OpenMetrics Reporter","\u002Freporters\u002Fopenmetrics","4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":126,"path":127,"stem":128,"children":129,"icon":6},"Benchmarks","\u002Fbenchmarks","5.benchmarks\u002F1.index",[130,132,137,142],{"title":126,"path":127,"stem":128,"icon":131},"i-lucide-gauge",{"title":133,"path":134,"stem":135,"icon":136},"Detection Speed","\u002Fbenchmarks\u002Fdetection-speed","5.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":138,"path":139,"stem":140,"icon":141},"Multi-Format Detection","\u002Fbenchmarks\u002Fcross-format","5.benchmarks\u002F3.cross-format","i-lucide-layers",{"title":143,"path":144,"stem":145,"icon":146},"AI Token Efficiency","\u002Fbenchmarks\u002Fai-token-efficiency","5.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":148,"path":149,"stem":150,"children":151,"icon":153},"API","\u002Fapi","6.api\u002F1.index",[152,154,159],{"title":148,"path":149,"stem":150,"icon":153},"i-lucide-code",{"title":155,"path":156,"stem":157,"icon":158},"Rust Crates (v5)","\u002Fapi\u002Fcore","6.api\u002F2.core","i-lucide-box",{"title":160,"path":161,"stem":162,"icon":158},"MCP Server","\u002Fapi\u002Fmcp-server","6.api\u002F4.mcp-server",{"title":164,"path":165,"stem":166,"icon":167},"Trending","\u002Ftrending","7.trending","i-lucide-trending-up",{"title":169,"path":170,"stem":171,"icon":172},"Research","\u002Fresearch","8.research","i-lucide-graduation-cap",{"title":174,"path":175,"stem":176,"icon":177},"Articles","\u002Farticles","9.articles","i-lucide-newspaper",{"id":179,"title":174,"body":180,"description":1437,"extension":1438,"links":1439,"meta":1440,"navigation":1441,"path":175,"seo":1442,"stem":176,"__hash__":1445},"docs\u002F9.articles.md",{"type":181,"value":182,"toc":1426},"minimark",[183,191,278,288,293,304,310,318,328,333,336,346,351,354,364,369,372,382,387,390,400,405,408,418,423,430,440,445,448,458,463,466,476,481,484,494,499,502,506,516,521,524,534,539,542,552,557,560,570,575,590,600,605,612,622,627,635,645,650,653,663,668,671,681,686,689,699,704,715,725,730,737,747,756,771,775,785,790,801,811,816,819,829,834,837,847,852,855,865,870,881,891,896,899,909,914,917,927,932,935,945,950,953,957,967,972,975,985,990,1001,1011,1016,1023,1033,1038,1041,1051,1056,1059,1069,1074,1077,1087,1092,1099,1109,1114,1121,1131,1136,1139,1143,1153,1158,1165,1175,1180,1187,1197,1202,1205,1215,1220,1234,1244,1254,1257,1267,1272,1286,1296,1301,1304,1314,1319,1322,1326,1336,1341,1344,1354,1359,1362,1372,1377,1380,1390,1395,1398,1408,1413,1416,1420],[184,185,186,187,190],"p",{},"jscpd gets used, not just installed: engineers wire it into CI pipelines, pre-commit hooks and AI agent loops, then write up what happened. This page collects the strongest first-hand accounts of that — real commands, real configs, real numbers — each one opened at its primary source and checked twice. For papers, theses and patents that study or build on jscpd, see ",[188,189,169],"a",{"href":170},".",[192,193,194,209],"table",{},[195,196,197],"thead",{},[198,199,200,204,207],"tr",{},[201,202,203],"th",{},"Section",[201,205,206],{},"What it covers",[201,208,174],{},[210,211,212,224,235,246,256,267],"tbody",{},[198,213,214,218,221],{},[215,216,217],"td",{},"Measured on real codebases",[215,219,220],{},"Duplication numbers before and after",[215,222,223],{},"11",[198,225,226,229,232],{},[215,227,228],{},"A sensor in the agent loop",[215,230,231],{},"Catching what AI agents repeat",[215,233,234],{},"12",[198,236,237,240,243],{},[215,238,239],{},"Gates, ratchets and SARIF in CI",[215,241,242],{},"Turning a scan into a build step",[215,244,245],{},"9",[198,247,248,251,254],{},[215,249,250],{},"Hands-on guides and reviews",[215,252,253],{},"What jscpd actually finds when you point it at real code",[215,255,245],{},[198,257,258,261,264],{},[215,259,260],{},"Adopted by teams",[215,262,263],{},"Duplication as a release metric",[215,265,266],{},"8",[198,268,269,272,275],{},[215,270,271],{},"Comparisons and known limits",[215,273,274],{},"What jscpd catches, and what it misses",[215,276,277],{},"5",[184,279,280,281,287],{},"Know of a good write-up that is missing? ",[188,282,286],{"href":283,"rel":284},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Fissues",[285],"nofollow","Open an issue"," with the link.",[289,290,292],"h2",{"id":291},"measured-on-real-codebases-duplication-numbers-before-and-after","Measured on real codebases: duplication numbers before and after",[184,294,295,303],{},[296,297,298],"strong",{},[188,299,302],{"href":300,"rel":301},"https:\u002F\u002Fwoliveiras.com\u002Fposts\u002Fturning-unknown-duplication-into-solid-architecture\u002F",[285],"How We Turned 636 Code Clones into Solid Architecture","\nWilliam Oliveira · woliveiras.com, August 2026",[305,306,307],"blockquote",{},[184,308,309],{},"A fantastic tool used by the JavaScript community to preserve code quality is jscpd. Using that tool, we can check if we have code duplication in our projects.",[184,311,312,313,317],{},"A case study of cleaning up a monorepo (web, mobile, shared packages, APIs, scripts) with a fixed ",[314,315,316],"code",{},"pnpm dlx jscpd@5"," command (5.1.0, --min-lines 10 --min-tokens 70, test globs ignored, console\u002Fhtml\u002Fjson reporters). The first report mixed in tests and a patch script. After the scope was fixed, the production baseline had 636 clones, 15,887 duplicated lines and 10.95% duplication. The team logged every clone group in a Markdown inventory, used coding agents for the repetitive steps and ended at 168 clones, each one given an owning module or a reason to stay duplicated.",[184,319,320,327],{},[296,321,322],{},[188,323,326],{"href":324,"rel":325},"https:\u002F\u002Famurmann.com\u002Fposts\u002Fstop-waiting-for-better-models\u002F",[285],"Stop Waiting for Better Models","\nAlexander Murmann · amurmann.com, April 2026",[305,329,330],{},[184,331,332],{},"The skill runs jscpd across the entire codebase to find duplication clusters.",[184,334,335],{},"Personal blog post on building process around Claude Code's weaknesses: a \u002Fcode-health agent skill (born from BMAD agent retrospectives) runs knip, tsc --noUnusedLocals, jscpd and lizard, and jscpd once flagged auth middleware duplicated across 21 call sites. After the skill was introduced, duplication fell from a peak of 4.7 to 2.9 clones\u002FkLOC, and absolute clones dropped from 116 to 88 while the codebase grew 22%.",[184,337,338,345],{},[296,339,340],{},[188,341,344],{"href":342,"rel":343},"https:\u002F\u002Fngof.nikhaldimann.com\u002Fp\u002Fdeja-code",[285],"Déjà Code","\nNik Haldimann · Next Generation Of (Nik Haldimann), February 2026",[305,347,348],{},[184,349,350],{},"Note to some degree I mitigated this issue by excluding trivial duplications in jscpd (those with less than 25 tokens or 5 lines of code).",[184,352,353],{},"Case study of GitGuessr, a ~20K-line TypeScript codebase (excluding tests) written entirely by prompting Claude Code over ~500 commits. The author counted duplicated lines with jscpd (--min-tokens 25 --min-lines 5) at every commit and found that deduplicating commits, made at his own prompting, removed 890 lines (~4.5% of the codebase), which he calls a lower bound. As one way the problem could ease, he suggests running jscpd in CI, highlighting new duplicated code and kicking off a cloud agent to propose a refactoring.",[184,355,356,363],{},[296,357,358],{},[188,359,362],{"href":360,"rel":361},"https:\u002F\u002Fwww.linkedin.com\u002Fpulse\u002Ffast-fashion-code-marco-nissen-obtme",[285],"Fast Fashion for Code","\nMarco Nissen · LinkedIn (Code Different newsletter), August 2026",[305,365,366],{},[184,367,368],{},"I looked at one large code base, and ran jscpd against the source tree, with a minimum of eight lines and sixty tokens.",[184,370,371],{},"A newsletter essay arguing that AI agents make writing new code cheaper than reusing existing code, which drives duplication up. The author ran jscpd (min 8 lines, 60 tokens) on his own large codebase and found 2,179 exact clones and 46,656 duplicated lines (4.22% of 1,104,572 lines across 2,678 files), which he treats as a floor. He recommends jscpd (with its MCP server, AI reporter and agent skill) as a feedback sensor inside the agent loop and as step one of a scheduled consolidation pass, noting it misses semantically equivalent rewrites.",[184,373,374,381],{},[296,375,376],{},[188,377,380],{"href":378,"rel":379},"https:\u002F\u002Fwww.linkedin.com\u002Fpulse\u002Fquality-gates-ai-generated-code-krzysztof-wr%C3%B3bel-jubff",[285],"Quality gates for AI-generated code","\nKrzysztof Wróbel · LinkedIn Pulse, May 2026",[305,383,384],{},[184,385,386],{},"jscpd scan of the combined source (53 .py files, ~16.6k LOC): 8 clone pairs covering 208 duplicated lines. 208 \u002F 16,600 ≈ 1.25%.",[184,388,389],{},"Proposes six CI quality gates for code written by AI agents. The duplication gate is under 3% on new code, and jscpd is the duplication measure. With it the author measures three respected Python libraries at 1.25% (8 clone pairs, 208 lines), and aider's duplication falling from 3.3% to 0.6% over 25 monthly checkpoints as its AI-written share rose. The piece also notes that jscpd has no Zig tokenizer.",[184,391,392,399],{},[296,393,394],{},[188,395,398],{"href":396,"rel":397},"https:\u002F\u002Fmedium.com\u002Ftowards-artificial-intelligence\u002Fyour-ci-pipeline-wasnt-built-for-ai-code-here-s-how-to-fix-it-70d5cf34993d",[285],"Your CI Pipeline Wasn’t Built for AI Code. Here’s How to Fix It.","\nChristopher Montes · Towards AI (Medium), March 2026",[305,401,402],{},[184,403,404],{},"Start with a tool like jscpd (JavaScript), Simian, or SonarQube's duplication detection configured with lower thresholds than defaults.",[184,406,407],{},"A consultant's case study of an AI-powered sales platform, about 130,000 lines of Python and TypeScript across several microservices, where Claude Code and Cursor agents did most new development. It proposes four CI gates. For Gate 1 (duplication and bloat detection) it says to start with jscpd, Simian or SonarQube at lower-than-default thresholds: flag duplications over 20 lines, and don't make it a hard block yet. Its next steps say to run jscpd on your last 20 AI-generated PRs. The team's first scan found over 400 lines of duplicate HTTP client code, and consolidation cut about 15,000 lines of duplicate code to 1,500.",[184,409,410,417],{},[296,411,412],{},[188,413,416],{"href":414,"rel":415},"https:\u002F\u002Fblog.stephanys.de\u002F2026\u002F04\u002Fha-widgets-eigene-home-assistant-apps-mit-vue-3-teil-4-architektur-checks-und-duplikate",[285],"HA Widgets — Eigene Home-Assistant-Apps mit Vue 3 (Teil 4: Architektur-Checks und Duplikate)","\nMarkus Stephany · Markus und Felix Stephany | Blog, April 2026",[305,419,420],{},[184,421,422],{},"jscpd (JavaScript Copy-Paste Detector) findet solche Klone:",[184,424,425,426,429],{},"Part 4 of a series on three Vue 3 Home Assistant apps (desktop, phone, tablet) that share a common library. The author runs ",[314,427,428],{},"npx jscpd --min-lines 6 --min-tokens 50 --ignore \"**\u002Fnode_modules\u002F**,**\u002Fdist\u002F**\""," over the three apps and shared\u002F. The first run found 17 clones in template markup and 0 in TypeScript. Two findings were refactored: 31 lines of identical edit-dialog template were extracted into VorratItemDialog.vue, and four near-identical item blocks became LagerItemRow.vue, which exposed a bug where one copy had lost a v-if check. The post also explains which clones were accepted (ConfirmDialog, LightButton, the alarm overlay, a unit select). jscpd becomes the fourth check after tsc, ESLint and a custom Python import-check script, run less often, after larger features or refactorings. The post says it was written with Claude Code assistance and edited by hand.",[184,431,432,439],{},[296,433,434],{},[188,435,438],{"href":436,"rel":437},"https:\u002F\u002Fchocopy.medium.com\u002Fmed%C3%AD-antes-de-tocar-c%C3%B3mo-pas%C3%A9-un-quality-gate-de-sonarqube-978928df8b78",[285],"Medí antes de tocar: cómo pasé un Quality Gate de SonarQube","\nCbenitez (Cristhian Benitez) · Medium (chocopy.medium.com), July 2026",[305,441,442],{},[184,443,444],{},"jscpd con --min-tokens 50 agarra clones chiquitos que Sonar ni cuenta — Sonar recién marca duplicación arriba de ~100 tokens.",[184,446,447],{},"A first-person case study of getting a failing SonarQube Quality Gate to pass (68 violations, 3.55% duplication, 55% coverage). The author ran jscpd to find duplicate blocks, but the ~45-token spinner and 'not found' blocks he extracted didn't count in Sonar, which only counts clones above ~100 tokens. Moving one fetch block copied across 8 screens into hooks dropped Sonar's duplication from 3.55% to ~2.35%; the lesson is to measure against the gate's own metric, not jscpd's.",[184,449,450,457],{},[296,451,452],{},[188,453,456],{"href":454,"rel":455},"https:\u002F\u002Fsibyx.github.io\u002Foss-profanity\u002F",[285],"Vulgarizmy, otvorený kód a jeho kvalita","\nJakub Dubec (FIIT STU) · sibyx.github.io (OpenCamp Bratislava 2026), April 2026, talk",[305,459,460],{},[184,461,462],{},"Copy-paste rate — jscpd · \"how much of the codebase is duplicated chunks?\"",[184,464,465],{},"A Slidev deck for a talk at OpenCamp Bratislava 2026 (Slovak title, English slides) that compares code quality in 1,295 GitHub repos with and without profanity in commit messages. jscpd@4.0.9 measures the copy-paste rate, one of five quality lenses; the talk found profane repos slightly more complex, but no measurable difference in lint counts, copy-paste rate or comment density.",[184,467,468,475],{},[296,469,470],{},[188,471,474],{"href":472,"rel":473},"https:\u002F\u002Fben.balter.com\u002F2026\u002F08\u002F17\u002Fhow-i-over-engineered-my-book\u002F",[285],"How I over-engineered my book","\nBen Balter · ben.balter.com, August 2026",[305,477,478],{},[184,479,480],{},"By this final pass the two mechanical layers came up clean, but they’d earned it: jscpd and the n-gram scan had already caught the copy-paste and recycled phrasing (a doubled motif here, a reused TL;DR structure there), and I’d fixed each.",[184,482,483],{},"A long write-up of the Git, Markdown and CI pipeline behind Ben Balter's book 'Open and Async', which builds five formats and runs thousands of automated checks. jscpd is the first of three duplication-detection layers (then an n-gram scan, then an LLM semantic pass) and caught long verbatim blocks pasted between chapters. A footnote adds that jscpd is not prose-specific and is 'a great way to DRY up code', and jscpd is also credited in the open-source tools list.",[184,485,486,493],{},[296,487,488],{},[188,489,492],{"href":490,"rel":491},"https:\u002F\u002Fblog.gingerbeardman.com\u002F2026\u002F04\u002F17\u002Ftoday-i-shipped-twenty-apps-and-a-screensaver\u002F",[285],"Today I shipped 20 apps and a screensaver","\nMatt Sephton · blog.gingerbeardman.com, April 2026",[305,495,496],{},[184,497,498],{},"Then jscpd to spot copy-paste duplication or similar code sections and refactor them into shared helpers, which can sometimes increases binary size slightly, but it’s a price worth paying for maintainability across so many codebases.",[184,500,501],{},"First-hand account of an indie developer releasing 20 macOS\u002FiOS apps and a screensaver at once. For code hygiene he ran Periphery to remove dead code, then jscpd across every project to find copy-paste and similar code to pull out into shared helpers. His verdict: the helpers can make the binary slightly bigger, but that is worth it for maintainability.",[289,503,505],{"id":504},"a-sensor-in-the-agent-loop-catching-what-ai-agents-repeat","A sensor in the agent loop: catching what AI agents repeat",[184,507,508,515],{},[296,509,510],{},[188,511,514],{"href":512,"rel":513},"https:\u002F\u002Fsteipete.me\u002Fposts\u002Fjust-talk-to-it",[285],"Just Talk To It - the no-bs Way of Agentic Engineering","\nPeter Steinberger · steipete.me, October 2025",[305,517,518],{},[184,519,520],{},"Typical refactor work is using jscpd for code duplication, knip for dead code, running eslint’s react-compiler and deprecation plugins, checking if we introduced api routes that can be consolidated, maintaining my docs, breaking apart files that grew too large",[184,522,523],{},"Peter Steinberger describes his agentic engineering workflow: several Codex agents running in parallel, and about 20% of his time spent on refactoring that the agents do for him. jscpd is his usual duplication check in those refactor passes, next to knip for dead code and eslint's react-compiler and deprecation plugins.",[184,525,526,533],{},[296,527,528],{},[188,529,532],{"href":530,"rel":531},"https:\u002F\u002Fwww.phparch.com\u002F2026\u002F08\u002Fi-made-my-ai-agent-fix-its-own-copy-paste-jscpd-mago\u002F",[285],"I Made My AI Agent Fix Its Own Copy-Paste (jscpd + Mago)","\nScott Keck-Warren · PHP Architect, August 2026",[305,535,536],{},[184,537,538],{},"jscpd is a fast, language-agnostic copy\u002Fpaste detector that reports duplication percentage and clone locations.",[184,540,541],{},"Hands-on tutorial pairing jscpd with the Mago PHP analyzer as a feedback loop for AI agents. It shows a real run on a 437-file PHP app (451 clones, 13.44% duplicated tokens, 53ms), fails the build with --threshold 5, and uses a .jscpd.json (minTokens 60, console\u002Fhtml reporters, vendor\u002Ftests ignored). A check.sh (jscpd, mago lint, mago analyze) is meant to run after every agent edit, and there is an example Claude Code PostToolUse hook config. There is a video version at youtu.be\u002FubhVleOpLQ0. The author's own site only links to that video, so this page is the canonical text.",[184,543,544,551],{},[296,545,546],{},[188,547,550],{"href":548,"rel":549},"https:\u002F\u002Fevilmartians.com\u002Fchronicles\u002Ften-anti-ai-slop-moves-for-frontend-projects-going-faster-than-humans-can-review",[285],"10 anti-AI slop moves for frontend projects going faster than humans can review","\nYuri Mikhin, Travis Turner · Evil Martians (Martian Chronicles), September 2026",[305,553,554],{},[184,555,556],{},"jscpd catches copy-pasted code by looking for textually similar blocks.",[184,558,559],{},"An Evil Martians engineering post listing ten automated checks for AI-generated TypeScript\u002FReact code. Check 9 is 'Find duplicate code with jscpd': it cites GitClear's 81% rise in block duplication, gives a real case where diverged copies showed the same payroll total as 23 hours 30 minutes in one place and 0 hours 00 minutes in another, and recommends different jscpd thresholds for JSX markup and business logic. It notes that jscpd only finds textual duplication, so semantic duplicates still need human review. The cost section adds that jscpd will flag intentional repetition in tests and fixtures.",[184,561,562,569],{},[296,563,564],{},[188,565,568],{"href":566,"rel":567},"https:\u002F\u002Fwww.dominicode.com\u002Fposts\u002Fcasa-winchester-arquitectura-codigo-ia",[285],"Arquitectura de código generado con IA: la Casa Winchester","\nBezael Pérez (Dominicode) · Dominicode, September 2026",[305,571,572],{},[184,573,574],{},"knip y jscpd son los dos que faltan en casi todos los repos, y son justo los que detectan entropía en vez de bugs.",[184,576,577,578,581,582,585,586,589],{},"Long essay on architectural entropy in agent-written repos. It uses jscpd (",[314,579,580],{},"npx jscpd src --min-lines 5 --min-tokens 60",") to measure duplicated utilities and wires it into an ",[314,583,584],{},"agent:check"," script as ",[314,587,588],{},"jscpd src --min-tokens 60 --threshold 1 --reporters console,threshold",", a computational sensor next to tsc, ESLint, vitest and knip. The author notes the exit code only changes when the threshold reporter is added.",[184,591,592,599],{},[296,593,594],{},[188,595,598],{"href":596,"rel":597},"https:\u002F\u002Fwww.fikril.dev\u002Fblog\u002Fharness-engineering-for-agent-era",[285],"Harness Engineering: Designing Codebases for the Agent-First Era","\nAhmad Fikril Al Muzakki · fikril.dev, August 2026",[305,601,602],{},[184,603,604],{},"Untuk mengatasi ini, kita memanfaatkan algoritma deteksi duplikasi berbasis AST menggunakan jscpd yang diintegrasikan langsung ke dalam CLI repositori (mobilekit duplication check).",[184,606,607,608,611],{},"An Indonesian blog post on building a \"repository harness\" of mechanical guardrails for AI coding agents in a Flutter codebase. jscpd is the duplication sensor inside the repo's own CLI (",[314,609,610],{},"mobilekit duplication check","). It runs per-profile scans (core: 60 tokens \u002F 7 lines; small-helpers: 20 tokens \u002F 4 lines) with generated code excluded. A report filter then drops same-file clones and checks the remaining file pairs against per-profile allowlists. Actionable groups are reported back to the agent, which must refactor or add an allowlist entry during verify --profile full\u002Fci.",[184,613,614,621],{},[296,615,616],{},[188,617,620],{"href":618,"rel":619},"https:\u002F\u002Fsimonetavoletta.it\u002Fblog\u002Fai-doesnt-follow-your-rules\u002F",[285],"If Your AI Doesn't Follow Your Rules, Here's How to Fix That","\nSimone Tavoletta · Simone Tavoletta, June 2026",[305,623,624],{},[184,625,626],{},"check-duplication runs jscpd. This is the sneaky one.",[184,628,629,630,634],{},"A personal blog post on keeping AI coding agents within a project's standards. The author ends AGENTS.md with a 'done' checklist the agent must pass (lint:fix, test, test:coverage:file, check-duplication), and the duplication step runs jscpd. His config uses minTokens 50, threshold 2, path app, ignores *.spec.ts and sets reporters ",[631,632,633],"span",{},"'ai'"," so the agent reads the report and merges duplicates before the PR; a lint and test pre-push hook is the fallback.",[184,636,637,644],{},[296,638,639],{},[188,640,643],{"href":641,"rel":642},"https:\u002F\u002Ffr.linkedin.com\u002Fposts\u002Fbastienteissier_pour-limiter-la-tendance-de-lia-%C3%A0-r%C3%A9%C3%A9crire-activity-7500160444385468417-p0SO",[285],"Post de Bastien Teissier","\nBastien Teissier · LinkedIn, August 2026",[305,646,647],{},[184,648,649],{},"En moyenne, jscpd me remonte un retour sur une pull request sur trois, en économisant des tokens en évitant de faire relire une trop grande partie de la codebase à mon agent.",[184,651,652],{},"A developer's LinkedIn post on adding jscpd to his AI code-review agent skill, after a first cleanup pass, so the agent finds and refactors newly added duplication. He says it flags about one PR in three, and he names --reporter ai, the v5 Rust rewrite's speed and 200+ languages.",[184,654,655,662],{},[296,656,657],{},[188,658,661],{"href":659,"rel":660},"https:\u002F\u002Fintent-driven.dev\u002Fblog\u002F2026\u002F08\u002F23\u002Ftdd-bdd-spec-driven-development\u002F",[285],"How TDD and BDD Actually Fit Into Spec-Driven Development","\nHari Krishnan · intent-driven.dev, August 2026",[305,664,665],{},[184,666,667],{},"JSCPD for code duplication",[184,669,670],{},"An article on how AI coding agents game TDD and how to fit spec-driven development, BDD and strict mockist TDD together. In the section on duplicated test code it suggests a duplication tool (misspelled \"jspcd\" in the body), and the references list \"JSCPD for code duplication\" next to Stryker mutation testing. There are no configuration details or numbers for jscpd.",[184,672,673,680],{},[296,674,675],{},[188,676,679],{"href":677,"rel":678},"https:\u002F\u002Fngof.nikhaldimann.com\u002Fp\u002F4-ways-to-combat-claudes-code-duplication",[285],"4 ways to combat Claude's code duplication, ranked from least to most AI-native","\nNik Haldimann · Next Generation Of (Nik Haldimann), March 2026",[305,682,683],{},[184,684,685],{},"One such tool that I like is jscpd, which (deterministically) detects code duplication across a wide variety of languages.",[184,687,688],{},"Substack essay that ranks four ways to cut the duplicated code Claude Code (Opus 4.6) writes. The most AI-native one is the author's DRYwall plugin, which wraps jscpd in an MCP server proxy, a skill and a subagent (\u002Fplugin install drywall@drywall, \u002Fdrywall:scan). The author also recounts Claude copying the jscpd-calling instructions into two places instead of using the MCP tool.",[184,690,691,698],{},[296,692,693],{},[188,694,697],{"href":695,"rel":696},"https:\u002F\u002Fqiita.com\u002Fshun123\u002Fitems\u002F7aa06b6982dfd1730af0",[285],"Claude Codeに「違反できないコード」を書かせる：ガイドとセンサーの設計","\nshun noel (shun123) · Qiita, August 2026",[305,700,701],{},[184,702,703],{},"\"dup\": \"jscpd src --threshold 3\",",[184,705,706,707,710,711,714],{},"A long hands-on guide to building a 'harness' so Claude Code keeps a Hono + TypeScript onion-architecture API within its rules, using guides (tsconfig, CLAUDE.md, .claude\u002Fsettings.json, spec docs) and sensors (eslint, dependency-cruiser, Stryker, knip, jscpd). jscpd is installed as a dev dependency and runs as ",[314,708,709],{},"jscpd src --threshold 3"," in the slow ",[314,712,713],{},"harness:slow"," script, which the human runs at milestones. In the final-check table, the guide says a duplication finding may mean the same business rule is scattered across several places.",[184,716,717,724],{},[296,718,719],{},[188,720,723],{"href":721,"rel":722},"https:\u002F\u002Fblog.jackerlab.com\u002Fentropy-management-code-rot-prevention\u002F",[285],"[\\Harness Engineering] 엔트로피 관리","\njackerlab · Blog * JackerLab, March 2026",[305,726,727],{},[184,728,729],{},"“거의 같지만 변수명만 다른” 함수, “기능은 같지만 구현이 다른” 코드는 jscpd로 잡기 어렵다.",[184,731,732,733,736],{},"A Korean harness-engineering post about code rot in codebases written by AI agents. Its first entropy-management step is jscpd duplicate detection. It shows a .jscpd.json with threshold 5, json\u002Fconsole reporters, ignores, minLines 5, minTokens 50 and output reports\u002Fjscpd, plus a CI gate ",[314,734,735],{},"npx jscpd src\u002F --threshold 5 --exitCode 1",". A weekly GitHub Actions 'Entropy Cleanup' workflow runs jscpd with the JSON reporter next to knip and depcheck. It writes the jscpd-report.json total statistics into an entropy report and files that report as a GitHub issue, which a person or an agent can then act on. The post notes that jscpd has trouble with near-identical functions that differ only in variable names, or that do the same thing with different code, and adds an AST-based similar-function scanner for those.",[184,738,739,746],{},[296,740,741],{},[188,742,745],{"href":743,"rel":744},"https:\u002F\u002Fwiki.g15e.com\u002Fpages\u002FAgentic%20coding%20experiment%203",[285],"에이전트 기반 코딩 실험 3","\nak · akwiki (wiki.g15e.com), August 2025",[305,748,749],{},[750,751,752],"ul",{},[753,754,755],"li",{},"id: jscpd     command: npm run --silent check:jscpd",[184,757,758,759,762,763,766,767,770],{},"Personal wiki write-up of the author's third agentic-coding experiment: a semi-structured spec format (S4) plus an s4 CLI. The spec's ",[314,760,761],{},"tools"," section registers the static checks and tests the AI agent has to satisfy, with jscpd wired in as ",[314,764,765],{},"npm run --silent check:jscpd"," next to biome, tsc, eslint, depcruise, knip, unit tests\u002Fcoverage and a test-to-code ratio check. ",[314,768,769],{},"s4 status"," runs them all and tells the agent what to fix next.",[289,772,774],{"id":773},"gates-ratchets-and-sarif-in-ci-turning-a-scan-into-a-build-step","Gates, ratchets and SARIF in CI: turning a scan into a build step",[184,776,777,784],{},[296,778,779],{},[188,780,783],{"href":781,"rel":782},"https:\u002F\u002Fzenn.dev\u002Fsingularity\u002Farticles\u002Fjscpd-dry-detection-mono",[285],"jscpd で重複コードを機械的に潰す — 定期監査とCI差分チェックの二段構え","\nIsamu (isamua) · Zenn (singularity publication), July 2026",[305,786,787],{},[184,788,789],{},"jscpd はコピペコード検出（Copy\u002FPaste Detector）の定番です。",[184,791,792,793,796,797,800],{},"An in-depth guide to jscpd v5 with a real run of ",[314,794,795],{},"npx jscpd@5"," on the 267k-line MulmoClaude TypeScript monorepo: 512 clones and 3.56% duplication overall (TypeScript 3.27%) in 127 ms. It advises narrowing ",[314,798,799],{},"format"," because markdown and JSON are noise and token % can top 100%, running periodic audits with --blame and the HTML reporter, and not relying on a global --threshold to catch new copies. Instead it uses the official GitHub Action's SARIF output with Code Scanning, compares jscpd with eslint-plugin-sonarjs and SonarQube, and covers the ai reporter, MCP server and dry-refactoring skill.",[184,802,803,810],{},[296,804,805],{},[188,806,809],{"href":807,"rel":808},"https:\u002F\u002Fzenn.dev\u002Fsingularity\u002Farticles\u002Fclean-code-ci-for-ai-era",[285],"AIでがんがん書く時代の「きれいなコード」の守り方 — ESLint+SonarJS \u002F jscpd \u002F knip をCIに置く","\nIsamu (isamua) · Zenn (シンギュラリティ・ソサエティ), July 2026",[305,812,813],{},[184,814,815],{},"jscpd はトークン列レベルのコピペ検出器で、v5 系は Rust 製。26万行を0.1秒台で舐めるので、CI に置いてもコストはほぼゼロです。",[184,817,818],{},"Walks through the four-tool quality setup (ESLint, SonarJS, jscpd, knip) on the AI-built MulmoClaude monorepo. jscpd runs in a duplication-scan.yaml workflow with --format typescript, ignore globs and console,sarif reporters, and its SARIF goes to GitHub Code Scanning. The author explains that a global --threshold 5 cannot stop new clones (20 copied lines only move 3.27% to 3.28%), so jscpd reports clones rather than blocking the build.",[184,820,821,828],{},[296,822,823],{},[188,824,827],{"href":825,"rel":826},"https:\u002F\u002Fcodewithnumbers.com\u002Fwriting\u002Fbuilt-a-check-it-caught-me",[285],"I built a check, and the first thing it caught was me","\nAsif Foysal Meem · asif.meem, June 2026",[305,830,831],{},[184,832,833],{},"A tool called jscpd that does not grep for text, it tokenises the code and slides a window looking for repeated sequences, so it catches duplication even when the variable names differ.",[184,835,836],{},"A first-person post about adding a jscpd gate to every pull request as a ratchet. The threshold sits at 3.6%, just above the measured 3.11% baseline (495 files, 113 clones, a 22s CI step). Copying two large files on purpose pushed duplication to 4.37%, and the build failed with exit code 1. The author also warns that running the detector by its bare name fetched a Rust tool that rejected their flags, which they took for an unrelated tool (in June 2026 the npm 'jscpd' latest was already the Rust v5 line), so pin the package and version. They also warn that piping jscpd's output hides its failure exit code.",[184,838,839,846],{},[296,840,841],{},[188,842,845],{"href":843,"rel":844},"https:\u002F\u002Fchobble.com\u002Fvideos\u002Fguardrails-with-ai-code-tools\u002F",[285],"Using Guardrails with AI Code Tools | Eleventy Meetup Talk","\nStefan Burke (Chobble) · Chobble, February 2026, talk",[305,848,849],{},[184,850,851],{},"Layer 2 - Copy-paste detection with jscpd: Running at three strictness levels (12 tokens for utility methods, 23 for source, 40 for tests) with a ratchet that automatically tightens the threshold whenever duplication drops.",[184,853,854],{},"The author's own page for his 20-minute 11ty Meetup talk (YouTube NLrQSRoVKSg, uploaded 2026-02-05) on six layers of CI guardrails that keep Claude Code in line on an Eleventy template. jscpd is layer 2: it runs at 12, 23 and 40 minimum tokens (utilities, source, tests), and a ratchet tightens the threshold whenever duplication drops.",[184,856,857,864],{},[296,858,859],{},[188,860,863],{"href":861,"rel":862},"https:\u002F\u002Fqiita.com\u002Fakira_papa_AI\u002Fitems\u002F16b298509f882255939d",[285],"AIで開発は速くなったのに、半年後のコードが「重い」理由 — AI時代の技術的負債を、測って・借りて・返す実践ガイド","\nakira_papa_AI (あきらパパ) · Qiita, June 2026",[305,866,867],{},[184,868,869],{},"実プロジェクトでは jscpd \u002F radon の出力件数を数える。ここは例として簡略化。",[184,871,872,873,876,877,880],{},"Guide to managing AI-accelerated technical debt: it names jscpd (with PMD\u002FCPD) as the free tool for measuring duplication, shows ",[314,874,875],{},"npx jscpd .\u002Fsrc --min-lines 5 --reporters console",", and builds a Python ratchet script run from GitHub Actions that reads ",[314,878,879],{},".statistics.total.clones"," from jscpd's JSON report and fails the PR if duplication rises above a stored baseline. jscpd output is also fed into an AI prompt for sorting debt by priority.",[184,882,883,890],{},[296,884,885],{},[188,886,889],{"href":887,"rel":888},"https:\u002F\u002Fprickles.org\u002Ftenet\u002Fduplication-detection\u002FTA2",[285],"TA2 Duplication Detection","\nAdam Lewis · Prickles, May 2026",[305,892,893],{},[184,894,895],{},"The mistake the existing TA2 is correcting is the assumption that jscpd green means duplication-free.",[184,897,898],{},"One of the tenets in Prickles, Adam Lewis's collection of software craft rules for human teams and AI coding agents. It argues that a clean jscpd run does not mean the code is free of duplication. It recommends jscpd as the CI gate for Type-1 and Type-2 clones, Semgrep or ast-grep weekly for Type-3, and an LLM review of each change for Type-4. It includes a .jscpd.json with threshold 0, minTokens 50, minLines 5, mode strict and html\u002Fconsole\u002Fmarkdown reporters. It also has per-language tool tables for TypeScript, JavaScript, Python, Java and PHP, which list jscpd next to SonarQube CPD, Semgrep and ast-grep, plus PMD CPD for Java and phpcpd for PHP. It ends with a rule block to paste into Cursor, Claude Code or Cline. It is guidance backed by cited research, with no measured results.",[184,900,901,908],{},[296,902,903],{},[188,904,907],{"href":905,"rel":906},"https:\u002F\u002Fdevelopers.gmo.jp\u002Ftechnology\u002F81389\u002F",[285],"ハーネスで縛れ、AIに任せろ ーAIエージェントの出力品質は“構造”で守る","\n平野 空暉 (GMO Internet) · GMO Developers, March 2026",[305,910,911],{},[184,912,913],{},"jscpd コード重複 advisory",[184,915,916],{},"GMO Internet describes the 'harness engineering' it uses to keep Claude Code output consistent while building the ConoHa VPS MCP server: 48 rules enforced in four escalating levels. At the CI level, jscpd checks code duplication as a non-blocking advisory check, next to blocking Biome, dependency-cruiser, knip and npm audit, and advisory Stryker.",[184,918,919,926],{},[296,920,921],{},[188,922,925],{"href":923,"rel":924},"https:\u002F\u002Flunaris.digital\u002Fblog\u002Farticles\u002F2026-03-10-jscpd-cspell",[285],"Code-Qualität automatisieren: jscpd gegen Duplikation, cspell gegen Tippfehler","\nFlorian Bader · Lunaris Digital Solutions, March 2026",[305,928,929],{},[184,930,931],{},"jscpd erkennt Code-Duplikate in .NET und Web, cspell findet Tippfehler und verbotene Begriffe.",[184,933,934],{},"Consultancy blog tutorial on adding jscpd and cspell to a mixed .NET\u002FTypeScript repo. It shows an npx jscpd command and a .jscpd.json (threshold 5, minLines 8, minTokens 70, console\u002Fhtml\u002Fjson reporters, ignores for *.g.cs, Migrations, obj\u002Fbin), jscpd:ignore-start\u002Fend comments, a rollout that starts non-blocking, and calls jscpd the more pragmatic choice than SonarQube when you have no server.",[184,936,937,944],{},[296,938,939],{},[188,940,943],{"href":941,"rel":942},"https:\u002F\u002Fwebkrauts.de\u002Fcomment\u002F4770",[285],"Acht Wege zur stetigen Qualitätskontrolle – Teil 2","\nSebastian Golasch · Webkrauts, December 2014",[305,946,947],{},[184,948,949],{},"jscpd: { ci: { path: 'src\u002F', output: 'report\u002Fjs-cpd.xml' } }",[184,951,952],{},"Second part of a two-part article on front-end continuous integration with Grunt and Jenkins, published in the Webkrauts Advent calendar 2014. Its 'Code Duplication' section installs the Grunt wrapper for jscpd (spelled 'grunt-jscp' in the text, linked to mazerte\u002Fgrunt-jscpd), configures a jscpd:ci task that writes report\u002Fjs-cpd.xml, adds it to the build-ci task, and publishes the results in Jenkins with the Static Code Analysis plugins ('Publish duplicate code analysis results'). It warns that the tool compares code as text and misses renamed variables, and recommends switching to the AST-based jsinspect once that tool has a Jenkins-compatible XML reporter. The given URL is a comment permalink that renders the full article.",[289,954,956],{"id":955},"hands-on-guides-and-reviews-what-jscpd-actually-finds-when-you-point-it-at-real-code","Hands-on guides and reviews: what jscpd actually finds when you point it at real code",[184,958,959,966],{},[296,960,961],{},[188,962,965],{"href":963,"rel":964},"https:\u002F\u002Fgittested.com\u002Freviews\u002Fjscpd\u002F",[285],"jscpd is a copy editor for copied code","\nGitTested · GitTested, September 2026",[305,968,969],{},[184,970,971],{},"jscpd is a local copy\u002Fpaste detector that points maintainers to repeated source-code blocks and can enforce a CI threshold.",[184,973,974],{},"A hands-on review of jscpd v5 (commit 56b6506, tested Aug 28, 2026) on a pinned TypeScript\u002FJavaScript\u002FJSX production monorepo, using --min-tokens 50 --min-lines 5 --mode mild --cross-formats js-ts. The scan found 67 clone groups (1.00% duplicated lines) across 378 analyzed sources. A broader scan of 1,686 sources, including tests, fixtures and docs, reported 8.36%. The reviewers judged 16 of the 20 highest-impact groups plausible consolidation candidates. The JSON, HTML, XML, CSV, Markdown, badge, SARIF 2.1.0, AI, console and summary outputs worked, and so did thresholds and an MCP session. But an unknown format, a missing path, an unwritable output, an invalid mode and a misspelled config key all still exited 0. The verdict is 'try' for local review, and in CI you should also check the report artifact and the analyzed-source count. It compares briefly with PMD CPD and SonarQube.",[184,976,977,984],{},[296,978,979],{},[188,980,983],{"href":981,"rel":982},"https:\u002F\u002Finsights.casoon.de\u002Fartikel\u002Fjscpd-duplizierten-code-erkennen\u002F",[285],"Duplizierten Code in TypeScript-Projekten erkennen — jscpd im Einsatz","\nJörn Seidel · CASOON Insights, April 2026",[305,986,987],{},[184,988,989],{},"jscpd (JavaScript Copy\u002FPaste Detector) findet solche Muster.",[184,991,992,993,996,997,1000],{},"Part 2 of a 7-part German series on code quality, pitched at AI-generated code. It walks through ",[314,994,995],{},"npx jscpd src\u002F",", a .jscpd.json (minLines 8, minTokens 80, threshold 5, ignore globs, consoleFull+html reporters), an HTML report and a GitHub Actions PR gate with ",[314,998,999],{},"--threshold 5",", plus a baseline-then-lower strategy. It rates jscpd lighter than SonarQube and notes ESLint has no clone detector.",[184,1002,1003,1010],{},[296,1004,1005],{},[188,1006,1009],{"href":1007,"rel":1008},"https:\u002F\u002Fafonsolelis.github.io\u002Faulas\u002Fpages\u002Fmodule-2-common\u002Fmaterials\u002Flesson-9-material.html",[285],"Aula 9 — Testes e Automação — Inteli","\nAfonso Brandão · afonsolelis.github.io (Inteli course portal), June 2026, course material",[305,1012,1013],{},[184,1014,1015],{},"O jscpd (JavaScript Copy\u002FPaste Detector) acha trechos duplicados por tokens, não por texto.",[184,1017,1018,1019,1022],{},"Portuguese lesson material from Inteli's Module 2 ('Testes e Automação'). The lesson covers metrics-driven refactoring and non-functional requirements. It gives jscpd its own section: run ",[314,1020,1021],{},"npx jscpd src --min-tokens 30",", read the sample output (6.4% duplicated, 5 clones), aim for under 5% duplication, extract the clones into helpers and re-run. It also explains --min-tokens (20 is noisier, 50 more conservative, 50 is the default) and uses jscpd with ESLint, Jest coverage, madge and autocannon.",[184,1024,1025,1032],{},[296,1026,1027],{},[188,1028,1031],{"href":1029,"rel":1030},"https:\u002F\u002Fqiita.com\u002FRyoWakabayashi\u002Fitems\u002F8c3d026a481474c9bcf4",[285],"jscpd に無視してもらいたい","\nRyo Wakabayashi (RyoWakabayashi) · Qiita, July 2021",[305,1034,1035],{},[184,1036,1037],{},"jscpd は素晴らしいツールです",[184,1039,1040],{},"A Super-Linter user shows jscpd flagging repeated same-value blocks in a JSON config file (with the clone report output). Since jscpd:ignore-start comments can't go in JSON, the author excludes JSON files with a .github\u002Flinters\u002F.jscpd.json config: threshold 0, the consoleFull reporter, ignore **\u002F*.json, absolute true.",[184,1042,1043,1050],{},[296,1044,1045],{},[188,1046,1049],{"href":1047,"rel":1048},"https:\u002F\u002Fjuejin.cn\u002Fpost\u002F7387237066012704787",[285],"使用jscpd实现单个项目或多个项目代码重复度检测","\n娜个小部呀 · Juejin, July 2024",[305,1052,1053],{},[184,1054,1055],{},"最近逛社区发现了一个检测代码重复率的纯JavaScript代码库【jscpd】，于是自己在本地跑了几遍，还不错，在这里记录分享一下~",[184,1057,1058],{},"A hands-on Chinese tutorial on jscpd: global install, the report fields (with a real run showing 30873\u002F206720 duplicated markup lines, 1185 clones, 20.564 s), the @jscpd\u002Fcore default options, .jscpd.json and package.json config, CLI flags (-k\u002F-l\u002F-x\u002F-r), and a parent-folder package.json that scans four projects at once with per-project ignores. It also shows jscpd:ignore-start\u002Fend comments in JS, CSS and HTML.",[184,1060,1061,1068],{},[296,1062,1063],{},[188,1064,1067],{"href":1065,"rel":1066},"https:\u002F\u002Fblog.csdn.net\u002Fjimojianghu\u002Farticle\u002Fdetails\u002F129681460",[285],"使用jscpd统计项目中的代码重复度","\n前端江湖 (jimojianghu) · CSDN, March 2023",[305,1070,1071],{},[184,1072,1073],{},"以上可知，jscpd工具的使用是非常简单的，只需要少许配置就能输出比较直观的代码数据，方便我们统计代码的重复度。",[184,1075,1076],{},"A front-end team's walkthrough of jscpd 3.5.3, adopted to measure duplication before refactoring. It explains every field of the console summary (one file: 19 of 105 lines duplicated, 18.1%), gives a package.json jscpd config (threshold 1, html+console reporters, ignore, format, absolute) with the resulting threshold error, and shows an HTML report for src (149 files, 9 clones, 1.18%). It also covers scanning several projects from a parent folder and jscpd:ignore-start\u002Fend comments in JS, CSS and HTML, and notes that renamed identifiers are not detected.",[184,1078,1079,1086],{},[296,1080,1081],{},[188,1082,1085],{"href":1083,"rel":1084},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=1zvGUrvBmzs",[285],"🕵️‍♀️ Detecta código duplicado en JavaScript o TypeScript","\nLa Cueva Del Código · YouTube \u002F La Cueva Del Código, July 2023, video",[305,1088,1089],{},[184,1090,1091],{},"en este vídeo vamos a ver una librería indispensable que tienes que conocer se llama js cpd básicamente lo que hace esta librería es detectar código que está copiado y pegado",[184,1093,1094,1095,1098],{},"A 5-minute Spanish tutorial built entirely around jscpd 3.5.9. It walks through the config file (TS\u002FTSX formats, ignored directories, min lines and tokens, threshold, html and console reporters, exitCode) and runs a ",[314,1096,1097],{},"cpd"," script through make and Docker on a small API. After duplicating a createUser action, the tool reports one clone of 18 lines plus an HTML report, and the author says duplication is just one metric, not an absolute rule.",[184,1100,1101,1108],{},[296,1102,1103],{},[188,1104,1107],{"href":1105,"rel":1106},"https:\u002F\u002Felijahmanor.com\u002Fblog\u002Fjs-copypaste-detect",[285],"Detect and Refactor JavaScript Copy-Paste Code","\nElijah Manor · elijahmanor.com, February 2018",[305,1110,1111],{},[184,1112,1113],{},"However, as we stated earlier, one of the really cool things about jscpd is that it understands multiple computer languages.",[184,1115,1116,1117,1120],{},"A tutorial with an embedded 5-minute video on detecting copy-pasted code with two Node command-line tools. It first uses jsinspect to find duplication, which it then refactors. Next it runs ",[314,1118,1119],{},"npx jscpd -f \"src\u002F**\u002F*.js\" -e \"**\u002Flib\u002F**\" -t 30",", lowers the token threshold to 10 while excluding lib and test, and points jscpd at CSS files, where it finds duplication between App.css and CardFlip.css. The author calls jscpd's support for many languages the 'really cool' thing about it.",[184,1122,1123,1130],{},[296,1124,1125],{},[188,1126,1129],{"href":1127,"rel":1128},"https:\u002F\u002Farchive.ph\u002F20140312014032\u002Fhttp:\u002F\u002Fwww.moongift.jp\u002F2014\u002F03\u002Fjscpd-%E4%B8%8D%E5%85%B7%E5%90%88%E9%98%B2%E6%AD%A2%E3%81%AB%E3%80%82%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E9%87%8D%E8%A4%87%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%EF%BC%81\u002F",[285],"jscpd – 不具合防止に。コードの重複をチェック！","\nMOONGIFT (Atsushi Nakatsugawa) · MOONGIFT, March 2014",[305,1132,1133],{},[184,1134,1135],{},"DRYをなくしていくことでコードの可読性を高めたり、メンテナンスしやすくなります。そんなコードの改善を手助けしてくれるのがjscpdです。",[184,1137,1138],{},"A 2014 Japanese introduction to the early Node CLI of jscpd. It covers installing with npm install jscpd -g and running it with --path and --languages. On one project it found no clones; on a Ruby project it found 38 exact clones and 402 duplicated lines across 13 files (3.12% of 12,881 lines). It also lists the supported languages.",[289,1140,1142],{"id":1141},"adopted-by-teams-duplication-as-a-release-metric","Adopted by teams: duplication as a release metric",[184,1144,1145,1152],{},[296,1146,1147],{},[188,1148,1151],{"href":1149,"rel":1150},"https:\u002F\u002Fjuejin.cn\u002Fpost\u002F7215828320403095610",[285],"记一次前端项目优化，深度解读项目质量及性能常用手法","\nxxaq (快手数平前端团队 \u002F Kuaishou Data Platform Front-end Team) · Juejin, March 2023",[305,1154,1155],{},[184,1156,1157],{},"通过jscpd 检查代码重复率，基于视图分析出需要优化的代码，如下图可以看出文件中重复的代码",[184,1159,1160,1161,1164],{},"Kuaishou's data-platform front-end team describes cleaning up a 230K+ line Vue 3 + Vite app (page load 1.9s to 912ms, bundle 16.37M to 12.94M). jscpd is one of the steps: they install it globally, configure it in package.json (threshold 5, html\u002Fconsole\u002Fbadge reporters, ignore list, absolute, gitignore), run ",[314,1162,1163],{},"jscpd .\u002F -o \".\u002Freport\u002F\"",", and use the HTML report to find duplicated logic and merge it.",[184,1166,1167,1174],{},[296,1168,1169],{},[188,1170,1173],{"href":1171,"rel":1172},"https:\u002F\u002Fjuejin.cn\u002Fpost\u002F6912281018166673422",[285],"立完flag，你可能需要对flag进行量化","\nDevUI团队 (Kagol) · Juejin, December 2020",[305,1176,1177],{},[184,1178,1179],{},"我们可以用jscpd工具来统计前端代码的重复率：",[184,1181,1182,1183,1186],{},"Huawei DevUI team (Kagol) on quantifying quality goals as a front-end owner. Duplication rate is one of the metrics, measured with ",[314,1184,1185],{},"jscpd src",". The example run on html2canvas finds 14 clones at 1.71%, and a hypothetical drop to 1.16% is framed as a 32% quality improvement.",[184,1188,1189,1196],{},[296,1190,1191],{},[188,1192,1195],{"href":1193,"rel":1194},"https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F15421145212",[285],"【1.7 万字】破解代码质量密码：可维护性技术深度解析","\n转转技术团队 (Zhuanzhuan Tech Team) · Zhihu (知乎专栏), December 2024",[305,1198,1199],{},[184,1200,1201],{},"jscpd 是一款开源的代码重复检测工具，旨在帮助开发者识别代码库中的重复片段，减少冗余代码。",[184,1203,1204],{},"A 17,000-character piece by the Zhuanzhuan front-end team on code-maintainability metrics. It picks jscpd as the tool for its code-similarity and redundancy metrics, walks through how jscpd works (tokenizing, Rabin-Karp hashing, validators such as LinesLengthCloneValidator), compares it with JSInspect and PMD-CPD, and adopts jscpd's defaults (min-tokens 50, min-lines 5, max-lines 1000, threshold set per project) as its standard. Zhuanzhuan uses these metrics as a release gate: projects scoring under 90 are blocked.",[184,1206,1207,1214],{},[296,1208,1209],{},[188,1210,1213],{"href":1211,"rel":1212},"https:\u002F\u002Fwww.cnblogs.com\u002Fhello-alili\u002Fp\u002F13788084.html",[285],"持续集成 - 代码质量扫描","\nAlili丶前端大爆炸 · 博客园 (cnblogs), December 2019",[305,1216,1217],{},[184,1218,1219],{},"我们使用jscpd来分析项目的重复率.并且输出友好的报告.",[184,1221,1222,1223,1226,1227,1226,1230,1233],{},"A front-end developer adds a codereview stage to GitLab CI across nearly 300 company front-end projects. An in-house CLI runs SonarQube and then jscpd (",[314,1224,1225],{},"npm install jscpd -g",", ",[314,1228,1229],{},"jscpd -r html .\u002Fsrc\u002F",[314,1231,1232],{},"jscpd -r json .\u002Fsrc\u002F","), because Sonar's duplication report is hard to read. The HTML report is deployed to a static server and the link is pushed to the team chat.",[184,1235,1236,1243],{},[296,1237,1238],{},[188,1239,1242],{"href":1240,"rel":1241},"https:\u002F\u002Fspeakerdeck.com\u002Fgeekplus_tech\u002Ffull-typescript-application-with-ai-and-cdk",[285],"AI、CDK と協働する Full TypeScript アプリケーション開発 \u002F Full TypeScript Application with AI and CDK","\nYuta Imamura (今村 優太), Geekplus Software Division · Speaker Deck, July 2026, talk",[305,1245,1246],{},[184,1247,1248,1249,1253],{},"jscpd - 重複コードを検出する ",[188,1250,1251],{"href":1251,"rel":1252},"https:\u002F\u002Fjscpd.dev\u002F",[285]," コードをトークン化し Rabin-Karp 法により類似コードを検出",[184,1255,1256],{},"Slides from AWS CDK Conference Japan 2026 on keeping AI-agent-generated full-TypeScript code (React, NestJS, AWS CDK) maintainable. Slide 18, in the 'enforce style' section, uses jscpd with a target of 5% or less duplication across the codebase, next to knip, dependency-cruiser, react-doctor and Biome cognitive-complexity rules.",[184,1258,1259,1266],{},[296,1260,1261],{},[188,1262,1265],{"href":1263,"rel":1264},"https:\u002F\u002Fworkat.dnt-lab.com\u002Fdepartment\u002F2021-07-09-creating-reports-in-pull-requests\u002F",[285],"Создание отчётов в pull-requests","\nАнастасия Смирнова (Design and Test Lab) · Design and Test Lab, July 2021",[305,1268,1269],{},[184,1270,1271],{},"Для ее определения использовалась npm библиотека jscpd.",[184,1273,1274,1275,1226,1278,1281,1282,1285],{},"A Design and Test Lab engineering tutorial that adds a Bitbucket Pipelines step (",[314,1276,1277],{},"npm i -g jscpd",[314,1279,1280],{},"jscpd --format \"typescript\" .\u002Fsrc\u002Fapp --reporters markdown",") and saves ",[314,1283,1284],{},"report\u002Fjscpd-report.md"," as an artifact. A Python script and a curl call through the pipeline proxy then publish that duplication report as a Bitbucket Code Insights report on the pull request.",[184,1287,1288,1295],{},[296,1289,1290],{},[188,1291,1294],{"href":1292,"rel":1293},"https:\u002F\u002Fjuejin.cn\u002Fpost\u002F6844903485574479879",[285],"终端代码重复率检测实践","\n美团点评点餐 · Juejin, June 2017",[305,1297,1298],{},[184,1299,1300],{},"为了适应多种前端代码文件，本团队目前选择jscpd作为前端代码重复率检测工具。",[184,1302,1303],{},"The Meituan-Dianping food-ordering team compares jsinspect, jscpd and PMD-CPD, picks jscpd for front-end code (with PMD-CPD for iOS\u002FAndroid), and shows its .cpd.yaml (min-tokens 70, min-lines 5, XML reporter with an XSL template) plus a gulp-jscpd task with failOnError false so CI builds keep going. It closes with advice on tuning tokens and suggests 5% as a starting duplication threshold.",[184,1305,1306,1313],{},[296,1307,1308],{},[188,1309,1312],{"href":1310,"rel":1311},"https:\u002F\u002Fblog.sushi.money\u002Fentry\u002Fpepabohatena4",[285],"社内横断で開発効率を上げる取り組み #pepabohatena","\nhitode909 (Hatena) · hitode909の日記 (blog.sushi.money), June 2018, talk",[305,1315,1316],{},[184,1317,1318],{},"jscpdを使って重複率をチェック",[184,1320,1321],{},"Slides, published as a blog post, from the author's talk at Hatena\u002FPepabo Tech Conference #4 (DevOps). After finding a 6% copy-paste rate in one codebase, he built a Docker image (hitode909\u002Fccchkr) that runs jscpd in team Jenkins pipelines. It fails the build when duplication exceeds a set threshold (LIMIT=1) and updates the GitHub commit status. A Jenkinsfile snippet is included, and he admits other teams adopted it only lukewarmly.",[289,1323,1325],{"id":1324},"comparisons-and-known-limits-what-jscpd-catches-and-what-it-misses","Comparisons and known limits: what jscpd catches, and what it misses",[184,1327,1328,1335],{},[296,1329,1330],{},[188,1331,1334],{"href":1332,"rel":1333},"https:\u002F\u002Faarongoldenthal.com\u002Fposts\u002Fgitlab-code-quality-duplication-analysis-with-pmd-cpd\u002F",[285],"GitLab Code Quality Duplication Analysis With PMD CPD","\nAaron Goldenthal · aarongoldenthal.com, March 2024",[305,1337,1338],{},[184,1339,1340],{},"By design, jscpd only compares two sections of code, so for cases of 3 or more duplications they're reported in pairs.",[184,1342,1343],{},"Looks for a replacement for GitLab Code Quality's Code Climate duplication check and tests PMD CPD against jscpd on JavaScript and Go samples. He found both capable, but chose PMD CPD because jscpd reports 3+ copies as pairs, sometimes reports nested subset duplicates, and leaves out token counts (none in XML, always tokens: 0 in JSON). He then builds a gitlab-pmd-cpd container and report converter.",[184,1345,1346,1353],{},[296,1347,1348],{},[188,1349,1352],{"href":1350,"rel":1351},"https:\u002F\u002Ftim-schipper.nl\u002Fblog\u002Fcodekwaliteit-meten-ai-code",[285],"AI-codekwaliteit meten: het dashboard voorbij coverage en mutation testing","\nTim Schipper · tim-schipper.nl, July 2026",[305,1355,1356],{},[184,1357,1358],{},"Een schoon jscpd-rapport op een AI-zware codebase zegt meer over wat de tool niet ziet dan over of de code echt DRY is.",[184,1360,1361],{},"Blog post on measuring AI-written code beyond coverage and mutation testing: complexity, duplication and architecture. It groups jscpd with PMD CPD as Rabin-Karp token matchers that catch Type-1\u002F2 clones but miss the Type-3\u002F4 near-duplicates agents generate. It cites the AIDev study (18.69% duplicated lines for AI code vs 25.89% for human code) and warns that a suspiciously low duplication percentage deserves as much suspicion as a high one.",[184,1363,1364,1371],{},[296,1365,1366],{},[188,1367,1370],{"href":1368,"rel":1369},"https:\u002F\u002Fhabr.com\u002Fru\u002Farticles\u002F1039124\u002F",[285],"Защита от дублирования кода агентами: семантические концепции","\nИван Пилюгин (IT-Coach) · Habr, May 2026",[305,1373,1374],{},[184,1375,1376],{},"Так что если вы меряете AI‑дублирование одним jscpd и видите свои честные 3% — радоваться рано, потому что настоящая картина прячется в Type-4, и достать её можно только AST‑детектором, да ещё и с ручной перекрёстной проверкой сверху.",[184,1378,1379],{},"A solo founder building a SaaS with Claude Code agents measured duplication with a wrapper around jscpd (token-based, for Type-1\u002F2 clones) and similarity-ts (AST-based), scoring clusters by 'pain' (duplicated lines x git churn \u002F blast radius). jscpd missed four agent-written copies of the same S3 upload logic because they fell below its token threshold. His verdict: jscpd is a cheap deterministic CI gate but blind to Type-4 clones, so a green jscpd result on its own means little.",[184,1381,1382,1389],{},[296,1383,1384],{},[188,1385,1388],{"href":1386,"rel":1387},"https:\u002F\u002Fwww.intersoft.de\u002Fdoppelt-haelt-nicht-besser-code-duplikation-im-griff-behalten\u002F",[285],"Doppelt hält (nicht) besser – Code Duplikation im Griff behalten","\nRedaktion (intersoft) · intersoft AG blog, June 2023",[305,1391,1392],{},[184,1393,1394],{},"Jscpd findet doppelte Codeblöcke in der Codebasis. Dabei ist die Sprache relativ egal – 150 Programmiersprache bzw. Datenformate werden unterstützt.",[184,1396,1397],{},"An insurance-software company's blog post, written because the team copies calculation formulas on purpose and wants duplication statistics per module. It compares jscpd (\"One to Rule Them All\": npm CLI, the -l minimum-lines option, a statistics summary) with PMD CPD and a Python similarity script. The verdict is that jscpd's token-based Rabin-Karp matching also flags repeated import blocks, which CPD ignores, but CPD has no statistics summary like jscpd's.",[184,1399,1400,1407],{},[296,1401,1402],{},[188,1403,1406],{"href":1404,"rel":1405},"https:\u002F\u002Fqiita.com\u002Fmima_ita\u002Fitems\u002Ffe1b3443a363e5d90a21",[285],"僕にそのコピペを直せというのか(2021年4月版)","\nmima_ita · Qiita, July 2014",[305,1409,1410],{},[184,1411,1412],{},"jscpdはnode.jsで動作するコードクローンの検出ツールです。",[184,1414,1415],{},"A survey of copy-paste detectors (PMD-CPD, jscpd, Clonedigger, CCFinderX, plus Jenkins monitoring), first published 2014-07-29. The jscpd section was added 2021-04-30 and tested on v3.3.25. It covers install, building from source, the HTML reporter, the default skip limits (1000 lines\u002F100kb) and how to raise them with --max-size\u002F--max-lines, a patch for HTML reports that break when a clone contains , and the multi-file grouping limit from issue #221. It notes jscpd handles .vue files, which PMD-CPD can't.",[289,1417,1419],{"id":1418},"how-this-page-was-compiled","How this page was compiled",[184,1421,1422,1423,1425],{},"Candidates came from a repeated web sweep across developer platforms in eighteen languages — dev.to, Medium, Habr, Zenn, Qiita, Juejin, CSDN, LinkedIn, newsletters, YouTube and more — followed by two independent passes: one opened every candidate at its source to confirm jscpd is actually named and used, a second re-opened every accepted piece to catch a wrong date, a mistranslated quote or a misattributed claim. Passing mentions, syndicated copies, auto-generated catalog pages and academic works (see ",[188,1424,169],{"href":170},") were left out. Quotes are kept exactly as published, in their original language. The sweep verified far more articles than fit on one page — this is a curated subset, not the full list, so treat it as a starting point.",{"title":1427,"searchDepth":1428,"depth":1428,"links":1429},"",2,[1430,1431,1432,1433,1434,1435,1436],{"id":291,"depth":1428,"text":292},{"id":504,"depth":1428,"text":505},{"id":773,"depth":1428,"text":774},{"id":955,"depth":1428,"text":956},{"id":1141,"depth":1428,"text":1142},{"id":1324,"depth":1428,"text":1325},{"id":1418,"depth":1428,"text":1419},"Blog posts, tutorials, talks and case studies that use jscpd, verified at the source.","md",null,{},{"icon":177},{"title":1443,"description":1444},"jscpd in Articles — Tutorials, Case Studies and Talks","54 verified articles, talks and case studies that run jscpd on real codebases, wire it into CI or an AI agent loop, or compare it against other duplicate-code detectors.","ZQzgnhX7giwYOIp085aCHOS6-w0P7a4zrR4GT7MmeVE",[1447,1439],{"title":169,"path":170,"stem":171,"description":1448,"icon":172,"children":-1},"Peer-reviewed papers, theses, patents and books that use or cite jscpd, with how each one used it.",1789661694992]