Skills2026年5月14日·1 分钟阅读

jscpd — Copy/Paste Detector + MCP Server

A copy/paste (duplicate code) detector supporting 223 formats, with CLI and server modes; verified 5631★, pushed 2026-05-14.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Npm
信任
信任等级:Established
入口
jscpd
通用 CLI 安装命令
npx tokrepo install 05e96397-da0a-5479-8c67-c801d6fb97f5
介绍

jscpd 是重复代码(copy/paste)检测器:支持 223 种格式,提供 CLI/服务端模式,适合在 CI 中做自动化质量门禁并输出报告;已验证 5631★,更新于 2026-05-14。

Best for: 想把重复代码检测接入 CI、单仓多包或 agent 重构流程的团队

Works with: Node.js;可按 README 以 CLI 或 server 方式运行

Setup time: 5-10 minutes

Key facts (verified)

  • GitHub:5631 stars · 233 forks;最近更新 2026-05-14。
  • 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。
  • README 中可对照的入口:jscpd

Main

  • 把 jscpd 当回归门禁:在 CI 里跑,避免快速迭代时 copy/paste 复制扩散。

  • 为 agent 重构调阈值:设置 token 阈值,抓住真正重复而不是常见样板代码。

  • 需要跨仓库反复查询或出报表时用 server 模式,避免重复启动开销。

  • 把“支持格式”当范围旋钮:先覆盖主语言,清干净后再逐步扩大扫描面。

README (excerpt)

jscpd

stand with Ukraine

npm jscpd license npm

jscpd CI codecov FOSSA Status Backers on Open Collective Sponsors on Open Collective

NPM

Copy/paste detector for programming source code, supports 223 formats. AI-ready with MCP server and token-efficient reporter.

Copy/paste is a common technical debt on a lot of projects. The jscpd gives the ability to find duplicated blocks implemented on more than 223 programming languages and digital formats of documents. The jscpd tool implements Rabin-Karp algorithm for searching duplications.

Packages of jscpd

name version description
jscpd npm main package for jscpd (cli and API for detections included)
jscpd-server npm jscpd server application

Source-backed notes

  • README 写明支持 223 种格式,并提供 CLI 与 server 安装方式(npm install -g jscpd / jscpd-server)。
  • 仓库为 MIT 许可且维护活跃(已通过 GitHub API 复核)。
  • README 也给出贡献者构建路径(例如 pnpm install)。

FAQ

  • 只能测 JavaScript 吗?:不是:README 写明支持 223 种格式,可按你的语言栈配置扫描。
  • CLI 怎么安装?:按 README:npm install -g jscpd
  • 可以当服务跑吗?:可以:README 提到 server 模式(jscpd-server)。
🙏

来源与感谢

Created by kucherenko. Licensed under MIT.

kucherenko/jscpd — ⭐ 5631

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产