← Back to Skills Marketplace
ivangdavila

JavaScript

by Iván · GitHub ↗ · v1.0.3
cross-platform ✓ Security Clean
2626
Downloads
5
Stars
20
Active Installs
4
Versions
Install in OpenClaw
/install javascript
Description
Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features.
README (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" == false is true — use === always
  • NaN !== NaN — use Number.isNaN(), not === NaN
  • typeof null === "object" — check === null explicitly
  • Objects compare by reference — {} === {} is false

this Binding

  • Regular functions: this depends on call site — lost in callbacks
  • Arrow functions: this from lexical scope — use for callbacks
  • setTimeout(obj.method) loses this — use arrow or .bind()
  • Event handlers: this is element in regular function, undefined in arrow (if no outer this)

Closure Traps

  • Loop variable captured by reference — let in loop or IIFE to capture value
  • var hoisted to function scope — creates single binding shared across iterations
  • Returning function from loop: all share same variable — use let per iteration

Array Mutation

  • sort(), reverse(), splice() mutate original — use toSorted(), toReversed(), toSpliced() (ES2023)
  • push(), pop(), shift(), unshift() mutate — spread [...arr, item] for immutable
  • delete arr[i] leaves hole — use splice(i, 1) to remove and reindex
  • Spread and Object.assign are shallow — nested objects still reference original

Async Pitfalls

  • Forgetting await returns Promise, not value — easy to miss without TypeScript
  • forEach doesn't await — use for...of for sequential async
  • Promise.all fails fast — one rejection rejects all, use Promise.allSettled if 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 or toFixed() for display
  • parseInt("08") works now — but parseInt("0x10") is 16, watch prefixes
  • Number("") is 0, Number(null) is 0 — but Number(undefined) is NaN
  • Large integers lose precision over 2^53 — use BigInt for big numbers

Iteration

  • for...in iterates keys (including inherited) — use for...of for values
  • for...of on objects fails — objects aren't iterable, use Object.entries()
  • Object.keys() skips non-enumerable — Reflect.ownKeys() gets all including symbols

Implicit Coercion

  • [] + [] 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

Strict Mode

  • "use strict" at top of file or function — catches silent errors
  • Implicit globals throw in strict — x = 5 without declaration fails
  • this is undefined in strict functions — not global object
  • Duplicate parameters and with forbidden
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install javascript
  3. After installation, invoke the skill by name or use /javascript
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug javascript
Version 1.0.3
License
All-time Installs 20
Active Installs 20
Total Versions 4
Frequently Asked Questions

What is JavaScript?

Write robust JavaScript with async patterns, type coercion handling, and modern ES2023+ features. It is an AI Agent Skill for Claude Code / OpenClaw, with 2626 downloads so far.

How do I install JavaScript?

Run "/install javascript" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is JavaScript free?

Yes, JavaScript is completely free (open-source). You can download, install and use it at no cost.

Which platforms does JavaScript support?

JavaScript is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created JavaScript?

It is built and maintained by Iván (@ivangdavila); the current version is v1.0.3.

💬 Comments