Token导航 LogoToken导航

Agent Skill · 开发

jquery-4(jquery 4 命令行)

jquery-4 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

jquery-4 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 5,746。

总安装 5,802周安装 237GitHub Stars 750下载 1,877核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:jquery-4(jquery 4 命令行)
来源仓库:https://github.com/jezweb/claude-skills
仓库路径:skills/jquery-4
安装命令:
npx skills add https://github.com/jezweb/claude-skills --skill jquery-4
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jezweb/claude-skills --skill jquery-4

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

提供 jQuery 4.x 版本的命令行调用支持。可用于脚本化执行 DOM 操作或事件绑定示例。需注意浏览器兼容性及废弃 API 的替代方案。建议在隔离环境中测试后再应用于生产代码。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

jquery-4 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/jquery-4

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jezweb/claude-skills --skill jquery-4;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

jquery-4 怎么安装?

在终端执行 npx skills add https://github.com/jezweb/claude-skills --skill jquery-4。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

jquery-4 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

jquery-4 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

jquery-4 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

jquery-4 用的人多吗?

公开数据是累计安装 5,802 次,近一周安装 237 次,下载 1,877 次,GitHub 750 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

jquery-4 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
jquery-4

jquery 4 命令行 · 本页

5,802750需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

jQuery 4.0 Migration

Status: Production Ready Last Updated: 2026-01-25 Dependencies: None Latest Versions: jquery@4.0.0, jquery-migrate@4.0.2


Quick Start (5 Minutes)

1. Add jQuery Migrate Plugin for Safe Testing

Before upgrading, add the migrate plugin to identify compatibility issues:

<!-- Development: Shows console warnings for deprecated features -->
<script src="https://code.jquery.com/jquery-4.0.0.js"></script>
<script src="https://code.jquery.com/jquery-migrate-4.0.2.js"></script>

Why this matters:

  • Logs specific warnings when deprecated/removed features execute
  • Identifies code that needs updating before it breaks
  • Provides backward compatibility shims during transition

2. Install via npm (if using build tools)

npm install jquery@4.0.0
# Or with migrate plugin for testing
npm install jquery@4.0.0 jquery-migrate@4.0.2

3. Check for Breaking Changes

Run your application and check console for migrate plugin warnings. Each warning indicates code that needs updating.


Breaking Changes Reference

Removed jQuery Utility Functions

These functions were deprecated and are now removed. Use native JavaScript equivalents:

RemovedNative Replacement
$.isArray(arr)Array.isArray(arr)
$.parseJSON(str)JSON.parse(str)
$.trim(str)str.trim() or String.prototype.trim.call(str)
$.now()Date.now()
$.type(obj)typeof obj + Array.isArray() + instanceof
$.isNumeric(val)!isNaN(parseFloat(val)) && isFinite(val)
$.isFunction(fn)typeof fn === 'function'
$.isWindow(obj)obj!= null && obj === obj.window
$.camelCase(str)Custom function (see below)
$.nodeName(el, name)el.nodeName.toLowerCase() === name.toLowerCase()

camelCase replacement:

// Native replacement for $.camelCase
function camelCase(str) {
  return str.replace(/-([a-z])/g, (match, letter) => letter.toUpperCase());
}

Removed Prototype Methods

Three internal array methods removed from jQuery objects:

// OLD - No longer works in jQuery 4.0
$elems.push(elem);
$elems.sort(compareFn);
$elems.splice(index, count);

// NEW - Use array methods with call/apply
[].push.call($elems, elem);
[].sort.call($elems, compareFn);
[].splice.call($elems, index, count);

// Or convert to array first
const arr = $.makeArray($elems);
arr.push(elem);

Focus/Blur Event Order Changed

jQuery 4.0 follows the W3C specification for focus event order:

// jQuery 3.x order (non-standard):
// focusout → blur → focusin → focus

// jQuery 4.0 order (W3C standard):
// blur → focusout → focus → focusin

Impact: If your code depends on specific event ordering, test thoroughly.

// Example: code that may need adjustment
$input.on('blur focusout focus focusin', function(e) {
  console.log(e.type); // Order changed in 4.0
});

Removed from Slim Build

The slim build (jquery-4.0.0.slim.min.js) no longer includes:

  • Deferreds and Callbacks (use native Promises instead)
  • AJAX functionality
  • Animation effects
// If using slim build, replace Deferreds with Promises
// OLD - Deferred
const deferred = $.Deferred();
deferred.resolve(value);
deferred.promise();

// NEW - Native Promise
const promise = new Promise((resolve, reject) => {
  resolve(value);
});

toggleClass Changes

The toggleClass(boolean) and toggleClass(undefined) signatures are removed:

// OLD - No longer works
$elem.toggleClass(true);   // Added all classes
$elem.toggleClass(false);  // Removed all classes

// NEW - Be explicit
$elem.addClass('class1 class2');    // Add classes
$elem.removeClass('class1 class2'); // Remove classes

// Or use toggleClass with class names
$elem.toggleClass('active', true);  // Force add
$elem.toggleClass('active', false); // Force remove

AJAX Script Execution

Scripts fetched via AJAX no longer auto-execute unless dataType is specified:

// OLD - Scripts auto-executed
$.get('script.js');

// NEW - Must specify dataType for auto-execution
$.get({
  url: 'script.js',
  dataType: 'script'
});

// Or use $.getScript (still works)
$.getScript('script.js');

Removed CSS Properties

RemovedNotes
$.cssNumberRemoved - define locally if needed
$.cssPropsNo longer needed - vendor prefixes obsolete
$.fx.intervalRemoved - requestAnimationFrame handles this

WordPress-Specific Migration

1. Check WordPress jQuery Version

# Check current jQuery version in WordPress
wp eval "echo wp_scripts()->registered['jquery-core']->ver;"

2. WordPress jQuery Migration Path

WordPress themes/plugins should:

// Dequeue old jQuery and enqueue 4.0 (testing only)
function upgrade_jquery_for_testing() {
  if (!is_admin()) {
    wp_deregister_script('jquery-core');
    wp_deregister_script('jquery');

    wp_register_script('jquery-core',
      'https://code.jquery.com/jquery-4.0.0.min.js',
      array(), '4.0.0', true);

    wp_register_script('jquery', false, array('jquery-core'), '4.0.0', true);

    // Add migrate plugin for debugging
    wp_enqueue_script('jquery-migrate',
      'https://code.jquery.com/jquery-migrate-4.0.2.min.js',
      array('jquery'), '4.0.2', true);
  }
}
add_action('wp_enqueue_scripts', 'upgrade_jquery_for_testing', 1);

3. Common WordPress Plugin Issues

Many WordPress plugins use removed jQuery methods:

// Common pattern in older plugins - BROKEN in 4.0
if ($.isArray(data)) { ... }
var json = $.parseJSON(response);
var cleaned = $.trim(userInput);

// Fix: Update to native methods
if (Array.isArray(data)) { ... }
var json = JSON.parse(response);
var cleaned = userInput.trim();

Migration Patterns

Pattern 1: Type Checking Migration

// OLD jQuery type checking
if ($.type(value) === 'array') { ... }
if ($.type(value) === 'function') { ... }
if ($.type(value) === 'object') { ... }
if ($.type(value) === 'string') { ... }
if ($.type(value) === 'number') { ... }

// NEW Native type checking
if (Array.isArray(value)) { ... }
if (typeof value === 'function') { ... }
if (value !== null && typeof value === 'object' && !Array.isArray(value)) { ... }
if (typeof value === 'string') { ... }
if (typeof value === 'number') { ... }

Pattern 2: Utility Function Polyfills

If you need quick compatibility without changing all code:

// Polyfill removed methods (temporary migration aid)
if (typeof $.isArray === 'undefined') {
  $.isArray = Array.isArray;
}
if (typeof $.parseJSON === 'undefined') {
  $.parseJSON = JSON.parse;
}
if (typeof $.trim === 'undefined') {
  $.trim = function(str) {
    return str == null ? '' : String.prototype.trim.call(str);
  };
}
if (typeof $.now === 'undefined') {
  $.now = Date.now;
}
if (typeof $.isFunction === 'undefined') {
  $.isFunction = function(fn) {
    return typeof fn === 'function';
  };
}
if (typeof $.isNumeric === 'undefined') {
  $.isNumeric = function(val) {
    return !isNaN(parseFloat(val)) && isFinite(val);
  };
}

CRITICAL: This is a temporary measure. Update your code to use native methods.

Pattern 3: ES Modules Import

jQuery 4.0 supports ES modules:

// ES Module import (new in 4.0)
import $ from 'jquery';

// Or with named export
import { $ } from 'jquery';

// In package.json, ensure module resolution
{
  "type": "module"
}

Pattern 4: Trusted Types Compliance

For CSP with Trusted Types:

// jQuery 4.0 accepts TrustedHTML in DOM manipulation
import DOMPurify from 'dompurify';

// Create trusted HTML
const clean = DOMPurify.sanitize(untrustedHTML, {RETURN_TRUSTED_TYPE: true});

// Safe to use with jQuery 4.0
$('#container').html(clean);

Critical Rules

Always Do

  • Add jquery-migrate plugin BEFORE upgrading production
  • Test focus/blur event handlers thoroughly
  • Replace removed utility functions with native equivalents
  • Specify dataType: 'script' for AJAX script loading
  • Use ES module imports when possible for modern projects

Never Do

  • Upgrade production without testing with migrate plugin first
  • Assume WordPress plugins are jQuery 4.0 compatible
  • Use slim build if you need AJAX or Deferreds
  • Rely on $.type() - use native type checking
  • Use toggleClass(boolean) signature

Known Issues Prevention

This skill prevents 8 documented issues:

Issue #1: $.isArray is not a function

Error: TypeError: $.isArray is not a function Source: https://github.com/jquery/jquery/issues/5411 Why It Happens: Method removed in jQuery 4.0 Prevention: Use Array.isArray() instead

Issue #2: $.parseJSON is not a function

Error: TypeError: $.parseJSON is not a function Source: https://jquery.com/upgrade-guide/4.0/ Why It Happens: Deprecated since 3.0, removed in 4.0 Prevention: Use JSON.parse() instead

Issue #3: $.trim is not a function

Error: TypeError: $.trim is not a function Source: https://jquery.com/upgrade-guide/4.0/ Why It Happens: Native String.prototype.trim available everywhere Prevention: Use str.trim() or String.prototype.trim.call(str)

Issue #4: Focus events fire in wrong order

Error: Unexpected behavior in form validation Source: https://blog.jquery.com/2026/01/17/jquery-4-0-0/ Why It Happens: jQuery 4.0 follows W3C spec, not legacy order Prevention: Test and update event handlers that depend on order

Issue #5: Deferreds undefined in slim build

Error: TypeError: $.Deferred is not a function Source: https://blog.jquery.com/2026/01/17/jquery-4-0-0/ Why It Happens: Removed from slim build in 4.0 Prevention: Use full build or native Promises

Issue #6: Scripts not executing from AJAX

Error: Script loaded but not executed Source: https://jquery.com/upgrade-guide/4.0/ Why It Happens: Auto-execution disabled without explicit dataType Prevention: Add dataType: 'script' to AJAX options

Issue #7: toggleClass not working

Error: toggleClass(true) has no effect Source: https://jquery.com/upgrade-guide/4.0/ Why It Happens: Boolean signature removed Prevention: Use addClass/removeClass or toggleClass with class names

Issue #8: WordPress plugin conflicts

Error: Various "is not a function" errors Source: Common in WordPress ecosystem Why It Happens: Plugins using removed jQuery methods Prevention: Audit plugins with jquery-migrate before upgrading


Browser Support

Supported in jQuery 4.0

  • Chrome (last 3 versions)
  • Firefox (last 2 versions + ESR)
  • Safari (last 3 versions)
  • Edge (Chromium-based)
  • iOS Safari (last 3 versions)
  • Android Chrome (last 3 versions)

Dropped Support

  • IE 10 and older (IE 11 supported until jQuery 5.0)
  • Edge Legacy (EdgeHTML)
  • Very old mobile browsers

Slim vs Full Build Comparison

FeatureFull BuildSlim Build
Size (gzipped)~27.5k~19.5k
DOM ManipulationYesYes
EventsYesYes
AJAXYesNo
Effects/AnimationYesNo
DeferredsYesNo
CallbacksYesNo

Use slim build when: Static sites, no AJAX needs, using native fetch/Promises

Use full build when: WordPress, AJAX-heavy apps, need $.animate or Deferreds


Migration Checklist

  • Add jquery-migrate@4.0.2 to development
  • Run full site test, check console for warnings
  • Replace $.isArray() with Array.isArray()
  • Replace $.parseJSON() with JSON.parse()
  • Replace $.trim() with str.trim()
  • Replace $.now() with Date.now()
  • Replace $.type() with native type checking
  • Replace $.isFunction() with typeof check
  • Replace $.isNumeric() with isNaN/isFinite check
  • Update toggleClass(boolean) usage
  • Add dataType to script AJAX calls
  • Test focus/blur event order
  • Audit WordPress plugins if applicable
  • Remove jquery-migrate after fixing all issues
  • Upgrade to jquery@4.0.0 in production

Official Documentation


Package Versions (Verified 2026-01-25)

{
  "dependencies": {
    "jquery": "^4.0.0"
  },
  "devDependencies": {
    "jquery-migrate": "^4.0.2"
  }
}

Troubleshooting

Problem: WordPress admin breaks after jQuery upgrade

Solution: Only upgrade frontend jQuery. Admin uses its own version. Use conditional logic to avoid affecting wp-admin.

Problem: Third-party plugins stop working

Solution: Keep jquery-migrate loaded until plugins are updated. Check plugin changelogs for jQuery 4.0 compatibility updates.

Problem: AJAX requests work but scripts don't execute

Solution: Add dataType: 'script' to $.ajax options or use $.getScript() for script loading.

Problem: Form validation fires at wrong times

Solution: Review focus/blur/focusin/focusout handlers. jQuery 4.0 fires: blur → focusout → focus → focusin (W3C order).


Questions? Issues?

  1. Check console for jquery-migrate warnings
  2. Review upgrade guide: https://jquery.com/upgrade-guide/4.0/
  3. Check jQuery GitHub issues: https://github.com/jquery/jquery/issues

平台分布

Codex

33.23%
按下载量换算624

Claude

29.77%
按下载量换算559

Cursor

18.09%
按下载量换算340

Gemini CLI

9.71%
按下载量换算182

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills