WSL Shell Reliability
name: wsl-shell-reliability
by cikichen · published 2026-03-22
$ claw add gh:cikichen/cikichen-wsl-shell-reliability---
name: wsl-shell-reliability
description: Reliability-first shell selection policy for AI agents on Windows. Choose WSL or PowerShell based on execution risk, not preference.
license: MIT
compatibility: Windows (WSL optional; recommended for POSIX-fragile workflows)
metadata:
author: simon
version: "2.0"
---
# WSL Shell Reliability
Use this skill to maximize terminal command success on Windows.
This skill does **not** force WSL.
It enforces a reliability-first policy:
Trigger conditions
One-screen decision table
| Question | If Yes | If No |
| --- | --- | --- |
| Windows-native task/tool? | Use **PowerShell/CMD** | Next question |
| POSIX/bash semantics required? | Use **WSL/bash** | Next question |
| Need Linux-first parity? | Prefer **WSL/bash** | Next question |
| High Windows-shell parse risk? | Prefer **WSL/bash** | Next question |
| Both paths low risk? | Pick shell with fewer moving parts | N/A |
Examples:
Rule priority (conflict resolution)
Apply rules in this priority order when guidance appears to conflict:
1. **Windows-native exclusions** (must use PowerShell/CMD).
2. **Decision table hard signals** (POSIX dependence, high parse risk).
3. **Fallback policy + intent preservation**.
4. **Convenience preferences** (tool availability, fewer steps).
If still ambiguous, choose the shell with lower execution-failure risk.
Windows-native exclusions (prefer PowerShell/CMD)
Execution protocol
1. Select shell with the decision table.
2. Generate syntax for that shell (do not mix grammar).
3. Execute command.
4. If failure is shell-related, fallback to the other shell.
5. Preserve intent exactly; only translate syntax.
6. State fallback explicitly.
Shell-aware generation rules
Do not run bash syntax directly in PowerShell/CMD.
WSL templates
Quick translation hints (bash -> PowerShell)
Use translations only when fallback requires them.
Guardrails
Fallback policy
Fallback to the other shell when:
When falling back, report:
1. what failed,
2. why shell changed,
3. equivalent command intent preserved.
Known limitations
In these cases, prefer explicit fallback and report constraints clearly.
References
Deep technical notes and examples:
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...