Skip to main content

Why a CLI

A model reading a diff can’t know that the 30 lines it just read already exist three folders away. jscpd can: it scans the checkout and reports every clone with both locations. This agent runs it, keeps the clones the pull request introduced, and posts each one with jscpd’s own output as evidence. The example is a TypeScript billing service. Adjust paths and thresholds to your repository.

Step 1 — Create the agent

In Code review → What to review → Custom agents, click New agent → Templates → Blank. On its page, fill in Instructions:
Name
Instructions

Step 2 — Set the files

Under Files & knowledge:

Step 3 — Add the CLI

Under Tools → CLIs, click Add CLI: Usage:

Step 4 — Comments

Under Comments & model: Click Save.

Step 5 — Try it

Paste the link of a pull request that copies a function, and click Run agent. Check:
  • Tool calls shows the jscpd call and its output.
  • Each kept finding’s Comment ends with an Evidence block quoting the jscpd lines that name the file:
If Warnings says the CLI could not be installed, check the install command. CLIs need the E2B sandbox; without it the agent runs without jscpd. Turn the agent on when the findings are the ones you want.

Checklist

  • Install pinned to an exact version
  • Allowed prefix starts with a flag, not just the binary
  • Tests and generated code in Except and in the jscpd --ignore
  • Max comments per pull request set
  • Tried on a pull request with a known copy
For every field, see Skills, docs and tools.