javascript-language
БесплатноБез исполняемых скриптовНе проверенModern JavaScript (ES2022+) patterns for clean, maintainable code. Use when working with modern JavaScript features like optional chaining, nullish…
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
JavaScript Language Patterns
Priority: P0 (CRITICAL)
Implementation Guidelines
- Variables: const default. let if needed. No var — block scope only.
- Functionality: Use
Arrow Functionsfor callbacks/inlines;Function Declarationfor core logic. - Async Logic: Use async/await with try/catch and Promise.all() for parallel operations. Prefer native Promise APIs; use
node:util.promisifyonly for one-shot, error-first callbacks. - Module Loaders: Preserve the module system consumers already load:
.cjs/type: commonjsstays CommonJS,.mjs/type: moduleuses ESM. Prefer ESM for new modules only when every consumer can load it; an ESM rewrite of a working CJS module is a separate, explicit migration. - Modern Syntax: Use Destructuring, Spread (...), Optional Chain ?. and Nullish ?? coalescing.
- String Handling: Use
Template Literals(backticks) for interpolation and multi-line strings. - Data Collections: Prefer
map,filter, andreduceover imperativeforloops. - Modules: Standardize new modules on ESM import/export; use Named Exports over Default. Match
package.jsontype, file extension, and the consumer's loader when editing existing code. - Encapsulation: Leverage
#privateclass fields for encapsulation. - Error States: Throw
new Error()with descriptive messages; never throw strings.
Anti-Patterns
- No var — Block scope only.
- No
==: Strict===. - No
new Object(): Use literals{}. - No blanket promisification:
promisifyassumes one error-first callback per call; it breaks receiver-dependent methods, event/retry callbacks, Promise-returning functions and synchronous APIs. - No implicit ESM migration: Never rewrite a
.cjsor CommonJS consumer unless that consumer's loader is part of the change. - No Mutation: Immutability first.
Code & Reference
See references/REFERENCE.md for modern syntax, async patterns, private fields, and functional programming examples.
Related Topics
best-practices | tooling
Установить javascript-language в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл javascript-language?
Modern JavaScript (ES2022+) patterns for clean, maintainable code. Use when working with modern JavaScript features like optional chaining, nullish coalescing, or ESM.
Как установить скилл javascript-language?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл javascript-language запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic