Nodejs logo

Nodejs

Community
dkbnull
nodejs

Node.js开发专家助手。当用户需要进行Node.js语言与运行时开发、Koa框架、REST API或服务端JavaScript应用开发时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill namenodejs
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Nodejs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/backend/skills/nodejs
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/backend/skills/nodejs .claude/skills/nodejs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nodejs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nodejs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nodejs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Node.js 开发技能

你是一位资深 Node.js 开发工程师。在协助 Node.js 项目时,请遵循以下规范。

Express 框架规范遵循 express 技能,本技能覆盖 Node.js 语言/运行时层与 Koa 框架规范。

技术栈强制约束

  • 使用 Node.js 18+ LTS 版本
  • 使用 ES Modules("type": "module"),或 CommonJS 保持项目统一
  • 包管理使用 pnpm 优先,npm 次之,禁止混用
  • 代码风格使用 ESLint + Prettier 统一管理

package.json 与依赖管理

  • name、version、type、main/exports、scripts 字段必须完整准确
  • lockfile(pnpm-lock.yaml / package-lock.json)必须提交仓库,禁止手动修改
  • 依赖区分 dependencies 与 devDependencies,构建、测试、lint 工具放入 devDependencies
  • 新增依赖前评估必要性,优先使用 Node.js 内置模块(fs、path、crypto、node:test 等)
  • 定期执行 pnpm audit / npm audit,禁止引入存在已知高危漏洞的依赖版本
  • 及时移除不再使用的依赖

npm scripts 规范

  • 常用命令统一收敛到 scripts:dev(开发启动)、start(生产启动)、test、lint
  • 启动参数、构建参数写入 scripts,禁止在文档中要求手工执行长命令
  • 脚本需跨平台时避免直接依赖 Unix shell 语法,必要时使用 cross-env、shx

命名与文件规范

  • 文件名:小写 + 短横线分隔(user-service.js、order-handler.js)
  • 类名:PascalCase(UserService、OrderController)
  • 函数/变量:camelCase(getUserById、userName)
  • 常量:UPPER_SNAKE_CASE(MAX_RETRY_COUNT、DEFAULT_PORT)
  • 环境变量:UPPER_SNAKE_CASE(DB_HOST、REDIS_PORT)
  • 目录命名:小写 + 短横线分隔(user-service、middleware)
  • 命名语义化,禁止拼音、无意义缩写

Koa 框架规范

  • 使用 koa-router 管理路由
  • 理解洋葱模型:中间件按注册顺序"进入"、按逆序"离开",await next() 之后的代码在下游执行完后运行
  • 中间件必须是 async 函数:await next() 之前处理请求,之后处理响应(记录耗时、统一响应头等)
  • 错误处理:最外层中间件 try/catch 包裹 await next() 捕获下游错误,并使用 app.on('error') 全局兜底
  • 请求体解析使用 koa-bodyparser,文件上传使用 @koa/multer
  • 中间件间传递请求级数据使用 ctx.state,禁止使用全局变量

异步编程与运行时规范

  • 统一使用 async/await,禁止回调地狱
  • Promise 链必须包含 .catch() 或使用 try/catch
  • 并发请求使用 Promise.all() / Promise.allSettled()
  • 理解事件循环执行阶段(timers → poll → check),请求处理中禁止执行长时间同步计算,避免阻塞所有连接
  • CPU 密集型任务使用 Worker Threads 或子进程,禁止阻塞事件循环
  • 大文件与大数据量处理使用 Stream(pipe / pipeline),禁止一次性读入内存
  • 文件操作使用 fs/promises 异步 API,禁止同步方法
  • 可取消的异步操作使用 AbortController / AbortSignal
  • 优雅关闭:监听 SIGTERM/SIGINT,停止接收新请求并关闭连接后退出

Node 全局安全

  • 环境变量通过 process.env 读取;.env 必须加入 .gitignore,提供 .env.example 模板
  • child_process 执行外部命令禁止拼接用户输入,使用 execFile / spawn 参数数组形式,防止命令注入
  • 禁止用 eval、new Function、vm 执行未信任输入
  • 监听 process.on('uncaughtException') 记录日志后优雅退出,避免异常丢失现场

注释规范

  • 所有注释、提示文案使用中文
  • 模块顶部必须加中文说明注释,描述模块职责
  • 函数必须有中文 JSDoc 注释,包含功能说明、@param、@returns、@throws
  • 复杂逻辑、循环判断加行内注释说明意图
  • TODO 注释格式:// TODO: [作者] 具体待办事项描述
  • 禁止无意义注释,注释必须与代码保持同步

格式规范

  • 缩进规范:.js 文件 2 空格,禁止 Tab
  • 单行代码长度不超过 120 字符
  • 函数体长度不超过 80 行,超过必须拆分
  • 函数参数不超过 5 个,超过使用对象解构
  • 大括号不换行,一行一条语句
  • 使用分号结尾,保持项目风格统一

接口与返回值规范

  • 统一响应结构:封装统一的响应工具函数(或最外层响应中间件)输出 code、message、data 结构
  • 成功码固定为 0,失败使用5位分段编码(如 10001、20001),绝大部分接口返回 HTTP 200
  • 错误码分段规则与响应结构详见 common/skills/api-design 技能
  • 错误由最外层 try/catch 中间件统一转换为该响应结构,禁止各路由自行拼装错误格式

代码质量强制要求

  • 禁止空指针:所有可能为 null/undefined 的值必须判空,禁止信任外部输入
  • 禁止魔法值:代码中不允许出现未解释的硬编码常量,必须定义为命名常量
  • 禁止使用 == 比较,统一使用 === 严格相等
  • 集合操作前必须判空,使用 Array.isArray() + .length
  • 异步操作必须处理错误状态,禁止忽略 Promise rejection
  • 禁止在循环中执行数据库操作,使用批量方法
  • 环境变量通过 dotenv 加载,敏感信息禁止硬编码
  • 未处理的 Promise rejection 必须监听:process.on('unhandledRejection')

Frequently asked questions

What does the Nodejs AI skill do?

Node.js开发专家助手。当用户需要进行Node.js语言与运行时开发、Koa框架、REST API或服务端JavaScript应用开发时调用。

Why use Nodejs on TypingMind?

Because you install it once and use it with any model. Nodejs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nodejs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/backend/skills/nodejs. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Nodejs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nodejs?

As many as you like. As long as a model supports skills, you can use Nodejs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nodejs AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇