smithery/ngxtm

JavaScript Language Patterns

Modern JavaScript (ES2022+) patterns for clean, maintainable code.

Installation

$ npx skills add smithery/ngxtm --skill javascript-language-patterns

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/ngxtm · top by installs.

npx skills add smithery/ngxtm

Browse all from smithery/ngxtm

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
labels
["javascript","language","es6","modern-js"]
triggers
{"files":["**\/*.js","**\/*.mjs","**\/*.cjs"],"keywords":[]}

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,670 B
  • docs SUMMARY.md 102 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

JavaScript Language Patterns

Priority: P0 (CRITICAL)

Modern JavaScript standards for clean, maintainable code.

Implementation Guidelines

  • Variables: const default. let if needed. No var.
  • Functions: Arrows for callbacks. Declarations for top-level.
  • Async: async/await + try/catch.
  • Objects: Destructuring, Spread ..., Optional Chain ?., Nullish ??.
  • Strings: Template literals ${}.
  • Arrays: map, filter, reduce. No loops.
  • Modules: ESM import/export.
  • Classes: Use #private fields.

Anti-Patterns

  • No var: Block scope only.
  • No ==: Strict ===.
  • No new Object(): Use literals {}.
  • No Callbacks: Promisify everything.
  • No Mutation: Immutability first.

Code

// Modern Syntax
const [x, ...rest] = items;
const name = user?.profile?.name ?? 'Guest';

// Async
async function getUser(id) {
  try {
    const res = await fetch(`/api/${id}`);
    return res.json();
  } catch (err) {
    console.error(err);
    throw err;
  }
}

// Class + Private
class Service {
  #key;
  constructor(k) {
    this.#key = k;
  }
}

Reference & Examples

For advanced patterns and functional programming: See [references/REFERENCE.md](references/REFERENCE.md).

Related Topics

best-practices | tooling