jscpd

jscpd is a skill for Claude Code, Codex from vahidkaargar/it-department-skills. It costs 22 tokens per session (803 once invoked), scanned A, original, MIT.

A copy-paste detector for source code in more than 150 programming languages. It reports matching code sections and the percentage of duplicated code.

In plain words
What is it for?
Scanning files or directories with jscpd, limiting checks to selected languages, ignoring paths such as dependencies or build output, and producing agent-friendly reports.
Why use it?
It reveals repeated code that can make maintenance harder and shows how much of a codebase is duplicated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Scanning files or directories with jscpd, limiting checks to selected languages, ignoring paths such as dependencies or build output, and producing agent-friendly reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vahidkaargar/it-department-skills/jscpd
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vahidkaargar/it-department-skills --skill jscpd
Clone the repo
git clone --depth 1 https://github.com/vahidkaargar/it-department-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jscpd

README.md
[![agentmods](https://agentmods.dev/badge/skills/vahidkaargar/it-department-skills/jscpd/github.svg)](https://agentmods.dev/skills/vahidkaargar/it-department-skills/jscpd)
Your own site
<a href="https://agentmods.dev/skills/vahidkaargar/it-department-skills/jscpd"><img src="https://agentmods.dev/badge/skills/vahidkaargar/it-department-skills/jscpd/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jscpd

Your own site · 80×15
<a href="https://agentmods.dev/skills/vahidkaargar/it-department-skills/jscpd"><img src="https://agentmods.dev/badge/skills/vahidkaargar/it-department-skills/jscpd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00803
Opus 5 $0.00011 $0.00402
Sonnet 5 $0.00004 $0.00161
Haiku 4.5 $0.00002 $0.00080

Measured 12d ago against content hash ac00da7db8c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

jscpd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/jscpd/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

jscpd

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

Quick Start

# 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% duplication

Each line represents one clone pair:

  • Same file: path/file.ts 10-25 ~ 45-60 (shared path shown once)
  • Same directory: shared/prefix/ file-a.ts:10-25 ~ file-b.ts:42-57 (common prefix factored out)
  • Different paths: path/a.ts:10-25 ~ path/b.ts:42-57

Options

Option Description
--reporters ai Use the AI-optimized reporter (compact clone list for agents)
--reporters html Generate HTML report
--reporters json Output JSON report
--min-tokens N Minimum tokens to consider a duplication (default: 50)
--min-lines N Minimum lines to consider a duplication (default: 5)
--min-similarity N Minimum similarity percentage (default: 100, range: 1-100)
--threshold N Exit with error if duplication % exceeds N
--ignore "glob" Ignore patterns (comma-separated)
--format "list" Limit to specific languages (e.g. typescript,javascript)
--pattern "glob" Glob pattern to select files
--gitignore Respect .gitignore
--output "path" Directory to write reports to
--silent Suppress output (useful with --output only)
--list-output Print clone list to stdout (alternative to ai reporter)
--store-path "path" Directory for LevelDB cache
--no-tips Disable tips in output (enabled by default in CI)
--config "path" Path to .jscpd.json config file

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 86 lines · 22 tokens per session scan A ac00da7db8c1

Subscribe to this mod's changes

jscpd is a skill published in the GitHub repository vahidkaargar/it-department-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 803 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

code-review-and-quality

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.

addyosmani/agent-skills · 51 tokens

doubt-driven-development

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high…

addyosmani/agent-skills · 96 tokens

code-simplification

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

addyosmani/agent-skills · 51 tokens

chinese-code-review

A Chinese-language code-review communication guide with templates and severity levels for review comments.

jnMetaCode/superpowers-zh · 62 tokens

receiving-code-review

A guide for handling code-review feedback carefully. Code review is the process of checking proposed changes before they are accepted into a project.

jnMetaCode/superpowers-zh · 50 tokens

requesting-code-review

A code-review procedure for checking completed work against its requirements before it spreads or is merged. A code reviewer is a person or agent who looks for defects and missing parts.

jnMetaCode/superpowers-zh · 24 tokens