Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

javascript

/javascript

Stosuje opiniotwórcze konwencje JavaScript i Node: pakowanie ESM, wybór kombinatorów Promise, obsługa błędów bez połykania awarii, AbortController do anulowania, nieblokowanie pętli zdarzeń i API platformy przed zależnościami.

Licencja
MIT
Ostatnia zmiana repozytorium
23.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 23.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Stosuje opiniotwórcze konwencje JavaScript i Node: pakowanie ESM, wybór kombinatorów Promise, obsługa błędów bez połykania awarii, AbortController do anulowania, nieblokowanie pętli zdarzeń i API platformy przed zależnościami.

Oryginalny opis (EN)

Apply these opinionated JavaScript conventions whenever writing or reviewing JS or Node: ESM-first packaging, choosing between Promise combinators, error handling that doesn't swallow failures, AbortController for cancellation, keeping the event loop unblocked, and reaching for platform APIs before dependencies.

Jak działa

  1. Conventions
  2. Publishing a package
Sekcje z nagłówków SKILL.md, w oryginale · 33 linii, 430 słów
Podgląd SKILL.md
---
name: javascript
description: "Apply these opinionated JavaScript conventions whenever writing or reviewing JS or Node: ESM-first packaging, choosing between Promise combinators, error handling that doesn't swallow failures, AbortController for cancellation, keeping the event loop unblocked, and reaching for platform APIs before dependencies."
---

# JavaScript

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.

## Conventions

- **ESM everywhere.** New packages get `"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.
- **Match the combinator to the intent.** Sequential `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.
- **Every `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.
- **Never block the event loop.** No `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.
- **Don't mutate arguments.** A function that edits its input changes the caller's object with no assignment in sight. Return new values — and reach for the non-mutating array methods that exist for exactly this: `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.
- **Reach for the platform before a dependency.** `structuredClone`, `Intl`, `URL`/`URLSearchParams`, `crypto.randomUUID`, `Array.prototype.at`/`findLast`, `Object.groupBy` cover most of what utility libraries were installed for.

## Publishing a package

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.

```json
{
  "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.

Wersje

RepozytoriumWynikLicencja
Ta strona · alexander-danilenko/cortex-claude-code-plugins100MIT
workbench-soft/agent-skills100MIT
DaraBoth/skilljmskill100MIT
claude-dev-suite/claude-dev-suite100MIT
G1Joshi/Agent-Skills100MIT
aj-geddes/unicorn-team100MIT
autocss-com/ai90MIT
clawic/skills90MIT
dkbnull/hello-skill86MIT

Migawka bazy z 13.11.2026 · wersja paczki 64a6f7c1a838 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100node-modern
    Pisze, przegląda i refaktoryzuje kod Node.js na aktualnym wydaniu: moduły ESM, przepływ asynchroniczny, anulowanie, operacje na plikach i procesach oraz HTTP.
  • 95async-patterns
    Wskazuje błędy w kodzie asynchronicznym w JavaScript, Pythonie, Go i Rust, takie jak wyścigi, brak obsługi błędów i brak anulowania.
  • 100javascript-pro
    Pisze, debuguje i refaktoryzuje JavaScript ES2023+, z async/await, modułami ESM i Node.js, także Web Workers i Fetch API.
  • 100javascript-pro
    Pisze, debuguje i refaktoryzuje kod JavaScript z funkcjami ES2023+, async/await, modułami ESM i API Node.js, w tym optymalizacja wydajności, Web Workers i Fetch API.
  • 91node
    Wspiera tworzenie aplikacji w Node.js: pętla zdarzeń, moduły CommonJS i ESM, moduły podstawowe, wzorce asynchroniczne, diagnostyka, obsługa błędów i integracja z TypeScript.
  • 100javascript-ops
    Obejmuje wzorce JavaScript i Node.js: programowanie asynchroniczne, moduły, wnętrza środowiska uruchomieniowego, V8, worker threads, strumienie, event emitter, prototypy i domknięcia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.