# Compare Codebases

Compare two folders function by function with jscpd --compare, in the same language or...

- Repository: https://github.com/kucherenko/jscpd (6480 stars)
- Category: Mobile
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kucherenko/jscpd --skill compare-codebases -g -a claude-code -y`
Codex: `npx skills add kucherenko/jscpd --skill compare-codebases -g -a codex -y`
Cursor: `npx skills add kucherenko/jscpd --skill compare-codebases -g -a cursor -y`
Gemini CLI: `npx skills add kucherenko/jscpd --skill compare-codebases -g -a gemini-cli -y`

## Description

Compare two folders function by function with jscpd --compare, in the same language or across languages, and explain the result. Use when asked how two codebases relate, which functions one implementation has and the other lacks, how far a port has come, whether the iOS and Android versions of an app match, or which function in one folder corresponds to a function in the other.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# compare-codebases

`jscpd --compare A B` pairs every function of folder `A` with the function of folder `B` that does the same job, and lists the functions of each folder that have no counterpart. The two folders may be in one language or in two (Python and TypeScript, Kotlin and Swift, Java and Rust). This skill explains how the comparison works and how to run one well. For porting code with the comparison as the progress measure, use the [code-migration](../code-migration/SKILL.md) skill; for the rest of jscpd, the [jscpd](../jscpd/SKILL.md) skill.

## How the comparison works

jscpd finds the functions of JavaScript, TypeScript, JSX, TSX, Vue, Svelte, Astro, Python, Rust, Go, Java, Kotlin, C#, C, C++, PHP, Ruby, Scala and Swift files in both folders. It turns the code of each function into a vector with a code embedding model that runs inside jscpd (CodeRankEmbed by default), so two functions that do the same job point the same way even when their languages, names and structure differ. Functions of one folder are never compared with each other.

Functions pair in two steps:

The rest: https://github.com/kucherenko/jscpd/blob/HEAD/skills/compare-codebases/SKILL.md
