Express logo

Express

Community
dkbnull
express

Express开发专家助手。当用户需要进行Express Web开发、Node.js REST API、中间件开发或轻量级HTTP服务开发时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill nameexpress
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 Express 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/express
  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/express .claude/skills/express
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Express 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 Express 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 Express 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.

Express 开发技能

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

Node.js/JavaScript 语言层规范遵循 backend/skills/nodejs 与 languages/skills/javascript 技能,本技能仅补充 Express 框架特有约定。

技术栈强制约束

  • 使用 Express 4.18+ 版本
  • 使用 Node.js 18+ LTS 版本
  • 使用 pnpm 管理依赖,禁止混用包管理器
  • 使用 ESLint + Prettier 统一代码风格

命名规范

  • 类名:PascalCase(UserService、OrderController)
  • 函数/方法:camelCase(getUserById、createOrder)
  • 变量:camelCase(userName、orderList)
  • 常量:UPPER_SNAKE_CASE(MAX_RETRY_COUNT、DEFAULT_PORT)
  • 文件名:kebab-case(user-controller.js、order-service.js)
  • 目录名:kebab-case(user-routes、middleware)
  • 环境变量:UPPER_SNAKE_CASE(DB_HOST、REDIS_PORT)
  • 命名语义化,禁止拼音、无意义缩写

项目结构规范

  • MVC 分层架构:Controller → Service → Model
  • 推荐目录结构:
    • src/controllers/:请求处理
    • src/services/:业务逻辑
    • src/models/:数据模型
    • src/routes/:路由定义
    • src/middleware/:中间件
    • src/utils/:工具函数
    • src/config/:配置管理
    • src/validators/:参数验证
  • 分层原则:Controller → Service → Model,禁止跨层调用
  • 路由定义与业务逻辑分离,Controller 不写业务逻辑
  • 每个 Router 文件对应一个资源模块

编码规范

  • 使用 express.Router() 模块化路由
  • 中间件顺序:日志 → 认证 → 限流 → 路由 → 错误处理
  • 错误处理中间件必须放在最后:app.use(errorHandler)
  • 统一使用 async/await,禁止回调地狱
  • 异步路由必须包装错误捕获,使用高阶函数或 express-async-errors
  • 请求参数绑定:
    • JSON 请求体使用 req.body
    • 查询参数使用 req.query
    • 路径参数使用 req.params
  • 使用 joi 或 zod 进行参数验证
  • 路由使用分组(Router)组织,按资源模块划分

统一响应格式

  • 统一返回格式:{ "code": 0, "message": "操作成功", "data": {} };错误码分段规则与响应结构详见 api-design 技能。
  • 成功码固定为 0,失败使用5位分段编码(如 10001、20001)
  • 绝大部分接口返回 HTTP 200,错误通过业务码区分
  • 封装响应工具函数:success(res, data)、error(res, code, message)
  • 分页响应包含 total、page、pageSize、list 字段

安全规范

  • 使用 helmet 设置安全响应头
  • 使用 cors 配置跨域白名单,禁止使用 *
  • 使用 express-rate-limit 限流,防止接口滥用
  • 密码使用 bcrypt 加密存储,禁止明文存储
  • JWT Token 设置合理过期时间,使用 jsonwebtoken 库
  • SQL 参数化查询,防止注入
  • 输入校验和输出编码,防止 XSS
  • 文件上传限制大小和类型
  • 敏感信息禁止硬编码,通过环境变量注入

注释规范

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

格式规范

  • 统一使用 2 空格缩进,禁止 Tab
  • 单行代码长度不超过 120 字符
  • 函数体长度不超过 80 行,超过必须拆分
  • 函数参数不超过 5 个,超过使用对象解构
  • 大括号不换行,一行一条语句
  • 使用分号结尾,保持项目风格统一
  • import/require 语句按第三方库 → 本地模块分组,组间空行分隔

代码质量强制要求

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

测试规范

  • 使用 jest + supertest 进行测试
  • 单元测试文件命名:{文件名}.test.js 或 {文件名}.spec.js
  • Mock 使用 jest.fn() 和 jest.mock()
  • 覆盖率目标:核心逻辑 80%+
  • 测试内容:路由响应、中间件逻辑、Service 业务逻辑、参数验证规则

最佳实践

  • 使用 dotenv 管理环境变量
  • 使用连接池管理数据库连接
  • 优雅关闭:监听 SIGTERM/SIGINT,关闭连接后退出
  • 健康检查接口:/health
  • 使用 pm2 或 docker 部署,开启集群模式
  • 使用 winston 或 pino 日志库,禁止 console.log()
  • 日志信息必须使用中文
  • 使用 compression 中间件开启 gzip 压缩
  • 使用 http-errors 或自定义错误类统一错误处理

Frequently asked questions

What does the Express AI skill do?

Express开发专家助手。当用户需要进行Express Web开发、Node.js REST API、中间件开发或轻量级HTTP服务开发时调用。

Why use Express on TypingMind?

Because you install it once and use it with any model. Express 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 Express in TypingMind?

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

Which AI models can use Express?

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 Express?

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

Is the Express 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 👇