jscpd

仓库创建 2013年5月29日最近提交 1 天前SkillHot 收录 5 小时前
▸ 精选理由

轻量可运行的跨语言重复代码检测,适合代码审查与质量门禁。

这个 Skill 做什么

检测源代码中的复制粘贴/重复片段并生成重复率报告。

检测代码库里的复制粘贴或重复片段,支持 200 多种语言,并给出重复率和重复片段报告。当你想量化代码克隆、找出重复最多的文件或评估重构收益时用它。能配合忽略规则和不同报告器运行,快速定位需要抽取或重构的重复代码块。

▸ 展开 SKILL.md 英文原文

Copy-paste detector for 220+ languages. Detect duplicated code and measure duplication percentages.

开发编程代码查重静态分析多语言通用
5.9k
Stars
252
Forks
2
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/kucherenko/jscpd/master/skills/jscpd/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/kucherenko/jscpd/master/skills/jscpd/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# jscpd

Copy-paste detector for programming source code, supports 150+ languages. Use this skill to run jscpd and understand its output.

## Quick Start

```bash
# Run with ai reporter (compact output optimized for agents)
npx jscpd --reporters ai <path>

# With ignore patterns
npx jscpd --reporters ai --ignore "**/node_modules/**,**/dist/**" <path>

# Scope to specific formats
npx jscpd --reporters ai --format "javascript,typescript" <path>
```

## AI Reporter Output Format

The `ai` reporter produces compact, token-efficient output designed for agent consumption:

```
Clones:
src/ foo.ts:10-25 ~ bar.ts:42-57
src/utils/helpers.ts:100-120 ~ src/utils/other.ts:5-25
---
3 clones · 4.2% duplic
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有