Install
openclaw skills install wsl-windows-bridgeWSL ↔ Windows cross-system bridge for OpenClaw agents. Provides win-python / win-ps / win-cmd / win-copy / win-run-py / win-path to invoke Windows Python (Anaconda), execute PowerShell/CMD commands, and read/write Windows files from WSL2. Ideal for quantitative trading (QMT/xtquant), cross-system file operations, and Windows environment scripting.
openclaw skills install wsl-windows-bridgeSeamless access to Windows Python, PowerShell, CMD, and filesystem from WSL2.
| Command | Purpose |
|---|---|
win-python | Invoke Windows Python (Anaconda or any) |
win-ps | Execute PowerShell commands |
win-cmd | Execute CMD commands |
win-copy | Copy files between WSL and Windows |
win-run-py | Run .py scripts with logging |
win-path | Convert paths WSL /mnt/* ↔ Windows D:\* |
cd ~/.openclaw/workspace/skillpublish/wsl-windows-bridge/scripts/
bash setup.sh
The setup script will:
/mnt/d, /mnt/c, /mnt/e)~/.openclaw/bin/~/.openclaw/env.windows.sh with correct pathsManual setup (without setup.sh):
cp -r scripts/* ~/.openclaw/bin/
chmod +x ~/.openclaw/bin/win-*
# Then manually edit env.windows.sh to set correct paths
⚠️ exec non-interactive shell note:
# Recommended for exec environment
source ~/.bashrc && source ~/.openclaw/env.windows.sh && win-python ...
# Or directly (wrappers handle .bashrc internally)
~/.openclaw/bin/win-python ...
Invoke Windows Python to run a script:
source ~/.bashrc && source ~/.openclaw/env.windows.sh
# Single-line command
win-python -c "import xtquant; print(xtquant.__version__)"
# Run a script file
win-python "$WIN_SCRIPTS/my_task.py" --arg value
Execute PowerShell:
win-ps "Get-Process python | Select-Object Name,Id | Format-Table"
win-ps "Get-Service | Where-Object {\$_.DisplayName -like '*QMT*'}"
File copy:
win-copy /tmp/result.csv /mnt/d/app/output/result.csv
Path conversion:
win-path /mnt/d/app
# → D:\app
win-path --to-wsl D:\app
# → /mnt/d/app
source ~/.bashrc && source ~/.openclaw/env.windows.sh
# Get HS300 constituent stocks
win-python -c "
from xtquant import xtdata
stocks = xtdata.get_stock_list_in_sector('沪深300')
print(f'HS300: {len(stocks)} stocks')
print(stocks[:5])
"
# Download historical data
win-python -c "
from xtquant import xtdata
xtdata.download_history_data('600000.SH', start_time='20260101', end_time='20260405')
print('Download complete')
"
| Variable | Default | Description |
|---|---|---|
WIN_ROOT | /mnt/d | Windows root directory |
WIN_ANACONDA | /mnt/d/app/anaconda | Anaconda installation path |
WIN_PYTHON | $WIN_ANACONDA/python.exe | Python executable |
WIN_PS | .../powershell.exe | PowerShell path |
WIN_SCRIPTS | /mnt/d/app/scripts | Common scripts directory |
| Error | Cause | Fix |
|---|---|---|
command not found: win-python | env.windows.sh not sourced | source ~/.bashrc && source ~/.openclaw/env.windows.sh |
Permission denied | UAC permission | Use D:\app\ or user directory as target |
| Chinese garbled logs | QMT log encoding | Ignore; actual data is correct |
~/.openclaw/workspace/skillpublish/wsl-windows-bridge/
├── SKILL.md
├── _meta.json
├── README.md
└── scripts/
├── setup.sh ← Auto-install (auto-detects Python path)
├── env.windows.sh ← Template (setup.sh generates actual config)
├── win-python
├── win-ps
├── win-cmd
├── win-copy
├── win-run-py
└── win-path