custom-environment-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCustom Environment Setup
自定义环境设置
Purpose
用途
This is a project-specific custom skill called by generic workflow skills at defined checkpoints.
It provides environment configuration specific to this project (claudecode_webui).
Generic workflow skills invoke this skill if it exists; if absent, the workflow continues without project-specific environment setup.
这是一个项目专属的自定义skill,会在指定检查点被通用工作流skill调用。
它提供当前项目(claudecode_webui)的专属环境配置。
如果该skill存在,通用工作流skill就会调用它;如果不存在,工作流会跳过项目专属环境设置环节继续执行。
Input
输入
- (from $1 argument): The issue number being worked on
issue_number
- (来自$1参数):正在处理的Issue编号
issue_number
Output
输出
When invoked, this skill should set the following environment variables/context for the caller:
调用该skill时,它需要为调用方设置以下环境变量/上下文:
Port Calculation
端口计算
- Backend Port = 8000 + (issue_number % 1000)
- Vite Port = 5000 + (issue_number % 1000)
Examples:
- Issue #42 -> Backend: 8042, Vite: 5042
- Issue #372 -> Backend: 8372, Vite: 5372
- Issue #1234 -> Backend: 8234, Vite: 5234
- 后端端口 = 8000 + (issue_number % 1000)
- Vite端口 = 5000 + (issue_number % 1000)
示例:
- Issue #42 -> 后端:8042,Vite:5042
- Issue #372 -> 后端:8372,Vite:5372
- Issue #1234 -> 后端:8234,Vite:5234
Initialization Context Fragment
初始化上下文片段
Return this context fragment for inclusion in minion initialization:
Test Server Configuration:
- Backend Port: ${BACKEND_PORT} (8000 + issue_number % 1000)
- Vite Port: ${VITE_PORT} (5000 + issue_number % 1000)
- Data Directory: Default (data/) - DO NOT use --data-dir flag返回该上下文片段用于minion初始化:
Test Server Configuration:
- Backend Port: ${BACKEND_PORT} (8000 + issue_number % 1000)
- Vite Port: ${VITE_PORT} (5000 + issue_number % 1000)
- Data Directory: Default (data/) - DO NOT use --data-dir flagStatus Display Context
状态显示上下文
For , provide:
/status_workers- Port range info: Backend ports 8000-8999, Vite ports 5000-5999
- How to check running servers:
bash
# Check backend ports lsof -i :8000-8999 2>/dev/null | grep LISTEN # Check vite ports lsof -i :5000-5999 2>/dev/null | grep LISTEN
针对 提供以下内容:
/status_workers- 端口范围信息:后端端口8000-8999,Vite端口5000-5999
- 检查运行中服务器的方法:
bash
# Check backend ports lsof -i :8000-8999 2>/dev/null | grep LISTEN # Check vite ports lsof -i :5000-5999 2>/dev/null | grep LISTEN
Usage by Generic Skills
通用skill的调用方式
Generic workflow skills call this skill like:
Invoke custom-environment-setup skill with issue_number=$1The skill returns port configuration and any project-specific init context.
If this skill does not exist, the generic workflow proceeds without port/environment configuration.
通用工作流skill会按如下方式调用该skill:
Invoke custom-environment-setup skill with issue_number=$1该skill会返回端口配置和所有项目专属的初始化上下文。
如果不存在该skill,通用工作流会跳过端口/环境配置继续执行。