Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install javascript或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install javascript⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/javascript/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: JavaScript slug: javascript version: 1.0.3 description: Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features. ---
User needs JavaScript expertise — from core language features to modern patterns. Agent handles async/await, closures, module systems, and ES2023+ features.
| Topic | File | |-------|------| | Async patterns | async.md | | Type coercion rules | coercion.md | | Array and object methods | collections.md | | Modern ES features | modern.md |
== coerces: "0" == false is true — use === alwaysNaN !== NaN — use Number.isNaN(), not === NaNtypeof null === "object" — check === null explicitly{} === {} is falsethis depends on call site — lost in callbacksthis from lexical scope — use for callbackssetTimeout(obj.method) loses this — use arrow or .bind()this is element in regular function, undefined in arrow (if no outer this)let in loop or IIFE to capture valuevar hoisted to function scope — creates single binding shared across iterationslet per iterationsort(), reverse(), splice() mutate original — use toSorted(), toReversed(), toSpliced() (ES2023)push(), pop(), shift(), unshift() mutate — spread [...arr, item] for immutabledelete arr[i] leaves hole — use splice(i, 1) to remove and reindexObject.assign are shallow — nested objects still reference originalawait returns Promise, not value — easy to miss without TypeScriptforEach doesn't await — use for...of for sequential asyncPromise.all fails fast — one rejection rejects all, use Promise.allSettled if need all results.catch() or try/catch with await0.1 + 0.2 !== 0.3 — floating point, use integer cents or toFixed() for displayparseInt("08") works now — but parseInt("0x10") is 16, watch prefixesNumber("") is 0, Number(null) is 0 — but Number(undefined) is NaNBigInt for big numbersfor...in iterates keys (including inherited) — use for...of for valuesfor...of on objects fails — objects aren't iterable, use Object.entries()Object.keys() skips non-enumerable — Reflect.ownKeys() gets all including symbols[] + [] is "" — arrays coerce to strings[] + {} is "[object Object]" — object toString{} + [] is 0 in console — {} parsed as block, not object"5" - 1 is 4, "5" + 1 is "51" — minus coerces, plus concatenates"use strict" at top of file or function — catches silent errorsx = 5 without declaration failsthis is undefined in strict functions — not global objectwith forbidden安装 JavaScript 后,可以对 AI 说这些话来触发它
Help me get started with JavaScript
Explains what JavaScript does, walks through the setup, and runs a quick demo based on your current project
Use JavaScript to write robust JavaScript with async patterns, type coercion handling...
Invokes JavaScript with the right parameters and returns the result directly in the conversation
What can I do with JavaScript in my developer & devops workflow?
Lists the top use cases for JavaScript, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/javascript/ 目录(个人级,所有项目可用),或 .claude/skills/javascript/(项目级)。重启 AI 客户端后,用 /javascript 主动调用,或让 AI 根据上下文自动发现并使用。
JavaScript 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
JavaScript 可免费安装使用。请查阅仓库了解许可证信息。
Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features.
JavaScript 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using JavaScript
Identifies repetitive steps in your workflow and sets up JavaScript to handle them automatically