Guide · Agent skill
How to use the Duplicate JavaScript Auditor agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The duplicate-js skill is a checklist-style guide that tells an AI agent how to review a website for the same JavaScript library being loaded more than once, or in several versions. It is aimed at front-end developers, teams reviewing third-party scripts, and anyone preparing a performance audit. After reading this guide you will know what the skill does, how to install it, how to ask for it in plain language, and what to check before accepting any changes it suggests.
Quick start
- 1Download the ZIP. Get the duplicate-js ZIP from the skill's page on the directory.
- 2Unzip the skill folder. Confirm the folder contains SKILL.md and references/rule.md.
- 3Place it where the agent can find it. Use ~/.claude/skills/ for a personal install, or .claude/skills/ in a project. Alternatively, upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 4Gather evidence. Run Lighthouse or DevTools on the slow page so you have a measured baseline.
- 5Ask for the audit. Describe the page or code and the symptom, and ask the agent to confirm duplicates before recommending changes.
- 6Review the findings. Check each reported duplicate against your own measurements and the exact files it names.
- 7Test before changing. Consolidate to one version only after testing that the page still behaves correctly.
What is an agent skill, and what does duplicate-js make the agent do?
An agent skill is a folder of instructions that an AI agent loads when a request matches the skill's description. The skill's main file, SKILL.md, tells the agent when to use it and how to approach the task.
The duplicate-js skill is based on the Remove duplicate JavaScript libraries rule from the Front-End Checklist project. It guides the agent to look for cases where the same library is loaded more than once, or in multiple versions, since this adds page weight and can lead to unexpected behaviour or conflicts between versions.
- Detect and remove multiple versions of the same library
- Use a single version across the entire application
- Audit third-party scripts for bundled dependencies
Install the duplicate-js skill
Download the ZIP for the skill from the directory page and unzip it. The skill folder should contain SKILL.md and references/rule.md.
For a personal install, unzip it into ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.
Alternatively, upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Ask for the audit in plain language
You do not need a special command. The agent uses the skill when your request matches its description, which is about auditing slow page loads, heavy assets, or rendering delays related to duplicate JavaScript libraries.
Good requests name the site or code and the symptom, for example asking the agent to check whether a page loads jQuery or Lodash twice. Ask it to confirm the problem with Lighthouse, DevTools or bundle analysis before recommending changes.
- Check whether this page loads more than one version of jQuery and where each copy comes from.
- Review our third-party scripts for bundled copies of common libraries before our performance audit.
- Our page feels heavy. Confirm any duplicate libraries in DevTools or Lighthouse before suggesting fixes.
What the agent checks and how it reports
The skill's Check step is to identify duplicate libraries or multiple versions being loaded, using Lighthouse or bundle analysis tools. The Fix step is to consolidate dependencies to a single version and make sure third-party scripts do not bring in redundant copies.
The Explain step asks the agent to describe the risks and the impact on performance and stability. The Code Review guidance asks for exact files, requests or rendering steps that add unnecessary cost, and a description of how the issue was measured.
Command-line checks the reference material mentions
The reference file references/rule.md lists package-manager commands for finding multiple versions of a dependency in a project, and a browser console check for multiple global variables. Run these yourself to confirm what the agent reports.
The overrides example in the same file shows a package.json setting that can force one version of a sub-dependency. Treat it as an option to test, not a default, because versions can differ in behaviour.
# For npm
npm ls lodash
# For pnpm
pnpm why lodashSafety notes: scripts and network
According to the skill's listing, it does not run scripts and does not use the network. It requires nothing beyond the agent itself. The skill is guidance; it does not run tests on your site by itself.
Recommended consolidation can break behaviour if library versions differ, so test any change before shipping it. Do not let the agent apply dependency changes without review.
- Runs scripts: no
- Uses network: no
- Requires: nothing listed
Tips for better results
Give the agent measurements. Lighthouse reports, DevTools network logs or field data make its recommendations more specific than a general request.
Ask it to name exact files and requests, and to describe how each finding was confirmed. Keep changes small and test each one.
- Include the page URL or code path under review
- Share a Lighthouse or DevTools export if you have one
- Test consolidated versions before deploying
What people use it for
- Finding two copies of jQuery loaded by a site and its third-party widgets
- Reviewing a Lodash dependency that appears in several versions through npm ls or pnpm why
- Preparing a structured checklist for a performance audit of a front-end project
- Checking third-party scripts for bundled dependencies that duplicate libraries already on the page
Frequently asked questions
How do I install the duplicate-js skill?
Download the ZIP from the skill's page and unzip it into ~/.claude/skills/ for a personal install, or into .claude/skills/ inside a project. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
Does duplicate-js need any requirements?
The listing states that it requires nothing, does not run scripts, and does not use the network. You still need a site or codebase to review and tools such as Lighthouse or DevTools to confirm findings.
Is duplicate-js free to use?
The skill is released under the MIT licence, as listed on the directory page. Check the licence file in the source repository for the full terms.
Does the skill run tests on my website automatically?
No. It is a checklist-style guide that tells the agent how to review a site and confirm problems with tools like Lighthouse or DevTools. It does not run those tests by itself.
Is it safe to let the agent apply the consolidation changes?
Review changes first. The skill recommends consolidating dependencies, which can break behaviour if versions differ, so test each change before shipping it.
How is this different from just running Lighthouse or npm ls?
Those tools report what is loaded. The skill guides the agent to confirm the problem, explain its performance impact, and describe how to consolidate to one version, following a structured checklist.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use duplicate-js if you are a front-end developer or team who wants a structured, agent-guided checklist for finding duplicate JavaScript libraries during a performance audit. Pick something else if your project has no browser front-end, or if you want an automated tool that runs tests and applies fixes without review.
Download the skill