bambu-studio-ai
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Execute PowerShell commands reliably on Windows. Avoid &&, handle parameter parsing, recover from interruptions, and ensure cross-session continuity.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install dalomeve/powershell-reliable打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
Execute commands reliably on Windows PowerShell. Avoid common pitfalls like && chaining, parameter swallowing, and session interruptions.
Windows PowerShell differs from bash in critical ways:
| Issue | Bash | PowerShell | Solution |
|---|---|---|---|
| Command chaining | cmd1 && cmd2 |
cmd1 -ErrorAction Stop; if ($?) { cmd2 } |
Use semicolons + error handling |
| Parameter parsing | -arg value |
-Argument value (case-insensitive) |
Use full parameter names |
| Path separators | / |
\ (or / in some cmdlets) |
Use Join-Path |
| Output redirection | > >> |
> >> (encoding issues) |
Use Out-File -Encoding UTF8 |
| Environment vars | $VAR |
$env:VAR |
Use $env: prefix |
Wrong:
mkdir test && cd test && echo done
Right:
$ErrorActionPreference = 'Stop'
try {
New-Item -ItemType Directory -Path test -Force
Set-Location test
Write-Host 'done'
} catch {
Write-Error "Failed: $_"
exit 1
}
Wrong:
git commit -m "message"
Right:
git commit -Message "message"
# Or use splatting:
$params = @{ Message = "message" }
git commit @params
Wrong:
$path = "C:/Users/name/file.txt"
Right:
$path = Join-Path $env:USERPROFILE "file.txt"
# Or use literal paths:
$path = 'C:\Users\name\file.txt'
Wrong:
echo "text" > file.txt
Right:
"text" | Out-File -FilePath file.txt -Encoding UTF8
For long-running commands:
# Start background job
$job = Start-Job -ScriptBlock {
param($arg)
# Long operation
} -ArgumentList $arg
# Wait with timeout
Wait-Job $job -Timeout 300
# Get results
if ($job.State -eq 'Completed') {
Receive-Jo...
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
# PowerShell Reliable Execution
Execute commands reliably on Windows PowerShell. Avoid common pitfalls like `&&` chaining, parameter swallowing, and session interruptions.
## Problem Statement
Windows PowerShell differs from bash in critical ways:
| Issue | Bash | PowerShell | Solution |
|-------|------|------------|----------|
| Command chaining | `cmd1 && cmd2` | `cmd1 -ErrorAction Stop; if ($?) { cmd2 }` | Use semicolons + error handling |
| Parameter parsing | `-arg value` | `-Argument value` (case-insensitive) | Use full parameter names |
| Path separators | `/` | `\` (or `/` in some cmdlets) | Use `Join-Path` |
| Output redirection | `>` `>>` | `>` `>>` (encoding issues) | Use `Out-File -Encoding UTF8` |
| Environment vars | `$VAR` | `$env:VAR` | Use `$env:` prefix |
## Core Patterns
### 1. Safe Command Chaining
**Wrong**:
```powershell
mkdir test && cd test && echo done
```
**Right**:
```powershell
$ErrorActionPreference = 'Stop'
try {
New-Item -ItemType Directory -Path test -Force
Set-Location test
Write-Host 'done'
} catch {
Write-Error "Failed: $_"
exit 1
}
```
### 2. Parameter Safety
**Wrong**:
```powershell
git commit -m "message"
```
**Right**:
```powershell
git commit -Message "message"
# Or use splatting:
$params = @{ Message = "message" }
git commit @params
```
### 3. Path Handling
**Wrong**:
```powershell
$path = "C:/Users/name/file.txt"
```
**Right**:
```powershell
$path = Join-Path $env:USERPROFILE "file.txt"
# Or use literal paths:
$path = 'C:\Users\name\file.txt'
```
### 4. Output Encoding
**Wrong**:
```powershell
echo "text" > file.txt
```
**Right**:
```powershell
"text" | Out-File -FilePath file.txt -Encoding UTF8
```
### 5. Session Continuity
For long-running commands:
```powershell
# Start background job
$job = Start-Job -ScriptBlock {
param($arg)
# Long operation
} -ArgumentList $arg
# Wait with timeout
Wait-Job $job -Timeout 300
# Get results
if ($job.State -eq 'Completed') {
Receive-Jo...Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.