Borrowing it
Nothing to install: this file belongs to irahardianto/awesome-agv. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/irahardianto/awesome-agv/main/.agents/skills/javascript-idioms/SKILL.mdgit clone --depth 1 https://github.com/irahardianto/awesome-agvWrote 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.
[](https://agentmods.dev/skills/irahardianto/awesome-agv/javascript-idioms)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.01415 |
| Opus 5 | $0.00023 | $0.00707 |
| Sonnet 5 | $0.00009 | $0.00283 |
| Haiku 4.5 | $0.00005 | $0.00142 |
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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 104 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.jsonexists, do NOT load this skill — load@.agents/skills/typescript-idioms/SKILL.mdinstead. 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
- 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'); - Always use
.jsextensions in ESM relative imports — Node.js ESM requires them; bundlers accept them. package.json"type": "module"to enable ESM by default; use.cjsfor any CommonJS holdouts.- CJS/ESM interop —
import default from './cjs.cjs'works; named exports from CJS are not statically analyzable, prefermodule.exports = { named }+const { named } = require(...)or migrate to ESM.
Declarations and Strict Mode
constby default,letwhen reassignment needed, nevervar. (varhoisting/closure bugs: seets-patterns-and-anti-patterns.md§3.)- Enable strict mode —
'use strict';at file top in scripts. Strict mode is implicit in ESM modules ("type": "module"inpackage.json) and class bodies. - Optional chaining and nullish coalescing (prefer
??over||to avoid0/''falsy traps):const title = task?.title ?? 'Untitled'; const count = config?.scoring?.default ?? 0; - Destructuring with defaults for clean parameter handling:
function createTask({ title, priority = 'medium', tags = [] }) { ... }
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.
- 6d ago First seen · 104 lines · 46 tokens per session scan A f788f44a034b
javascript-idioms is a skill published in the GitHub repository irahardianto/awesome-agv (156 stars, last pushed 15d ago), licensed MIT. It adds 46 tokens to every session and 1,415 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
agenttrace-session-audit
Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.
maintaining-windows-health
Hands-on playbook for Windows 11 disk cleanup, dev-machine optimization, and proactive health alerting. Use when the PC is full or slow, when a BSOD / Kernel-Power 41 / crash dump / commit-memory pressure happened, when the user asks to free disk space, audit storage, set up disk/memory alerts, or restore the same…
prompt-engineering
Universal prompt engineering techniques for any LLM. Use when crafting, optimizing, or reviewing prompts for AI models. Triggers on requests like "improve this prompt", "write a system prompt", "optimize my instructions", "help me prompt engineer", "audit this prompt", "review my prompt", or when building agentic…
installing-cli-tools
Install, upgrade, configure, and verify developer CLI tools safely. Use when a user asks to install a new CLI, command-line app, SDK tool, package-manager binary, GitHub release binary, language runtime tool, or AI/vendor CLI; configure shell PATH/completions; run first login; set API keys, tokens, or env variables…
repo-activity-summary
Summarize a repository's recent engineering activity from git history — technologies, work types, churn hotspots, contributor patterns, and velocity. Use when asking "what has this repo been working on", "is this project active", "who contributes what", "where are the hotspots", or before onboarding onto an unfamiliar…
fetch-url-as-markdown
Fetch a web page (URL) and return clean Markdown via local trafilatura, with Exa MCP as a fallback for JS-rendered or anti-bot pages. Use when the user asks to read, fetch, scrape, summarize, or quote a URL — prefer this over the built-in WebFetch tool. Don't use for binary files (PDFs, images, archives) or for…