← 返回 Skills 市场
ju8z

JavaScript

作者 Ju8z · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
165
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install javascript-oop
功能描述
Use this skill for JavaScript implementation, refactoring, debugging, or review when you need strong Java-style OOP conventions, ES2025+ standard features, t...
使用说明 (SKILL.md)

JavaScript Skill

Scope

Use this skill for JavaScript or Node/browser code changes and reviews.

Precedence

  • Follow explicit user instructions first.
  • Follow repository conventions, formatter, linter, and AGENTS.md before generic defaults in these rules.
  • Use the rule files as focused guidance and review checklists, not as a reason to fight established local patterns.

ES2025+ Baseline

  • Assume a modern runtime such as Node 22+ or evergreen engines.
  • Prefer standardized Stage 4 ECMAScript features only.
  • Prefer newer standard helpers when they reduce boilerplate.
  • Treat 2026-finished APIs as conditional on target runtime support.
  • Do not default to Stage 3 syntax such as using, await using, or decorators.

Java-Style OOP Baseline

  • Treat classes as the default home for stateful business behavior.
  • Limit free functions to small pure transforms, validators, calculators, and mappers.
  • Treat controllers, services, repositories, policies, use cases, ports, and specifications as first-class architectural concepts.
  • Treat stateful browser behavior as interface-layer controller code rather than loose script modules.
  • Prefer parameter objects, #private fields, and explicit value objects over ad hoc argument lists and mutable shapes.
  • Prefer intent methods, domain errors, and stable event payload DTOs over generic property mutation.
  • Keep composition-root wiring explicit and centralized, with dependencies flowing inward.

Operating Model

  1. Start with this file.
  2. Load the baseline rules for almost every task:
  3. Load only the rule groups that match the task.
  4. Use each file's local Example and End Check, then finish with the global checklist at the bottom of this file.

Rule Map

Syntax and formatting

Objects, arrays, and data shape

Functions, classes, and modules

Equality, conversion, and modern syntax

Async and failure handling

Task-Based Loading

Load these additional files when the task has these traits:

  • Data reshaping or DTO work: objects, destructuring, collections, value-semantics.
  • Domain and service design or refactors: classes-and-constructors, functions, accessors, modules, error-handling, naming-conventions, solid-and-structure.
  • Browser widgets, DOM bindings, and event-driven UI controllers: ui-controllers, classes-and-constructors, modules, naming-conventions, comments.
  • Async flows, I/O, retries, timers, concurrency, or background work: async, error-handling, standard-library.
  • Nullability, defaults, parsing, regex, or binary conversion: value-semantics, standard-library.
  • Formatting, documentation, or readability cleanup: formatting, strings, comments, control-flow.
  • Code review: start from the changed lines, then load only the rules implicated by the diff plus the end-check categories below.

Important Distinctions

  • value-semantics.md owns equality, conversions, defaults, truthiness, and optional chaining.
  • async.md owns Promise.try(), Array.fromAsync(), and async flow rules.
  • collections.md owns iterator helpers, Set algebra, copy depth, and change-by-copy collections inside service and repository workflows.
  • classes-and-constructors.md owns encapsulation, constructor discipline, and factory guidance.
  • ui-controllers.md owns DOM lifecycle, event binding, teardown, and interface-layer controller guidance.
  • functions.md owns parameter-object APIs and the boundary between tiny pure helpers and named service or use-case methods.
  • objects.md owns value-object and DTO boundary guidance.
  • error-handling.md owns domain-error policy.
  • standard-library.md owns concrete ES2025+ helper APIs such as RegExp.escape(), Error.isError(), and binary conversion helpers inside object-oriented designs.
  • solid-and-structure.md is the only file that names SRP, OCP, LSP, ISP, DIP, and the composition-root and application layering model.

End Check

  • Verify repository conventions override generic defaults when they differ.
  • Verify chosen ES2025+ features are standardized and fit target runtime support.
  • Verify behavior lives on objects, services, use cases, or controllers rather than scattered utilities.
  • Verify naming, encapsulation, module boundaries, value objects, and DTO boundaries stay explicit.
  • Verify ports, adapters, and layer placement are clear.
  • Verify browser controllers keep lifecycle, DOM boundaries, and cleanup explicit.
  • Verify async work, error handling, and collection mutation choices are intentional.
  • Verify comments and formatting remain consistent and low-noise.
安全使用建议
This skill is a rulebook and checklist for Java-style OOP and modern ES2025+ patterns; it does not request credentials or install software. Before installing, verify the style rules align with your project's conventions (the SKILL.md explicitly says to defer to repository formatters and AGENTS.md). If you want to limit the agent's autonomous actions, control invocation policies on your agent platform, but the skill itself does not introduce obvious security risks.
功能分析
Type: OpenClaw Skill Name: javascript-oop Version: 1.0.2 The skill bundle provides a comprehensive set of coding standards and architectural guidelines for JavaScript development, focusing on modern ECMAScript features (ES2025+) and Java-style Object-Oriented Programming. It includes security-positive instructions such as explicitly forbidding the use of `eval()` (in rules/strings.md) and recommending `RegExp.escape()` for user-provided regex fragments (in rules/standard-library.md). The instructions are entirely focused on code quality, maintainability, and structure, with no evidence of malicious intent, data exfiltration, or harmful prompt injection.
能力评估
Purpose & Capability
The skill's name and description match its contents: a collection of coding rules and runtime instructions for JS OOP style and reviews. It requests no binaries, env vars, or installs, which is proportionate for a stylistic/review skill.
Instruction Scope
SKILL.md confines the agent to code-style, loading the included rule files and following repository conventions/formatters. It does not instruct reading unrelated system files, contacting external endpoints, or accessing secrets. Its reference to repository files and AGENTS.md is appropriate for a code-review skill.
Install Mechanism
There is no install spec and no code executed or downloaded at install time. This is the lowest-risk model (instruction-only).
Credentials
The skill declares no required environment variables, credentials, or config paths, and SKILL.md does not attempt to access any secrets—requirements are proportionate to its stated purpose.
Persistence & Privilege
always is false and the skill does not request elevated or persistent privileges. It can be invoked autonomously (platform default), but there are no additional privilege or cross-skill config changes requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install javascript-oop
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /javascript-oop 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Small changes to description and optimization.
v1.0.1
- Added new rules file: ui-controllers.md, outlining best practices for UI controller and DOM lifecycle code. - Updated guidance to explicitly include "controller" and "UI controller" as first-class OOP architectural concepts. - Expanded operating and task-based rule loading instructions to cover browser widgets, DOM bindings, and UI controller scenarios. - Refined end checklists and section distinctions for controller/lifecycle and interface-layer concerns. - Minor updates to skill description and scope for clarity.
v1.0.0
Built for modern JavaScript runtimes with standardized ES2025+ features and strong Java-style OOP conventions. Emphasizes low-boilerplate design through #private encapsulation, parameter-object APIs, explicit DTO/value-object boundaries, domain-specific errors, and layered ports-and-adapters structure. Optimized for compact, agent-friendly guidance with minimal token overhead.
元数据
Slug javascript-oop
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

JavaScript 是什么?

Use this skill for JavaScript implementation, refactoring, debugging, or review when you need strong Java-style OOP conventions, ES2025+ standard features, t... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 165 次。

如何安装 JavaScript?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install javascript-oop」即可一键安装,无需额外配置。

JavaScript 是免费的吗?

是的,JavaScript 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

JavaScript 支持哪些平台?

JavaScript 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 JavaScript?

由 Ju8z(@ju8z)开发并维护,当前版本 v1.0.2。

💬 留言讨论