javascript-strict

javascript-strict is a skill for Claude Code, Codex from 0xMassi/claude-skills. It costs 85 tokens per session (3,191 once invoked), scanned A, original, MIT.

A set of strict rules for writing and reviewing plain JavaScript in Node.js, the environment for running JavaScript outside a web browser. It covers variable declarations, asynchronous code, classes and functions, documentation, errors, performance, and module usage.

In plain words
What is it for?
Use it when writing, reviewing, or reorganising non-TypeScript Node.js code.
Why use it?
It reduces common JavaScript mistakes and makes server-side code easier to maintain and diagnose. The rules also address unsafe error handling and avoidable performance problems.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/0xmassi/claude-skills/javascript-strict
Any agent
npx skills add 0xMassi/claude-skills --skill javascript-strict
Clone the repo
git clone --depth 1 https://github.com/0xMassi/claude-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for javascript-strict

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xmassi/claude-skills/javascript-strict.svg)](https://agentmods.dev/skills/0xmassi/claude-skills/javascript-strict)
Your own site
<a href="https://agentmods.dev/skills/0xmassi/claude-skills/javascript-strict"><img src="https://agentmods.dev/badge/skills/0xmassi/claude-skills/javascript-strict.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,191 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00085 $0.03191
Opus 5 $0.00043 $0.01596
Sonnet 5 $0.00017 $0.00638
Haiku 4.5 $0.00009 $0.00319

Measured 5d ago against content hash f71191522dbe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

javascript-strict scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

return fetch(url).then(r => r.json()).then(data => process(data)).catch(handleError);
javascript-strict/SKILL.md · 460 lines

How it starts

The opening of the file, as written. The whole thing — 460 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JavaScript Strict Standard

Rules extracted from production Node.js services (non-TypeScript).

CRITICAL: Variable Declarations

JS-01: const by default, let when necessary, never var

// BAD
var count = 0;
var items = [];

// GOOD
const VALID_MODES = ['bypass', 'browser', 'capsolver'];  // Never changes
let activeCount = 0;  // Reassigned in loop
let currentDelay = baseDelay;  // Mutated by logic

No var anywhere.

JS-02: Destructure at declaration

// BAD
const name = config.name;
const port = config.port;
const mode = config.mode;

// GOOD
const { name, port, mode } = config;

// GOOD: with defaults
const { mode = 'both', delay = 1000 } = options;

CRITICAL: Error Handling

JS-03: Never catch and swallow errors

// BAD
try { await save(); } catch (e) {}

// BAD: logs but no recovery
try { await save(); } catch (e) { console.log(e); }

// GOOD: context + action
try {
  await save();
} catch (err) {
  console.error(`[Monitor] ${this.monitorId} Save failed:`, err.message);
  await this.notifyError('save_failure', err.message);
  // Decide: retry, skip, or throw
}

JS-04: Prefix error logs with context

// BAD
console.error(err.message);

// GOOD
console.error(`[Monitor] ${this.monitorId} Error:`, err.message);
console.error(`[TokenBank] ${this.baseHost} Persist failed:`, err.message);
console.warn(`[DEPRECATED] MONITOR_BYPASS is deprecated, use TMPT_MODE`);

Format: [Module] ${identifier} Action: message

JS-05: Avoid recursive retry without limits

// BAD: infinite recursion on persistent failure
async getTmpt() {
  try {
    const token = await this.tmptBank.getTmpt();
    if (!token) { await sleep(1000); return this.getTmpt(); }
    return token;
  } catch {
    await sleep(1000);
    return this.getTmpt(); // STACK OVERFLOW on persistent failure
  }
}

// GOOD: bounded retries
async getTmpt(retries = 10) {
  for (let i = 0; i < retries; i++) {
    try {
      const token = await this.tmptBank.getTmpt();
      if (token) return token;
    } catch (err) {
      console.error(`[Monitor] getTmpt attempt ${i + 1}/${retries}:`, err.message);
    }
    await sleep(1000 * Math.min(i + 1, 5)); // Backoff
  }
  throw new Error(`Failed to get TMPT after ${retries} attempts`);
}

Read the full file on GitHub · 460 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 460 lines · 85 tokens per session scan A f71191522dbe

Subscribe to this mod's changes

javascript-strict is a skill published in the GitHub repository 0xMassi/claude-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 85 tokens to every session and 3,191 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

optimize-for-gpu

GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster. Use for CUDA/GPU optimization; CPU-bound NumPy, SciPy, pandas, scikit-learn, NetworkX, scikit-image, vector-search, image-processing, graph, simulation, or file-I/O workloads; CuPy, cuDF, cuML, cuGraph, cuVS…

K-Dense-AI/scientific-agent-skills · 151 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens

polars

High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.

K-Dense-AI/scientific-agent-skills · 47 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

pandas-pro

Performs pandas DataFrame operations for data analysis, manipulation, and transformation. Use when working with pandas DataFrames, data cleaning, aggregation, merging, or time series analysis. Invoke for data manipulation tasks such as joining DataFrames on multiple keys, pivoting tables, resampling time series…

Jeffallan/claude-skills · 87 tokens