Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)75k · #2826

duplicate-js

Skill này làm gì

Skill này kiểm tra website có thư viện JavaScript trùng lặp hay không, chẳng hạn hai phiên bản của cùng một công cụ. Skill dành cho lập trình viên muốn trang nhanh hơn và ổn định hơn.

Khi nào nên dùng

  • ✓Khi một trang tải cùng một thư viện hai lần.
  • ✓Khi kết quả kiểm tra bundle cho thấy các thư viện lớn bị lặp lại trên nhiều trang.
  • ✓Khi script bên thứ ba mang theo bản sao riêng của code phổ biến.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/duplicate-js/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/duplicate-js/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể kiểm tra xem website của tôi có tải cùng một thư viện JavaScript nhiều hơn một lần không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tìm nhiều phiên bản hoặc bản sao của cùng một thư viện trong code đã tải. Nó gợi ý gộp về một phiên bản duy nhất.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Remove duplicate JavaScript libraries

Duplicate libraries increase bundle size and memory usage, and can lead to unexpected behavior or conflicts between different versions of the same code.

Quick Reference

  • Detect and remove multiple versions of the same library
  • Use a single version across the entire application
  • Audit third-party scripts for bundled dependencies

Check

Identify duplicate JavaScript libraries or multiple versions of the same library being loaded using Lighthouse or bundle analysis tools.

Fix

Consolidate dependencies to use a single version and ensure third-party scripts don't bring in redundant libraries.

Explain

Explain the risks of loading duplicate JavaScript libraries and how it impacts performance and stability.

Code Review

Review the routes, assets, and loading behavior that affect Remove duplicate JavaScript libraries. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/duplicate-js

Câu hỏi thường gặp

Vì sao thư viện trùng lặp là vấn đề?

Chúng làm tăng dung lượng tải về và tốn bộ nhớ, và các phiên bản khác nhau có thể xung đột.

Làm sao tìm ra chúng?

Skill gợi ý Lighthouse hoặc các công cụ phân tích bundle.

Có bao gồm script bên thứ ba không?

Có. Skill nói nên kiểm tra để script bên thứ ba không mang thêm bản sao.

Chi tiết

Mô tả gốc của tác giả

Use when auditing slow page loads, heavy assets, or rendering delays related to Remove duplicate JavaScript libraries. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2826
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự