remote-work
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRemote Work Skill
远程工作技能
Execute amplihack tasks on remote Azure VMs using the command.
/amplihack:remote使用命令在远程Azure VM上执行amplihack任务。
/amplihack:remoteWhen to Use
使用场景
Use this skill when you want to:
- Run long-running tasks on remote VMs
- Leverage more powerful Azure compute
- Distribute work across multiple machines
- Isolate experimental or risky work
- Work in specific Azure regions
当你需要以下操作时,可使用此技能:
- 在远程VM上运行耗时较长的任务
- 利用更强大的Azure计算资源
- 在多台机器上分配工作负载
- 隔离实验性或有风险的工作
- 在特定Azure区域中工作
How It Works
工作原理
When you say things like:
- "Run this remotely"
- "Execute on an eastus VM"
- "Offload this to Azure"
- "Use a remote machine for this"
I will:
- Extract your task description
- Detect region preferences (if mentioned)
- Recommend appropriate VM size based on task complexity
- Execute with proper options
/amplihack:remote - Guide you on accessing results
当你说出类似以下内容时:
- "远程运行此任务"
- "在eastus的VM上执行"
- "将此任务卸载到Azure"
- "使用远程机器处理此任务"
我会:
- 提取你的任务描述
- 检测区域偏好(如果有提及)
- 根据任务复杂度推荐合适的VM规格
- 使用正确的选项执行
/amplihack:remote - 指导你如何访问结果
Region Detection
区域检测
I automatically detect Azure regions from your request:
- "eastus", "east us" → --region eastus
- "westus", "west us" → --region westus
- "centralus" → --region centralus
- (and other Azure regions)
我会自动从你的请求中检测Azure区域:
- "eastus", "east us" → --region eastus
- "westus", "west us" → --region westus
- "centralus" → --region centralus
- (以及其他Azure区域)
VM Size Recommendations
VM规格推荐
Based on your task complexity keywords:
Small (size s): Quick analysis, simple fixes
- Keywords: "quick", "simple", "small", "analyze"
- Size: s (8GB RAM)
Medium (size m): Standard development work
- Keywords: "implement", "feature", "refactor"
- Size: m (64GB RAM) - default
Large (size l): Complex refactoring, large codebases
- Keywords: "large", "comprehensive", "complex", "entire codebase"
- Size: l (128GB RAM)
Extra Large (size xl): Intensive compute tasks
- Keywords: "intensive", "heavy", "massive"
- Size: xl (256GB RAM)
根据任务复杂度关键词:
小型(规格s):快速分析、简单修复
- 关键词:"quick", "simple", "small", "analyze"
- 规格:s (8GB RAM)
中型(规格m):标准开发工作
- 关键词:"implement", "feature", "refactor"
- 规格:m (64GB RAM) - 默认
大型(规格l):复杂重构、大型代码库
- 关键词:"large", "comprehensive", "complex", "entire codebase"
- 规格:l (128GB RAM)
超大型(规格xl):密集型计算任务
- 关键词:"intensive", "heavy", "massive"
- 规格:xl (256GB RAM)
Instructions
操作步骤
When activated:
-
Parse the user's request to extract:
- The task description
- Region preference (if mentioned)
- Complexity hints for VM sizing
-
Determine VM size based on keywords:
- Default to "m" unless keywords suggest otherwise
- Use "s" for simple/quick tasks
- Use "l" for large/complex tasks
- Use "xl" for intensive/massive tasks
-
Construct the command:
/amplihack:remote --region {region} --vm-size {size} auto "{task}"If no region mentioned, omit --region (uses azlin default) -
Execute the command using the SlashCommand tool
-
Guide the user on next steps:
- Results will be in
~/.amplihack/.claude/runtime/logs/remote/ - Git branches in namespace
remote-exec/ - How to view logs and integrate changes
- Results will be in
激活技能后:
-
解析用户请求以提取:
- 任务描述
- 区域偏好(如果提及)
- 用于VM规格选择的复杂度提示
-
根据关键词确定VM规格:
- 默认使用"m",除非关键词提示其他规格
- 简单/快速任务使用"s"
- 大型/复杂任务使用"l"
- 密集型/大规模任务使用"xl"
-
构造命令:
/amplihack:remote --region {region} --vm-size {size} auto "{task}"如果未提及区域,则省略--region(使用azlin默认值) -
使用SlashCommand工具执行命令
-
指导用户后续步骤:
- 结果将存储在
~/.amplihack/.claude/runtime/logs/remote/ - Git分支位于命名空间下
remote-exec/ - 如何查看日志和整合更改
- 结果将存储在
Examples
示例
Example 1: Simple with Region
示例1:指定区域的简单任务
User: "Run this analysis remotely on an eastus VM"
Your Response:
I'll execute this analysis on a remote Azure VM in eastus.
Detected:
- Task: analysis work
- Region: eastus
- Size: s (small - suitable for analysis)
Executing: /amplihack:remote --region eastus --vm-size s auto "analysis work"Then use SlashCommand tool to execute it.
用户:"在eastus的VM上远程运行此分析"
你的回复:
我将在eastus区域的远程Azure VM上执行此分析任务。
检测到:
- 任务:分析工作
- 区域:eastus
- 规格:s(小型 - 适合分析任务)
正在执行:/amplihack:remote --region eastus --vm-size s auto "分析工作"然后使用SlashCommand工具执行该命令。
Example 2: Large Refactoring
示例2:大型重构任务
User: "I need to offload this comprehensive refactoring to Azure, use westus2"
Your Response:
I'll execute this comprehensive refactoring on a remote Azure VM in westus2.
Detected:
- Task: comprehensive refactoring
- Region: westus2
- Size: l (large - for comprehensive work)
Executing: /amplihack:remote --region westus2 --vm-size l auto "comprehensive refactoring"用户:"我需要将这个全面的重构任务卸载到Azure,使用westus2"
你的回复:
我将在westus2区域的远程Azure VM上执行这个全面的重构任务。
检测到:
- 任务:全面重构
- 区域:westus2
- 规格:l(大型 - 适用于全面工作)
正在执行:/amplihack:remote --region westus2 --vm-size l auto "全面重构"Example 3: No Region Specified
示例3:未指定区域
User: "Run this remotely"
Your Response:
I'll execute this task on a remote Azure VM using your default region.
Detected:
- Task: [extract from context]
- Region: default (from azlin config)
- Size: m (medium - standard)
Executing: /amplihack:remote --vm-size m auto "[task]"用户:"远程运行此任务"
你的回复:
我将在远程Azure VM上执行此任务,使用你的默认区域。
检测到:
- 任务:[从上下文中提取]
- 区域:默认(来自azlin配置)
- 规格:m(中型 - 标准规格)
正在执行:/amplihack:remote --vm-size m auto "[task]"Result Integration
结果整合
After execution completes, guide the user:
Remote execution complete!
Results:
- Logs: .claude/runtime/logs/remote/
- Branches: Check `git branch -r | grep remote-exec`
- Integration: Review changes and merge if ready
To view logs:
cat .claude/runtime/logs/remote/remote-exec-*.log
To merge remote changes:
git fetch
git merge remote-exec/main执行完成后,指导用户:
远程执行完成!
结果信息:
- 日志:.claude/runtime/logs/remote/
- 分支:查看`git branch -r | grep remote-exec`
- 整合:检查更改并在准备就绪后合并
查看日志的命令:
cat .claude/runtime/logs/remote/remote-exec-*.log
合并远程更改的命令:
git fetch
git merge remote-exec/mainError Handling
错误处理
If the command fails, explain common issues:
Secrets Detected:
"Remote execution blocked - secrets found in repository. Please remove hardcoded secrets and use .env files instead."
Azlin Not Configured:
"Azlin is not configured. Please run: "
azlin configureTimeout:
"Task timed out. The VM has been preserved for inspection. Use to investigate."
azlin connect <vm-name>如果命令执行失败,解释常见问题:
检测到密钥:
"远程执行已阻止 - 在仓库中检测到密钥。请移除硬编码的密钥,改用.env文件。"
Azlin未配置:
"Azlin未配置。请运行:"
azlin configure超时:
"任务超时。VM已保留以供检查。使用进行调查。"
azlin connect <vm-name>Best Practices
最佳实践
Remind users:
- Keep git state clean before remote execution
- Use for secrets (never hardcode)
.env - Monitor Azure costs with
azlin list - Clean up VMs after debugging with
azlin kill <vm-name>
提醒用户:
- 远程执行前保持Git状态干净
- 使用存储密钥(切勿硬编码)
.env - 使用监控Azure成本
azlin list - 调试完成后使用清理VM
azlin kill <vm-name>
Token Budget
Token预算
- Core instructions: ~1,200 tokens
- Examples and guidance: ~400 tokens
- Total: ~1,600 tokens (well under 2,000 limit)
- 核心指令:约1,200 tokens
- 示例和指导:约400 tokens
- 总计:约1,600 tokens(远低于2,000限制)
See Also
另请参阅
- - Direct command interface
/amplihack:remote - Azlin documentation: https://github.com/rysweet/azlin
- Remote execution module:
~/.amplihack/.claude/tools/amplihack/remote/README.md
- - 直接命令接口
/amplihack:remote - Azlin文档:https://github.com/rysweet/azlin
- 远程执行模块:
~/.amplihack/.claude/tools/amplihack/remote/README.md