← 返回 Skills 市场
2626
总下载
5
收藏
20
当前安装
4
版本数
在 OpenClaw 中安装
/install javascript
功能描述
Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features.
使用说明 (SKILL.md)
When to Use
User needs JavaScript expertise — from core language features to modern patterns. Agent handles async/await, closures, module systems, and ES2023+ features.
Quick Reference
| Topic | File |
|---|---|
| Async patterns | async.md |
| Type coercion rules | coercion.md |
| Array and object methods | collections.md |
| Modern ES features | modern.md |
Equality Traps
==coerces:"0" == falseis true — use===alwaysNaN !== NaN— useNumber.isNaN(), not=== NaNtypeof null === "object"— check=== nullexplicitly- Objects compare by reference —
{} === {}is false
this Binding
- Regular functions:
thisdepends on call site — lost in callbacks - Arrow functions:
thisfrom lexical scope — use for callbacks setTimeout(obj.method)losesthis— use arrow or.bind()- Event handlers:
thisis element in regular function, undefined in arrow (if no outer this)
Closure Traps
- Loop variable captured by reference —
letin loop or IIFE to capture value varhoisted to function scope — creates single binding shared across iterations- Returning function from loop: all share same variable — use
letper iteration
Array Mutation
sort(),reverse(),splice()mutate original — usetoSorted(),toReversed(),toSpliced()(ES2023)push(),pop(),shift(),unshift()mutate — spread[...arr, item]for immutabledelete arr[i]leaves hole — usesplice(i, 1)to remove and reindex- Spread and
Object.assignare shallow — nested objects still reference original
Async Pitfalls
- Forgetting
awaitreturns Promise, not value — easy to miss without TypeScript forEachdoesn't await — usefor...offor sequential asyncPromise.allfails fast — one rejection rejects all, usePromise.allSettledif need all results- Unhandled rejection crashes in Node — always
.catch()or try/catch with await
Numbers
0.1 + 0.2 !== 0.3— floating point, use integer cents ortoFixed()for displayparseInt("08")works now — butparseInt("0x10")is 16, watch prefixesNumber("")is 0,Number(null)is 0 — butNumber(undefined)is NaN- Large integers lose precision over 2^53 — use
BigIntfor big numbers
Iteration
for...initerates keys (including inherited) — usefor...offor valuesfor...ofon objects fails — objects aren't iterable, useObject.entries()Object.keys()skips non-enumerable —Reflect.ownKeys()gets all including symbols
Implicit Coercion
[] + []is""— arrays coerce to strings[] + {}is"[object Object]"— object toString{} + []is0in console —{}parsed as block, not object"5" - 1is 4,"5" + 1is "51" — minus coerces, plus concatenates
Strict Mode
"use strict"at top of file or function — catches silent errors- Implicit globals throw in strict —
x = 5without declaration fails thisis undefined in strict functions — not global object- Duplicate parameters and
withforbidden
安全使用建议
This skill is a documentation-only helper for JavaScript: it doesn't install software or ask for credentials, and its content matches its description. You can install it without exposing secrets or adding software. As with any coding advice, review generated code and test it in your environment — the docs may contain minor language mixing (some Spanish fragments) and the guidance can suggest patterns that still need adaptation to your project (e.g., error handling, performance). If you need the agent to execute code or access your repo, only grant those capabilities intentionally and separately.
功能分析
Type: OpenClaw Skill
Name: javascript
Version: 1.0.3
The skill bundle consists entirely of markdown files providing educational content about JavaScript pitfalls and best practices. There is no executable code, and the markdown instructions do not contain any prompt injection attempts or directives that would lead an AI agent to perform malicious actions such as data exfiltration, unauthorized execution, or persistence. All content aligns with the stated purpose of offering JavaScript expertise.
能力评估
Purpose & Capability
The name/description promise JavaScript guidance; the SKILL.md and the four topic files provide exactly that (async patterns, coercion, collection methods, modern ES features). There are no unrelated requirements (no env vars, no binaries, no install).
Instruction Scope
SKILL.md and the included docs are purely advisory reference material for writing JS. They do not instruct the agent to read system files, call external endpoints, access credentials, or perform actions outside of producing guidance or code examples.
Install Mechanism
No install spec and no code files — nothing is written to disk or downloaded. This is the lowest-risk form (instruction-only).
Credentials
The skill declares no environment variables, credentials, or config paths. Nothing requested is disproportionate to providing language guidance.
Persistence & Privilege
always:false and default autonomous invocation are appropriate for a user-invocable knowledge skill. The skill does not request persistent system privileges or modify other skills' configs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install javascript - 安装完成后,直接呼叫该 Skill 的名称或使用
/javascript触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
Initial release
v1.0.2
Auxiliares rehecho con 100% trampas
v1.0.1
Upgrade: nueva estructura con archivos auxiliares, manteniendo todas las trampas originales
v1.0.0
Initial release
元数据
常见问题
JavaScript 是什么?
Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2626 次。
如何安装 JavaScript?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install javascript」即可一键安装,无需额外配置。
JavaScript 是免费的吗?
是的,JavaScript 完全免费(开源免费),可自由下载、安装和使用。
JavaScript 支持哪些平台?
JavaScript 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 JavaScript?
由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.3。
推荐 Skills