Agent skill

Fix Jscpd

by hardisgroupcom in hardisgroupcom/sfdx-hardis

Decision framework for fixing jscpd (copy-paste detector) errors.

AGPL-3.0Auto-check passedDevelopment

Install Fix Jscpd

skills CLI
$ npx skills add hardisgroupcom/sfdx-hardis --skill fix-jscpd -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hardisgroupcom/sfdx-hardis fix-jscpd --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hardisgroupcom/sfdx-hardis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/fix-jscpd .claude/skills/fix-jscpd && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fix-jscpd
GitHub stars
400
Token cost
~613 tokens
SKILL.md length
240 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Decision framework for fixing jscpd (copy-paste detector) errors.

  • Asked to fix jscpd issues
  • SKILL.md covers Decision Criteria, Ignore Comment Placement, Factorization Pattern and Standard Flag Boilerplate
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Copy-paste errors

What it does

Fix Jscpd is an agent skill from hardisgroupcom/sfdx-hardis. Decision framework for fixing jscpd (copy-paste detector) errors. Use when asked to fix jscpd issues, copy-paste errors, clones or COPYPASTE lint failures.

Its SKILL.md is about 610 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: French-army-knife Toolbox for Salesforce. Orchestrates base commands and assist users with interactive wizards to make much more than native Salesforce CLI + Allows you to define…. The licence is AGPL-3.0.

When your agent uses it

  • Asked to fix jscpd issues
  • Copy-paste errors
  • COPYPASTE lint failures

Example prompts

  • “/fix-jscpd”

What it can do on your machine

Read from SKILL.md and the folder at commit 971ac89. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fix Jscpd loads about 613 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 240 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~613

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hardisgroupcom/sfdx-hardis at commit 971ac89, republished under its AGPL-3.0 licence (© hardisgroupcom). 240 words, ~613 tokens.

Download SKILL.mdSave it as .claude/skills/fix-jscpd/SKILL.md (or your agent's skills folder).
name
fix-jscpd
description
Decision framework for fixing jscpd (copy-paste detector) errors. Use when asked to fix jscpd issues, copy-paste errors, clones or COPYPASTE lint failures.
user-invocable
false

Fixing jscpd / Copy-Paste Issues

When jscpd reports a clone, decide between factorization and ignore comments based on these criteria.

Decision Criteria

Factorize when
  • The duplicate logic is semantically identical and would not diverge (same intent, same data shape).
  • Extracting it produces a clean, named helper with a clear single responsibility.
  • The helper is small (under ~15 lines) and self-contained.
  • The duplication is within the same file or a closely related module.

Examples in this project: buildPersonaCols(n) in profiles-extract.ts, formatLimitLine(limit) in limits.ts.

Ignore with /* jscpd:ignore-start */ / /* jscpd:ignore-end */ when
  • The clones are in separate, unrelated command files (each command is a standalone unit).
  • The structure is the same but the data shapes or intent diverge (e.g., different result fields in different audit commands).
  • The duplication is unavoidable boilerplate (standard flags: agent, debug, websocket, skipauth).
  • Extracting would add indirection with no real benefit (e.g., buildInitialMarkdownLines in different DocBuilder subclasses).

Ignore Comment Placement

Place /* jscpd:ignore-start */ on the line before the first duplicate line, and /* jscpd:ignore-end */ on the line after the last duplicate line. Keep the comments on their own lines, indented to match the surrounding code.

typescript
/* jscpd:ignore-start */
for (const catcher of catchers) {
  const results = await catchMatches(catcher, file, fileText, this);
  this.matchResults.push(...results);
}
/* jscpd:ignore-end */

Factorization Pattern

Add a private (or private static) helper method to the enclosing class, or a module-level function if the logic is pure and stateless.

typescript
private static formatLimitLine(limit: any): string {
  return `• ${limit.name}: *${limit.percentUsed}%* used (${limit.used}/${limit.max})`;
}

Then replace the duplicate .map(...) blocks with .map(MyClass.formatLimitLine).

Standard Flag Boilerplate

The agent, debug, websocket, and skipauth flags appear in every command. These are always intentional duplicates - wrap them with jscpd:ignore rather than abstracting.

© hardisgroupcom, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/fix-jscpd of hardisgroupcom/sfdx-hardis.

Open the folder on GitHubat commit 971ac89

Compare with similar skills

Fix Jscpd next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fix Jscpd compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix Jscpd this skillhardisgroupcom/sfdx-hardis400—~613Automated safety check: PassAGPL-3.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Mole CLI Release Flowtw93/Mole69k—~2.5kAutomated safety check: PassGPL-3.0
Babysit PR To Pass CIsgl-project/sglang37k2 repos~3kAutomated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Runbook for assessing and executing a Mole CLI release: distribution channels, pre-flight checks, capital-V tags, build artifacts and the handoff to curated release notes.

    69k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Babysit PR To Pass CI

    sgl-project/sglang

    Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.

    37k GitHub starsUsed in 2 repos~3k tokens
    DevelopmentAuto-check passed
  • Load Ansible project development guidelines, testing conventions, PR review processes, and code structure reference into context

    71k GitHub stars~427 tokensUpdated today
    DevelopmentAuto-check passed

More from hardisgroupcom/sfdx-hardis

All 21 skills in this repo
  • Promotion Branches E2E Test

    hardisgroupcom/sfdx-hardis

    Runs a full end-to-end test of sfdx-hardis promotion branches and backpromote against real Salesforce orgs and a throwaway repository, then writes a report.

    400 GitHub stars~4.7k tokensUpdated today
    Auto-check: notes
  • sfdx-hardis Training End-to-End Test

    hardisgroupcom/sfdx-hardis

    Walks the sfdx-hardis training course end to end as a learner would, against a real Developer Edition org and fork, fixing broken steps and screenshots that no longer match.

    400 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • sfdx-hardis Architecture Guide

    hardisgroupcom/sfdx-hardis

    Explains how the sfdx-hardis Salesforce CLI plugin is built: its TypeScript and Oclif stack, command layout, agent-mode flag and provider classes for git, notifications and AI.

    400 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Changelog Style Rules

    hardisgroupcom/sfdx-hardis

    Style rules for adding CHANGELOG.md entries: short, user-facing bullets grouped by command under the beta section, each linking the command's docs page.

    400 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Documentation

    hardisgroupcom/sfdx-hardis

    Documentation standards for sfdx-hardis commands (description format with Command Behavior and Technical explanations sections, MkDocs site, build:doc).

    400 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • I18n Usage

    hardisgroupcom/sfdx-hardis

    Code examples and patterns for using i18n translations in sfdx-hardis source code (uxLog, uxLogTable, prompts, markers).

    400 GitHub stars~479 tokensUpdated today
    Auto-check passed

Questions about Fix Jscpd

What does Fix Jscpd do?

Decision framework for fixing jscpd (copy-paste detector) errors. Fix Jscpd is an agent skill from hardisgroupcom/sfdx-hardis. Decision framework for fixing jscpd (copy-paste detector) errors.

When should I use Fix Jscpd?

Fix Jscpd fits situations like: asked to fix jscpd issues; copy-paste errors; COPYPASTE lint failures.

How do I install Fix Jscpd in Claude Code?

Run `npx skills add hardisgroupcom/sfdx-hardis --skill fix-jscpd -a claude-code`. Or copy the skill folder (.claude/skills/fix-jscpd in hardisgroupcom/sfdx-hardis) into .claude/skills/fix-jscpd in your project. Claude Code loads it when a task matches its description.

How do I install Fix Jscpd in Codex?

Run `npx skills add hardisgroupcom/sfdx-hardis --skill fix-jscpd -a codex`. Or copy the skill folder (.claude/skills/fix-jscpd in hardisgroupcom/sfdx-hardis) into .agents/skills/fix-jscpd in your project. Codex loads it when a task matches its description.

Can I use Fix Jscpd in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hardisgroupcom/sfdx-hardis --skill fix-jscpd -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-jscpd, .gemini/skills/fix-jscpd, .github/skills/fix-jscpd and .opencode/skills/fix-jscpd in your project.

What does Fix Jscpd need to run?

SKILL.md names no scripts, command-line tools or credentials: Fix Jscpd is instructions for the agent only.

Does Fix Jscpd access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fix Jscpd safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fix Jscpd use?

Fix Jscpd is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fix Jscpd use?

About 613 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fix Jscpd?

Skills that share tags, products or a category with Fix Jscpd: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Simple English (moeru-ai/airi, 50k stars) and Mole CLI Release Flow (tw93/Mole, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix Jscpd?

hardisgroupcom (a GitHub organization) maintains it in hardisgroupcom/sfdx-hardis, which has 400 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 7, 2026.

Source: hardisgroupcom/sfdx-hardis on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.