javascript-expert

javascript-expert is a skill for Claude Code, Codex from personamanagmentlayer/pcl. It costs 69 tokens per session (2,784 once invoked), scanned A, original, Apache-2.0.

A guide for modern JavaScript, the language used in browsers and server environments such as Node.js. It covers recent language features and common asynchronous patterns.

In plain words
What is it for?
Use it to write browser or server-side JavaScript, work with npm packages, and structure modern asynchronous code.
Why use it?
It reduces uncertainty when writing current JavaScript and choosing safer ways to handle data, classes, arrays, and asynchronous operations.

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/personamanagmentlayer/pcl/javascript-expert
Any agent
npx skills add personamanagmentlayer/pcl --skill javascript-expert
Clone the repo
git clone --depth 1 https://github.com/personamanagmentlayer/pcl

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/javascript-expert.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/javascript-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/javascript-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/javascript-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,784 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00069 $0.02784
Opus 5 $0.00034 $0.01392
Sonnet 5 $0.00014 $0.00557
Haiku 4.5 $0.00007 $0.00278

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

Security

Grade A, and why

javascript-expert scanned grade A with 0 findings 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 today.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

stdlib/languages/javascript-expert/SKILL.md · 486 lines

How it starts

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

JavaScript Expert

You are an expert JavaScript developer with deep knowledge of modern ECMAScript (ES2024+), Node.js, and the npm ecosystem. You write clean, performant, and maintainable JavaScript code following industry best practices.

Code Patterns

Error Handling

Modern Error Handling:

// Custom error classes
class ValidationError extends Error {
  constructor(message, field) {
    super(message);
    this.name = 'ValidationError';
    this.field = field;
  }
}

class NotFoundError extends Error {
  constructor(resource, id) {
    super(`${resource} with id ${id} not found`);
    this.name = 'NotFoundError';
    this.resource = resource;
    this.id = id;
  }
}

// Error handling with proper typing
async function getUser(id) {
  try {
    const response = await fetch(`/api/users/${id}`);

    if (!response.ok) {
      if (response.status === 404) {
        throw new NotFoundError('User', id);
      }
      throw new Error(`HTTP ${response.status}: ${response.statusText}`);
    }

    return await response.json();
  } catch (error) {
    if (error instanceof NotFoundError) {
      console.log('User not found, returning default');
      return { id, name: 'Unknown' };
    }
    throw error; // Re-throw unexpected errors
  }
}

// Result pattern (no exceptions)
function divide(a, b) {
  if (b === 0) {
    return { ok: false, error: 'Division by zero' };
  }
  return { ok: true, value: a / b };
}

const result = divide(10, 2);
if (result.ok) {
  console.log('Result:', result.value);
} else {
  console.error('Error:', result.error);
}

Functional Programming

Immutability and Pure Functions:

// Avoid mutations
const addItem = (items, newItem) => [...items, newItem];
const updateItem = (items, id, updates) =>
  items.map((item) => (item.id === id ? { ...item, ...updates } : item));

// Composition
const pipe =
  (...fns) =>
  (x) =>
    fns.reduce((v, f) => f(v), x);
const compose =
  (...fns) =>
  (x) =>
    fns.reduceRight((v, f) => f(v), x);

const addVAT = (price) => price * 1.2;
const applyDiscount = (discount) => (price) => price * (1 - discount);
const formatPrice = (price) => `$${price.toFixed(2)}`;

const calculatePrice = pipe(addVAT, applyDiscount(0.1), formatPrice);

console.log(calculatePrice(100)); // "$108.00"

// Currying
const multiply = (a) => (b) => a * b;
const double = multiply(2);
console.log(double(5)); // 10

// Map, filter, reduce
const users = [
  { name: 'Alice', age: 30, active: true },
  { name: 'Bob', age: 25, active: false },
  { name: 'Charlie', age: 35, active: true },
];

const activeUserNames = users
  .filter((user) => user.active)
  .map((user) => user.name);

const totalAge = users.reduce((sum, user) => sum + user.age, 0);

Read the full file on GitHub · 486 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed · -333 lines · +43 tokens per session c02719416689
  2. yesterday First seen · 819 lines · 26 tokens per session scan A 8f0f08e75f3c

Subscribe to this mod's changes

javascript-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (41 stars, last pushed today), licensed Apache-2.0. It adds 69 tokens to every session and 2,784 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

gocciascript-issue-validation

Validate GocciaScript engine issues against the project-specific test262 harness. Use alongside implement-issue for GocciaScript issues that mention test262, ECMA-262/ECMA-402 conformance, Intl, or parser compatibility flags.

frostney/GocciaScript · 58 tokens

native-nostalgia-stack

Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

frostney/GocciaScript · 51 tokens

typed-events

Type-safe validated wrappers for browser CustomEvent, BroadcastChannel, and window.postMessage APIs using any standard-schema-compatible validator (zod, valibot, arktype). Use when implementing createEvent, createEventMap, createBroadcastChannel, createBroadcastEvent, or createMessage. For React hooks (useListener…

stephansama/packages · 80 tokens

eslint-config

Composable ESLint flat config for TypeScript projects. Use config() with presets.base spread to activate baseline, javascript, typescript, imports, jsdoc, unicorn, perfectionist, prettier, regexp, command, packagejson, pnpm, gitignore, node, e18e configs. autoEnable detects installed packages (astro, svelte, lit…

stephansama/packages · 105 tokens

typed-env

Validate and type process.env environment variables at runtime using createEnvironment with a standard-schema-compatible validator. Supports zod, valibot, and arktype only. Use when setting up environment validation, auto-loading .env files via dotenvx, or generating .env.example placeholder files from a schema shape.

stephansama/packages · 64 tokens

modernize-ecmascript

当 Agent 编写或修改 JavaScript、TypeScript,用户要求按指定环境、输出版本、ES20xx 或具体语法编写代码,询问某项 ECMAScript 语法、标准内置 API 或提案能否采用,或者要求审查仓库中可简化、可现代化的写法时,应使用本 Skill。围绕目标文件真实经过的解析器、转换器和输出目标判断新语法能否安全采用,并按需读取 TC39 Atlas 的提案阶段、官方仓库、polyfill 与实现线索。.

bosens-China/tc39-atlas · 130 tokens