javascript-idioms

javascript-idioms is a skill for Claude Code, Codex from irahardianto/awesome-agv. It costs 56 tokens per session (1,406 once invoked), scanned A, original, MIT.

Guía de formas recomendadas de escribir JavaScript moderno sin TypeScript, el lenguaje que añade tipos al código JavaScript. Trata módulos, código asíncrono, patrones del entorno de ejecución, seguridad y organización del proyecto.

In plain words
What is it for?
Sirve para desarrollar o revisar proyectos de JavaScript ES2024+, incluidos módulos, operaciones asíncronas, colecciones y estructuras de proyectos. No está destinada a proyectos TypeScript.
Why use it?
Ayuda a evitar errores habituales de JavaScript y a mantener el código coherente. También indica que debe usarse otra guía cuando el proyecto contiene un archivo `tsconfig.json`.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Sirve para desarrollar o revisar proyectos de JavaScript ES2024+, incluidos módulos, operaciones asíncronas, colecciones y estructuras de proyectos. No está destinada a proyectos TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/irahardianto/awesome-agv/javascript-idioms
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.

Any agent
npx skills add irahardianto/awesome-agv --skill javascript-idioms
Clone the repo
git clone --depth 1 https://github.com/irahardianto/awesome-agv

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/irahardianto/awesome-agv/javascript-idioms/github.svg)](https://agentmods.dev/skills/irahardianto/awesome-agv/javascript-idioms)
Your own site
<a href="https://agentmods.dev/skills/irahardianto/awesome-agv/javascript-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/awesome-agv/javascript-idioms/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for javascript-idioms

Your own site · 80×15
<a href="https://agentmods.dev/skills/irahardianto/awesome-agv/javascript-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/awesome-agv/javascript-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,406 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 17
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 99
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium MCP Rug Pull · line 92
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 93
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.1 $0.00056 $0.01406
Opus 5.5 $0.00022 $0.00562
Sonnet 5.5 $0.00011 $0.00281
Haiku 4.5 $0.00006 $0.00141

Measured 26d ago against content hash 1b5bf55507eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

javascript-idioms 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 26d 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.

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.

.agents/skills/javascript-idioms/SKILL.md · 101 lines

How it starts

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

JavaScript Idioms and Patterns

Modern JavaScript (ES2024+) rewards modules, async/await, and functional patterns. Idiomatic JS = strict mode, modular, well-tested.

Scope: Plain JavaScript only — projects with no tsconfig.json. This skill is intentionally thin: most JS guidance (coercion traps, async pitfalls, scope bugs, security, collections, performance) is shared with TypeScript and lives in one place to avoid divergence.

Loading guards:

  • If tsconfig.json exists, do NOT load this skill — load @.agents/skills/typescript-idioms/SKILL.md instead. TypeScript is preferred whenever available.
  • Coercion / async / scope / security / collection / performance pitfalls: see @.agents/skills/typescript-idioms/references/ts-patterns-and-anti-patterns.md — despite the filename, it is scoped to "TypeScript/JavaScript" and covers runtime pitfalls that apply to plain JS verbatim.
  • Project layout: see @.agents/skills/typescript-idioms/references/project-structure.md (the generic backend/library/monorepo layouts are language-level, not TS-only).

Module System

  1. ES modules over CommonJS for all new code:
    // ✅ ESM
    import { createTask } from './task-service.js';
    export function handler(req, res) { ... }
    
    // ❌ CommonJS (legacy only)
    const { createTask } = require('./task-service');
    
  2. Always use .js extensions in ESM relative imports — Node.js ESM requires them; bundlers accept them.
  3. package.json "type": "module" to enable ESM by default; use .cjs for any CommonJS holdouts.
  4. CJS/ESM interop — import default from './cjs.cjs' works; named exports from CJS are not statically analyzable, prefer module.exports = { named } + const { named } = require(...) or migrate to ESM.

Declarations and Strict Mode

  1. const by default, let when reassignment needed, never var. (var hoisting/closure bugs: see ts-patterns-and-anti-patterns.md §3.)
  2. Enable strict mode — 'use strict'; at file top in scripts. Strict mode is implicit in ESM modules ("type": "module" in package.json) and class bodies.
  3. Optional chaining and nullish coalescing (prefer ?? over || to avoid 0/'' falsy traps):
    const title = task?.title ?? 'Untitled';
    const count = config?.scoring?.default ?? 0;
    
  4. Destructuring with defaults for clean parameter handling:
    function createTask({ title, priority = 'medium', tags = [] }) { ... }
    

Read the full file on GitHub · 101 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. 26d ago Changed · -3 lines · +10 tokens per session 1b5bf55507eb
  2. 1mo ago First seen · 104 lines · 46 tokens per session scan A f788f44a034b

Subscribe to this mod's changes

javascript-idioms is a skill published in the GitHub repository irahardianto/awesome-agv (156 stars, last pushed 9d ago), licensed MIT. It adds 56 tokens to every session and 1,406 once invoked, about $0.0002 per session on Opus 5.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-08-30.

Related

Other skills, from other repositories

android-finance-spec

Use when generating, reviewing, or refactoring Android Kotlin code for financial apps that require BigDecimal/String precision, RTL/i18n safety, Kotlin style discipline, and "do not reinvent existing project patterns" constraints.

brycegao/android-finance-spec · 48 tokens

om-system-extension

Extend installed Open Mercato modules through UMES enrichers, interceptors, mutation guards, widgets, menus, entity extensions, events, component/page replacements, and overrides. Use for "extend core", "add field/column/action", "hide page", "intercept API", "UMES", or "rozszerz moduł".

open-mercato/open-mercato · 73 tokens

om-build-workflow

Build or extend standalone business workflows, activities, event triggers, durable user tasks, compensation, output paths, idempotency, and live progress. Use for "add workflow", "custom activity", "CALLAPI", "approval task", "workflow progress", or "zbuduj workflow".

open-mercato/open-mercato · 63 tokens

om-evolve-harness

Add a reproducible standalone agent-harness use case or correct failed routing/context with semantic assertions, one knowledge owner, and before/after evaluation. Use for "add harness case", "agent got this wrong", "extend the harness", "new use case", or "rozszerz harness".

open-mercato/open-mercato · 66 tokens

om-troubleshooter

Diagnose and fix standalone Open Mercato bugs across scope, commands, locking, fields, generated registries, UI hydration, cache/search, bootstraps, queues, and providers. Use for "fix bug", "why does this fail", "regression", "debug", "napraw błąd", or a failing test.

open-mercato/open-mercato · 73 tokens

om-trim-unused-modules

Analyze and disable unused built-in modules in a standalone app without breaking dependencies, navigation, backend landing, bootstrap, or generation. Use for "trim classic mode", "remove unused modules", "slim app", "disable built-ins", or "wyłącz moduły".

open-mercato/open-mercato · 61 tokens