skill-up provides native support for Windows environments, ensuring that evaluation workflows remain consistent across operating systems. This is achieved through a centralized platform abstraction that handles shell discovery, argument quoting, and environment variable management to bridge the gap between POSIX-centric agent tools and the Windows host.
The codebase manages Windows-specific logic primarily within the internal/platform package. This package uses Go build constraints (e.g., //go:build windows) to provide platform-specific implementations of shell execution and discovery internal/platform/shell_windows.go1-3
| Entity | Description |
|---|---|
HostShell | A struct defining how to launch commands (Cmd), quote arguments (Target.Quoter), and required environment variables for the host's primary shell internal/platform/platform.go99-110 |
DiscoverBash() | Locates a usable bash.exe, prioritizing user overrides and Git Bash over the incompatible WSL shim internal/platform/bash_windows.go28-43 |
BashEnvOverride | The environment variable SKILL_UP_BASH used to manually specify the bash path internal/platform/platform.go19 |
ShellFamily | Identifies the command language (ShellPOSIX or ShellCmd) to ensure correct quoting and execution logic internal/platform/platform.go33-40 |
On Windows, the evaluator dispatches script judges based on file extensions docs/guide/windows.md15-22:
| Script Extension | Interpreter on Windows |
|---|---|
.ps1 | PowerShell |
.cmd / .bat | cmd.exe |
.sh | bash.exe (Git Bash preferred) |
The system prefers Bash-compatible environments (specifically Git Bash) to ensure high fidelity with internal POSIX command strings, such as set -eu git fixtures and workspace-diff pipelines internal/platform/shell_windows.go15-19 On Windows, it specifically filters out the WSL shim (C:\Windows\System32\bash.exe) because it expects Linux-format paths (e.g., /mnt/c/...), whereas skill-up provides Windows-style paths, leading to file-not-found errors internal/platform/bash_windows.go15-19
Title: Windows Shell Discovery and Dispatch Logic
Sources: internal/platform/bash_windows.go20-43 internal/platform/platform.go19-50 internal/platform/shell_windows.go40-66 docs/guide/windows.md23-44
When running on Windows, the internal/platform package provides two distinct execution paths depending on whether Bash was discovered.
If Bash is found, Host() returns a HostShell configured to use bash -c internal/platform/shell_windows.go50-51
MSYS_NO_PATHCONV=1 and MSYS2_ARG_CONV_EXCL=* to prevent the MSYS runtime from automatically rewriting Windows paths in arguments internal/platform/shell_windows.go52-55quoteForBashDoubleQuote, which wraps strings in double quotes and escapes characters like $, `, and " internal/platform/platform.go115-128If no Bash is available, the system falls back to cmd.exe internal/platform/shell_windows.go58-65
SysProcAttr.CmdLine with cmd /d /s /c to ensure deterministic quote stripping and disable AutoRun scripts internal/platform/shell_windows.go61-63shellquote.QuoteWindows to comply with CommandLineToArgvW rules internal/platform/platform.go82-84Sources: internal/platform/platform.go78-89 internal/platform/shell_windows.go40-66 docs/guide/windows.md98-103
Since make is typically unavailable on Windows, the repository provides PowerShell counterparts for development tasks within the scripts/windows/ directory. These scripts ensure Windows contributors can maintain the same standards for linting, git hooks, and verification as POSIX users.
The following diagram illustrates the relationship between standard Makefile targets and their Windows counterparts.
Title: Developer Workflow Command Mapping
Sources: scripts/windows/hooks.ps11-12 scripts/windows/lint-tools.ps11-24 scripts/windows/verify.ps11-34 docs/guide/windows.md66-88
/mnt/c/ paths. Users wanting to use WSL must set SKILL_UP_BASH manually and handle path translation internal/platform/bash_windows.go15-19nvm or Node.js bootstrap strings that use POSIX shell syntax. These will fail if the system falls back to the cmd.exe interpreter internal/platform/shell_windows.go27-29 Native agent execution on Windows requires manual Node.js installation docs/guide/windows.md91-94cmd.exe, literal %VAR% strings in arguments may still be expanded by the shell. There is no reliable escape for this; installing Git Bash is the recommended mitigation docs/guide/windows.md98-103sync.OnceValue at startup. Changes to PATH or SKILL_UP_BASH while the process is running will not be reflected internal/platform/shell_windows.go31-35Sources: internal/platform/bash_windows.go45-61 internal/platform/shell_windows.go12-35 docs/guide/windows.md89-104