javascript-standards

Enforces JavaScript and TypeScript coding standards during writing, reviewing, and refactoring.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/FarooqProProgrammer/the-magician --skill javascript-standards-farooqproprogrammer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: javascript-standards
Source: https://github.com/FarooqProProgrammer/the-magician/tree/main/claude-plugin/skills/javascript-standards
Command: npx skills add https://github.com/FarooqProProgrammer/the-magician --skill javascript-standards-farooqproprogrammer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? JavaScript and TypeScript codebases drift into inconsistent module styles, unsafe async patterns, swallowed errors, and injection-prone code when every contributor follows different habits. This Skill provides a single enforceable rulebook covering modules, naming, async correctness, errors, types, immutability, security, Node specifics, and tests. ## Core Features & Use Cases - Non-negotiable rules: Blocks var, loose equality, floating promises, empty catch blocks, eval, hardcoded secrets, and unjustified any types. - Ten rule sections: Covers ESM module structure, naming conventions, function design, async concurrency with Promise.all, error handling with cause, strict TypeScript typing, immutability, injection prevention, Node.js specifics, and deterministic testing. - Review checklist: Supplies a ready-made checklist for reviewing JavaScript diffs, including boundary validation, concurrency correctness, and lint/typecheck/test gates. - Use Case: When asked to refactor a Node.js API handler, the Skill ensures inputs are validated at the boundary, promises run concurrently with Promise.all, errors are rethrown with cause, and no secrets or SQL string concatenation slip in. ## Quick Start Review this TypeScript file against the JavaScript standards and list every rule violation with a suggested fix.

Frequently Asked Questions about javascript-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce JavaScript coding standards in code reviews?▼

Apply the rulebook's non-negotiables first: no var, no loose equality, no floating promises, no empty catch blocks, and no secrets in source. Then run the review checklist covering boundary validation, concurrency, injection surfaces, and passing lint, typecheck, and tests.

What are the rules for async await in JavaScript?▼

Use async/await over .then() chains without mixing both in one function. Run independent work concurrently with Promise.all, use Promise.allSettled when partial failure is acceptable, and give every external call a timeout or abort signal.

Should I use ESM or CommonJS for new Node.js code?▼

Use ESM with import/export for all new code; only use CommonJS when the package or host requires it. Prefer named exports, use the node: prefix for builtins like node:fs/promises, and avoid side effects at import time.

Does this standard apply to plain JavaScript without TypeScript?▼

Yes, it applies to .js, .mjs, and .cjs files as well as TypeScript. Plain-JS projects should use JSDoc types on exported functions instead of strict-mode TypeScript, while all other rules remain identical.

When should existing repo conventions override these rules?▼

An existing repository convention always beats a rule in this standard. When the two conflict, follow the repo's convention and note the divergence rather than reformatting unrelated code.