Windows Shell Encoding Doctor for Openclaw

A specialized diagnostic tool designed to identify and resolve shell-specific errors, character encoding issues, and syntax mismatches in Windows environments.

jisuapi
v1.0.1
Apr 3, 2026
1
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install windows-shell-encoding-doctor

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install windows-shell-encoding-doctor using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Windows Shell Encoding Doctor?

The Windows Shell Encoding Doctor is a critical utility within the Openclaw Skills ecosystem, focused on bridging the gap between Linux-style command execution and Windows-based environments. It addresses the common friction points developers face when using PowerShell, CMD, or Git Bash, such as broken pipe commands, garbled Chinese characters (mojibake), and line ending discrepancies (CRLF vs. LF).

By leveraging this skill, developers can move beyond trial-and-error command fixing. The tool prioritizes native Windows solutions where possible, ensuring that complex JSON payloads, multi-line scripts, and sensitive file paths are handled with technical precision and minimal risk of side effects.

Windows Shell Encoding Doctor Use Cases

  • Resolving bash syntax errors like heredocs or export commands when pasted into PowerShell.
  • Fixing garbled text and encoding mismatches (UTF-8, GBK) in Windows terminal output.
  • Debugging file path issues caused by spaces, missing quotes, or incorrect directory separators.
  • Repairing scripts that fail after being moved from Linux to Windows due to line ending or BOM issues.
  • Safely passing complex JSON payloads through Windows command-line interfaces.

How Windows Shell Encoding Doctor Works

  1. Identifies the active shell environment (PowerShell, CMD, or Git Bash) to determine syntax compatibility.
  2. Analyzes the failing command to categorize the error, such as shell mismatch, quoting issues, or encoding conflicts.
  3. Diagnoses the root cause by checking for specific triggers like reserved characters, Unicode literals, or incorrect path expansions.
  4. Generates a low-risk rewrite of the command, often utilizing temporary files or native PowerShell objects for stability.
  5. Provides a concise explanation of the failure and the technical reasoning behind the proposed fix.

Windows Shell Encoding Doctor Setup

To integrate this skill into your workflow, ensure your Openclaw environment is active and the skill directory is accessible. No external binary dependencies are required.

# Example of how to structure a PowerShell repair using this skill
@'
print("hello world")
'@ | python -

Windows Shell Encoding Doctor Data Schema & Taxonomy

The skill utilizes a set of reference documents to maintain a high standard of diagnostic accuracy. These are organized as follows:

Reference File Purpose
powershell-vs-bash.md Translation maps between Unix and Windows shell semantics.
encoding-checklist.md Resolution steps for UTF-8, BOM, and mojibake issues.
common-failures.md Pattern matching for specific, known error codes.
repair-playbooks.md Step-by-step guides for 'Input -> Diagnose -> Repair' workflows.
json-and-stdin-patterns.md Best practices for handling multi-line payloads and data pipes.

Windows Shell Encoding Doctor Advanced Features

  • Multi-shell translation that converts Unix style commands into native Windows equivalents without losing functionality.
  • Advanced encoding management using .NET classes like [System.IO.File]::WriteAllText for precise BOM control.
  • Secure JSON handling using hashtables and ConvertTo-Json to prevent quoting hell.
  • Automated line-ending detection and conversion to prevent cross-platform script failure.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Github Stars: 0
forks: 0

Featured*