/cortex-web:javascriptfrom cortex-web
Applies opinionated modern JavaScript and Node conventions: ESM-first packaging, Promise combinator selection, error handling, AbortController cancellation, event-loop safety, and platform APIs over dependencies.
Ships in cortex-web. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
House conventions for modern JavaScript and Node. Apply them to code you are writing or changing — don't refactor untouched files to match unless asked.
"type": "module". Mixing CJS and ESM inside one package produces the dual-package hazard — two copies of a module with separate state, failing in ways that read like race conditions.await in a loop serialises independent work; Promise.all drops the whole batch on one rejection; allSettled is for when partial success is acceptable. The wrong choice is a latency bug or a swallowed-error bug, and both look fine in review.catch handles or rethrows. A catch that logs and continues converts a failure into corrupt state further downstream, where the stack trace no longer points at the cause. If there is nothing useful to do, don't catch.AbortController for anything cancellable — fetches, timers, streams, listeners ({ signal }). Without it an abandoned request keeps its handler and its closure alive.readFileSync, no long synchronous parse or crypto on a request path: Node serves every other request from that thread. CPU-bound work goes to a worker thread.toSorted, toReversed, toSpliced, with. arr.sort() sorting the caller's array in place is one of the most common accidental mutations in JS.node: prefix on builtins. Unambiguous, and immune to shadowing by a userland package of the same name.structuredClone, Intl, URL/URLSearchParams, crypto.randomUUID, Array.prototype.at/findLast, Object.groupBy cover most of what utility libraries were installed for.The exports map is the public surface — anything not listed is unreachable, which is the point: it lets you refactor internals without breaking consumers. Declare sideEffects: false (or list the files that have them) so bundlers can drop unused exports; without it, tree shaking has to assume importing your module does something and keeps all of it.
{
"type": "module",
"exports": {
".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
"./package.json": "./package.json"
},
"sideEffects": false
}
Two ESM facts that cost the most time when they bite: relative imports need the file extension (./utils.js, not ./utils), and there is no __dirname — derive it with fileURLToPath(import.meta.url), or createRequire(import.meta.url) when you genuinely need to load a CJS-only package.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub alexander-danilenko/cortex-claude-code-plugins --plugin cortex-web5 skills in this plugin
/nestjsOpinionated house conventions for NestJS backends — module boundaries and layering, provider wiring and injection scopes, guards/interceptors/pipes/filters, DTOs and validation, domain exceptions, config, and the Nest 11 / Express 5 behaviour that compiles cleanly and fails at runtime. Use whenever the code is NestJS (`@nestjs/*` in package.json, or `@Module`/`@Injectable`/`@Controller`/`@Cron` in the file), including when the question sounds like plain TypeScript, an OOP refactor, a code review, or an ops problem — the Nest-specific answer differs from the generic one. Typical asks: scaffolding a module, adding a controller, provider, or endpoint, wiring an enhancer, a boot-time DI or circular-import failure, a response leaking entity fields despite `@Exclude()`, a cron job firing on every replica, upgrading NestJS, or reviewing a Nest diff. Not for plain Express or Fastify, Angular, frontend, SQL, or CI./nextjsApply these opinionated Next.js conventions whenever writing or reviewing App Router code (14+): Server Components by default, where the 'use client' boundary belongs, the caching defaults that changed in Next 15, tag-based revalidation, treating Server Actions as public endpoints, the Metadata API, and next/image and next/font./reactApply these opinionated React conventions when writing React 18+ or 19 components: hooks patterns, Server Components, Suspense boundaries, state management, performance memoization, React 19 features (use, form actions)./typescriptApply these opinionated TypeScript conventions whenever writing or reviewing TypeScript: branded types for domain modeling, discriminated unions for state, `satisfies` over `as`, const objects instead of enums, type-only imports, and the strict tsconfig baseline beyond `strict: true`. Also use for monorepo project references and incremental build setup.Other plugins' skills for the same job