js-conventions

js-conventions is a skill for Claude Code, Codex from metarhia/metaskills. It costs 50 tokens per session (921 once invoked), scanned A, original, MIT.

JavaScript and TypeScript code-style rules for projects using the Metarhia style. They cover formatting, naming, linting, testing, and the package settings needed to enforce those rules.

In plain words
What is it for?
Writing or editing JavaScript and TypeScript, configuring ESLint and Prettier, checking formatting, fixing style issues, and running lint and tests.
Why use it?
They give contributors and coding assistants the same expectations for readable code. Automated lint and test commands help find style and behavior problems before changes are shared.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Writing or editing JavaScript and TypeScript, configuring ESLint and Prettier, checking formatting, fixing style issues, and running lint and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metarhia/metaskills/js-conventions
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 metarhia/metaskills --skill js-conventions
Clone the repo
git clone --depth 1 https://github.com/metarhia/metaskills

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 js-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/metarhia/metaskills/js-conventions/github.svg)](https://agentmods.dev/skills/metarhia/metaskills/js-conventions)
Your own site
<a href="https://agentmods.dev/skills/metarhia/metaskills/js-conventions"><img src="https://agentmods.dev/badge/skills/metarhia/metaskills/js-conventions/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 js-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/metarhia/metaskills/js-conventions"><img src="https://agentmods.dev/badge/skills/metarhia/metaskills/js-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 921 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.
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.00050 $0.00921
Opus 5.5 $0.00020 $0.00368
Sonnet 5.5 $0.00010 $0.00184
Haiku 4.5 $0.00005 $0.00092

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

Security

Grade A, and why

js-conventions 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 1mo 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.

skills/js-conventions/SKILL.md · 82 lines

How it starts

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

JavaScript Code Style

Use following conventions for JavaScript and TypeScript code.

Preparations

  • Add to dev dependencies in package.json if not added:
    • eslint-config-metarhia
    • eslint, prettier
  • Add scripts in package.json if not added:
    • "lint": "eslint . && prettier --check "/*.js" "/.json" "**/.md" "*/.ts""
    • "fix": "eslint . --fix && prettier --write "/*.js" "/.json" "**/.md" "*/.ts""
  • Before and after code analysis with AI run npm run lint and npm t
  • Use npm run fix if errors/warnings detected to auto-fix when possible

Formatting

  • Use single quotes and semicolons
  • Keep max line length 80 (ignore URLs)
  • Use trailing commas in multiline arrays, objects, and params
  • Keep one empty line between semantic blocks
  • Follow Prettier and eslint-config-metarhia for spacing, braces, and indentation

Naming

  • Use camelCase for variables and parameters
  • Use UpperCamelCase for classes and types
  • Use UPPER_SNAKE_CASE for constants
  • Use new with capitalized constructor names
  • Use error in catch blocks, not err
  • Use short names (e, i) only in short one-line callbacks
  • Use descriptive names in multiline callbacks (event, index, item)
  • Use boolean prefixes: is, has, can, should
  • Use singular names for entities and plural names for collections
  • Use verb names for functions and handlers (parse, create, handle, on)
  • Include units in numeric names (timeoutMs, sizeBytes) except options

Best practices

  • Prefer const, minimize let, never use var
  • Prefer arrow functions (except prototype/class methods)
  • Do not mutate input parameters; avoid arguments
  • Keep functions small and single-purpose
  • Decompose long expressions into intermediate variables
  • Prefer explicit loops (for, for..of) in hot paths
  • Use array methods when they improve readability
  • Use === and !== only
  • Keep return types consistent
  • Avoid nested ternaries and deep callback nesting
  • Self-documented and self-descriptive code: do not add obvious comments, code should be clear without comments
  • Use iteration methods like .map, .filter, .reduce if it is good for code semantic
  • Try to avoid .forEach if callback operates with outer context

Read the full file on GitHub · 82 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. 1mo ago First seen · 82 lines · 50 tokens per session scan A 7141d84cff59

Subscribe to this mod's changes

js-conventions is a skill published in the GitHub repository metarhia/metaskills (59 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 921 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

autovault-skill

Understand AutoVault-managed skills and how to install or update them. Use when a skill is visible via symlink, when authoring or editing SKILL.md, or before touching /.autovault/skills. Vault writes must go through autovault add-local or MCP proposeskill/updateskill so AutoVault re-signs; never hand-edit vaulted…

autoworks-ai/autovault · 84 tokens

typescript

TypeScript coding conventions, best practices, and patterns for writing clean, maintainable code.

genkit-ai/genkit · 20 tokens

senior-frontend

Frontend development for React 19, Next.js 15, TypeScript, and Tailwind CSS v4 / Pengembangan frontend dengan React 19, Next.js 15, TypeScript, dan Tailwind CSS v4.

roedyrustam/vibes-plug · 50 tokens

js-backend-expert

Expert-level skill for Node.js 24+ (LTS), Bun 1.2+, and Deno 2.x backend development. Covers Express 5, Fastify 5, Hono v4, NestJS, Prisma 6, Drizzle ORM, WebSockets, BullMQ, OpenTelemetry, and microservices in English and Indonesian.

roedyrustam/vibes-plug · 77 tokens

typescript-expert

Expert guide for TypeScript 5.8+ advanced type system, strict mode, generics, utility types, branded types, inferred type predicates, isolated declarations, and type-safe architectural patterns / Panduan ahli untuk sistem tipe TypeScript 5.8+, mode strict, generics, utility types, branded types, inferred type…

roedyrustam/vibes-plug · 83 tokens

bun-runtime-expert

Expert guide for Bun 1.2+ JavaScript/TypeScript runtime — native Bun.sql Postgres client, Bun.s3 object storage, text lockfile, multi-core HTTP clusters, and bun:test / Panduan ahli runtime Bun 1.2+.

roedyrustam/vibes-plug · 57 tokens