Community程式設計與開發github.com

mcollina/node

提供 Node.js 搭配 TypeScript 開發的領域特定最佳實踐,涵蓋類型剝離、非同步模式、錯誤處理、串流、模組、測試、效能、快取、日誌等。

node 是什麼?

此技能為 Node.js 與 TypeScript 開發提供經過認證的領域特定最佳實踐。它專注於使用 Node.js 原生的類型剝離功能(透過 `--experimental-strip-types` 標記),讓開發者能直接執行 `.ts` 檔案,無需額外的建置步驟。技能內容涵蓋廣泛,包括非同步模式、錯誤處理、串流、模組系統、測試策略、效能調校、快取機制與日誌記錄等。它支援在設定新專案、配置 `tsconfig.json` 以啟用類型剝離、或在討論 `ts-node` 替代方案等場景時提供引導,此外也處理優雅關機、處理不穩定測試與環境配置等實務問題。此技能適用於 Claude Code、Cursor 與 Codex 等 AI 代理平台,幫助開發者採用更精簡、無建置步驟的現代 Node.js 開發工作流程。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mcollina/skills/tree/main/skills/node

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

node 是做什麼的?

提供 Node.js 搭配 TypeScript 開發的領域特定最佳實踐,涵蓋類型剝離、非同步模式、錯誤處理、串流、模組、測試、效能、快取、日誌等。在設定具有原生 TypeScript 支援的 Node.js 專案、配置類型剝離 (--experimental-strip-types)、撰寫不需要建置步驟的 Node 22+ TypeScript 程式碼,或當使用者提及「Node 中的原生 TypeScript」、「類型剝離」、「Node 22 TypeScript」、「無需編譯的 .ts 檔案」、「ts-node 替代方案」,或需要 Node.js 中錯誤處理、優雅關機、不穩定測試、效能分析或環境配置的指引時使用。協助設定用於類型剝離的 tsconfig.json、配置 package.json 腳本、處理模組解析與匯入副檔名,並在整個 Node.js 技術棧中套用穩健的模式。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

mcollina/documentation

Creates, structures, and reviews technical documentation following the Diátaxis framework (tutorials, how-to guides, reference, and explanation pages). Use when a user needs to write or reorganize docs, structure a tutorial vs. a how-to guide, build reference docs or API documentation, create explanation pages, choose between Diátaxis documentation types, or improve existing documentation structure. Trigger terms include: documentation structure, Diátaxis, tutorials vs how-to guides, organize docs, user guide, reference docs, technical writing.

mcollina/fastify-best-practices

Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts.

mcollina/nodejs-core

Debugs native module crashes, optimizes V8 performance, configures node-gyp builds, writes N-API/node-addon-api bindings, and diagnoses libuv event loop issues in Node.js. Use when working with C++ addons, native modules, binding.gyp, node-gyp errors, segfaults, memory leaks in native code, V8 optimization/deoptimization, libuv thread pool tuning, N-API or NAN bindings, build system failures, or any Node.js internals below the JavaScript layer.

mcollina/typescript-magician

Designs complex generic types, refactors `any` types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing `any` types, strict typing, type errors, `infer`, `extends`, conditional types, mapped types, template literal types, branded/opaque types, or utility types like `Partial`, `Record`, `ReturnType`, and `Awaited`.

相關技能