# Send 魔盒node服务开发技能包 to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "magicbox-node-dev",
    "name": "魔盒node服务开发技能包",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/JinChunCheng123/magicbox-node-dev",
    "canonicalUrl": "https://clawhub.ai/JinChunCheng123/magicbox-node-dev",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/magicbox-node-dev",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=magicbox-node-dev",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/code-style.md",
      "references/directory-structure.md",
      "references/container-deployment.md",
      "references/config-management.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/magicbox-node-dev"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/magicbox-node-dev",
    "downloadUrl": "https://openagent3.xyz/downloads/magicbox-node-dev",
    "agentUrl": "https://openagent3.xyz/skills/magicbox-node-dev/agent",
    "manifestUrl": "https://openagent3.xyz/skills/magicbox-node-dev/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/magicbox-node-dev/agent.md"
  }
}
```
## Documentation

### 目录结构

magicbox-node/
├── src/             # 源代码目录
│   ├── config/      # 配置文件
│   ├── controllers/ # 控制器
│   ├── middleware/  # 中间件
│   ├── migrations/  # 数据库迁移
│   ├── models/      # 数据模型
│   ├── routes/      # 路由
│   ├── services/    # 业务逻辑
│   ├── utils/       # 工具函数
│   └── app.ts       # 应用入口
├── scripts/         # 脚本文件
├── servers/         # 服务器配置
├── .env.example     # 环境变量示例
├── .eslintrc.js     # ESLint 配置
├── .prettierrc      # Prettier 配置
├── Dockerfile.base  # Docker 基础镜像
├── package.json     # 项目配置
└── tsconfig.json    # TypeScript 配置

### TypeScript 规范

类型定义：使用强类型，避免 any 类型
接口命名：使用 PascalCase，如 UserInterface
类命名：使用 PascalCase，如 UserService
函数命名：使用 camelCase，如 getUser
变量命名：使用 camelCase，如 userName
常量命名：使用 UPPER_CASE，如 MAX_RETRY_COUNT

### ESLint 配置

项目使用 ESLint 进行代码质量检查，配置文件：.eslintrc.js

### Prettier 配置

项目使用 Prettier 进行代码格式化，配置文件：.prettierrc

### 环境变量

开发环境：使用 .env.develop 文件
生产环境：使用 /etc/magicbox-node/env.config.json 文件
环境变量优先级：系统环境变量 > 配置文件 > 默认值

### 配置文件结构

{
  "NODE_ENV": "production",
  "PORT": "3000",
  "HOST": "0.0.0.0",
  "DB_HOST": "database-host",
  "DB_PORT": "3306",
  "DB_DATABASE": "magicbox",
  "DB_USERNAME": "username",
  "DB_PASSWORD": "password"
}

### 数据模型

使用 TypeORM 进行数据库操作
模型文件放在 src/models/ 目录
实体命名使用 PascalCase，如 UserEntity.ts

### 数据库迁移

迁移文件放在 src/migrations/ 目录
迁移文件命名格式：YYYYMMDDHHmmss-description.ts

### Docker 配置

使用 Dockerfile.base 构建基础镜像
容器运行时环境变量通过 Kubernetes 配置
确保容器启动时目录存在：/export/Data

### 启动脚本

start.sh：容器启动脚本
scripts/deploy-manual.sh：部署时版本管理脚本

### 版本管理

使用 version.json 文件管理版本信息
版本号格式：major.minor.patch
部署时自动更新版本信息

### 路由结构

健康检查：/health
API 路由：/api/{resource}
遵循 RESTful 设计原则

### 响应格式

{
  "success": true,
  "data": {},
  "message": "操作成功"
}

### 日志规范

使用 src/utils/logger.ts 进行日志记录
日志级别：debug, info, warn, error
生产环境使用 info 级别

### 错误处理

使用统一的错误处理中间件
生产环境不返回详细错误信息
记录错误日志

### 安全规范

敏感配置使用环境变量
密码等敏感信息不硬编码
使用 HTTPS 协议
实现 CORS 配置

### 部署流程

代码提交到 Git 仓库
运行 scripts/deploy-manual.sh 更新版本
构建 Docker 镜像
部署到 Kubernetes 集群
验证服务健康状态

### 开发工具

IDE：推荐使用 VS Code
插件：ESLint, Prettier, TypeScript
包管理器：npm
构建工具：TypeScript compiler (tsc)

### 代码审查

提交代码前运行 npm run lint
提交代码前运行 npm run build
代码审查关注：类型定义、错误处理、安全隐患

### 性能优化

使用 TypeScript 编译优化
数据库查询优化
缓存策略
合理使用中间件

### 监控与告警

实现健康检查端点
监控服务运行状态
配置适当的告警机制

### 最佳实践

模块化：将功能拆分为小模块
可测试性：编写可测试的代码
文档：为关键功能添加注释
一致性：保持代码风格一致
安全性：优先考虑安全问题
性能：关注代码性能
可维护性：编写易于维护的代码
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: JinChunCheng123
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/magicbox-node-dev)
- [Send to Agent page](https://openagent3.xyz/skills/magicbox-node-dev/agent)
- [JSON manifest](https://openagent3.xyz/skills/magicbox-node-dev/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/magicbox-node-dev/agent.md)
- [Download page](https://openagent3.xyz/downloads/magicbox-node-dev)