JavaScript/Node.js tooling conventions. Use when working on JS/TS files, package.json, or Node.js projects. Enforce pnpm for package management. NOT for Python projects, backend-only work, or shell scripts.
Apply these conventions when JavaScript, TypeScript, Node.js tooling, or
package.json is the primary workstream.
| $ARGUMENTS | Action |
|------------|--------|
| Active (auto-invoked when JS/TS work is primary) | Apply the operator contract below |
| Empty | Display the convention summary and routing guidance |
| check | Verify tooling compliance only |
| File | Purpose | When to Read |
|------|---------|--------------|
| references/tooling-contract.md | Required package-manager, command, CI, workspace, and package-root rules | Package commands, scripts, dependencies, lockfiles, or CI |
| references/redirection-boundaries.md | When JS/TS conventions should yield to Python, shell, CI, or framework-specific skills | Mixed-language or ambiguous work |
| references/edge-cases.md | Exception gates for npm/yarn, Corepack, generated apps, and migrations | Deviations from pnpm defaults |
| references/typescript-patterns.md | TypeScript config, narrowing, type guards, unions, and type-test patterns | TypeScript code or tsconfig.json |
| references/eslint-prettier.md | ESLint flat config, typed linting, and Prettier separation | Linting or formatting changes |
package.json are the primary surface of the task.references/redirection-boundaries.md when JS/TS appears alongside Python, shell, CI, or framework-specific work.references/tooling-contract.md for package management, package-root selection, command execution, lockfiles, workspaces, and CI installs.references/edge-cases.md before recommending npm, yarn, global package managers, Corepack assumptions, or lockfile migrations.references/typescript-patterns.md for TypeScript config or type-safety changes.references/eslint-prettier.md for linting, typed linting, or formatting changes.pnpm, packageManager, pnpm-lock.yaml, pnpm install --frozen-lockfile, pnpm exec, pnpm dlx, tsc --noEmit, eslint, and prettier.checkpnpm, packageManager, pnpm-lock.yaml, workspace config, scripts, tsconfig.json, ESLint flat config, and Prettier.references/edge-cases.md.npm install, npx, or ad hoc global binaries unless an exception is documented.pnpm for JS/TS package operations unless an exception is documented.package.json and its packageManager field.pnpm-lock.yaml; never mix lockfiles in one package root without a migration plan.pnpm install; use pnpm install --frozen-lockfile in CI.pnpm add <pkg> or pnpm add -D <pkg> from the owning package root.pnpm exec <cmd>; use pnpm dlx <pkg> only for one-off registry execution.pnpm run <script> or pnpm --filter <pkg> run <script>.pnpm exec tsc --noEmit or the repo's package script.When starting new JS/TS work and no stronger local constraint exists, prefer
these tools. These are defaults, not absolute law; check
references/edge-cases.md before overriding an established project choice.
| Purpose | Tool | Notes |
|---------|------|-------|
| Package manager | pnpm | Pin through packageManager when the package root owns package.json |
| Bundler | vite or esbuild | Respect framework-owned builders first |
| Linting | eslint | Use flat config for new setup |
| Formatting | prettier | Keep formatting separate from linting |
| Testing | vitest or framework-native runner | Prefer existing repo scripts |
| Type checking | tsc --noEmit | Run through pnpm exec or package scripts |
unknown over any; do not weaken established strictness to make code compile.interface for object shapes and type for unions, intersections, and mapped types.as const and satisfies to preserve literal inference without unsafe assertions.as); prefer type guards, assertion functions, and schema validation at boundaries.strict in new TypeScript projects and add stricter options when the repo can absorb them.@ts-expect-error or a type-test tool when type contracts are public.references/typescript-patterns.md for TSConfig, module-resolution, and narrowing patterns.pnpm for JS/TS dependency changes unless references/edge-cases.md justifies npm, yarn, or another manager.pnpm-lock.yaml, package-lock.json, and yarn.lock in the same package root outside a dedicated migration.pnpm install --frozen-lockfile when a pnpm-lock.yaml is present.pnpm exec for local binaries and pnpm dlx only for one-off packages fetched from the registry.references/edge-cases.md before recommending Corepack setup.references/redirection-boundaries.md instead of force-fitting this skill onto the whole task.references/redirection-boundaries.md.check, references/tooling-contract.md, and references/edge-cases.md to separate hard violations from documented transition paths.references/tooling-contract.md first for command, dependency, package-root, workspace, lockfile, or CI questions.references/redirection-boundaries.md when Python, shell, CI, infra, or framework-specific work is mixed into the request.references/edge-cases.md only when the task appears to require npm, yarn, Corepack setup, generated app scaffolding, or lockfile migration exceptions.references/typescript-patterns.md only when TypeScript code, tsconfig.json, public types, or type tests are active.references/eslint-prettier.md only when the task touches linting, typed linting, or formatting.IS for: JS/TS tooling conventions, Node package commands, dependency-management rules, TypeScript type-safety defaults, lint/format/test command guidance, and exception-aware repo guidance.
NOT for: Python conventions, shell conventions, CI pipeline design, framework architecture, backend-only implementation strategy, or broad frontend UX/design guidance.
Canonical terms (use these exactly):
pnpm -- the required package manager for JS/TS package operationspackage root -- the nearest directory whose package.json owns the command or dependencypackageManager -- the package.json field that pins the package manager and versionpnpm-lock.yaml -- the canonical JS/TS lockfile for pnpm package rootsworkspace -- pnpm workspace declared by pnpm-workspace.yamlfrozen-lockfile -- CI install mode that prevents lockfile mutationpnpm exec -- local project binary executionpnpm dlx -- one-off package execution from the registryRun from this skill directory before declaring changes complete:
python scripts/check.py
git diff --check
Completion criteria:
scripts/check.py exits 0.git diff --check exits 0.After changing skill definitions, public descriptions, reference files, or eval behavior, invoke docs-steward if available.
npx skills add wyattowalsh/javascript-conventions下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer