OpenParable
Skip to content
← Back to skills

Bk Monitor Dev Server

Development
bk-monitor-dev-server

Bk Monitor Dev Server is an Agent Skill for development published in the TencentBlueKing/bk-bcs repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

帮助配置和启动本地开发服务器。当用户提到启动开发服务器、dev server、pnpm dev 时使用。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/TencentBlueKing/bk-bcs/blob/HEAD/bcs-services/bcs-project-manager/.cursor/skills/bk-monitor-dev-server/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/bk-monitor-dev-server, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

本地开发服务器配置

工作流程

Step 0: 检查配置(优先)

node .cursor/skills/dev-server/scripts/setup-config.js
  • CONFIG_VALID → 跳到 Step 5
  • CONFIG_INVALID:* → 需配置,向用户索要 URL/Cookie/Token

Step 1-4: 环境配置

  1. 环境检查:bash .cursor/skills/dev-server/scripts/check-env.sh
  2. 安装依赖:pnpm i
  3. 生成配置(详见 config-guide.md)
  4. 配置 hosts

Step 5: 启动服务

  • monitor-pc: make dev-pc
  • trace (Vue3): make dev-vue3

Step 6: 验证

等待 Compiled successfully,访问 http://appdev.xxx.com:7001


常见问题速查

问题可能原因解决方案
端口被占用其他进程占用 7001服务会自动换端口
API 401/403Cookie/Token 过期重新获取 Cookie 和 X-CSRFToken
API 连接失败代理配置错误检查 devProxyUrl
页面空白hosts 未配置添加 hosts 映射
依赖安装失败未使用 pnpm使用 pnpm i

详细排查见 references/troubleshooting.md


📦 可用资源

  • skill://bk-monitor-dev-server/references/config-guide.md
  • skill://bk-monitor-dev-server/references/troubleshooting.md
  • skill://bk-monitor-dev-server/scripts/check-env.sh
  • skill://bk-monitor-dev-server/scripts/setup-config.js

📦 可用资源

  • skill://bk-monitor-dev-server/scripts/check-env.sh
  • skill://bk-monitor-dev-server/scripts/generate-config.js
  • skill://bk-monitor-dev-server/scripts/setup-config.js
  • skill://bk-monitor-dev-server/references/config-guide.md
  • skill://bk-monitor-dev-server/references/troubleshooting.md

根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载