home / skills / jackspace / claudeskillz / windows-expert

windows-expert skill

/skills/windows-expert

This skill provides expert guidance on Windows, PowerShell, WSL interoperability, and cross-platform development workflows.

npx playbooks add skill jackspace/claudeskillz --skill windows-expert

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.2 KB
---
name: windows-expert
description: Expert guidance for Windows, PowerShell, WSL interop, and cross-platform development
---

# Windows-expert

## Instructions

When helping with Windows-related tasks:
- Use /mnt/c/ paths for Windows drives in WSL
- Use wslpath for path conversion: wslpath -w (Linux to Windows), wslpath -u (Windows to Linux)
- Windows executables can be called from WSL: cmd.exe, powershell.exe, *.exe
- Be aware of file permissions and line ending differences (CRLF vs LF)
- Provide PowerShell examples alongside bash when relevant
- Use modern PowerShell conventions (cmdlets, pipelines)
- Suggest PowerShell Core (pwsh) for cross-platform scripts
- Help with Registry operations (Get-ItemProperty, Set-ItemProperty)
- Windows Services management
- Task Scheduler for automation
- Windows networking (netsh, Get-NetAdapter)
- NTFS permissions and ACLs
- Path length limitations (260 char limit)
- Case sensitivity differences
- Drive letter handling
- Windows Defender/Firewall interactions
- WSL2 networking quirks (bridge mode, port forwarding)


## Examples

Add examples of how to use this skill here.

## Notes

- This skill was auto-generated
- Edit this file to customize behavior

Overview

This skill provides expert guidance for Windows, PowerShell, WSL interop, and cross-platform development. It focuses on practical commands, best practices, and troubleshooting patterns for developers and sysadmins working across Windows and Linux environments. Use it to get concrete examples, conversions, and automation recipes that work reliably in mixed toolchains.

How this skill works

The skill inspects the task context and returns targeted commands, path conversions, and configuration patterns for Windows and WSL environments. It offers both Bash/WSL and modern PowerShell (including pwsh) examples, highlights gotchas like CRLF vs LF and path length limits, and suggests correct tools for Registry, services, networking, ACLs, and Task Scheduler operations. When needed it explains how to call Windows executables from WSL and how to use wslpath for path translation.

When to use it

  • You need reliable command examples for PowerShell and WSL interop
  • Converting paths between Linux and Windows (wslpath usage)
  • Automating Windows tasks (Task Scheduler, Services, Registry edits)
  • Troubleshooting networking between WSL2 and Windows host
  • Managing NTFS permissions and ACLs or addressing path length issues

Best practices

  • Prefer pwsh (PowerShell Core) for cross-platform scripts to avoid Windows-only cmdlet discrepancies
  • Use wslpath -w and -u for accurate path conversion instead of manual string manipulation
  • Show both PowerShell cmdlets and equivalent Bash/WSL commands for clarity
  • Be explicit about line endings and file permissions when sharing files between Windows and WSL
  • Avoid exceeding the 260-character path limit; use UNC paths or enable long paths in Windows when needed

Example use cases

  • Convert /mnt/c/Users/alice/project to a Windows path: wslpath -w /mnt/c/Users/alice/project
  • Run a Windows exe from WSL: /mnt/c/Program\ Files/MyApp/app.exe or call via cmd.exe /c
  • Set a Registry value with PowerShell: Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Flag' -Value 1
  • Create a scheduled task via PowerShell for automation and cross-account runs
  • Diagnose WSL2 port forwarding issues and suggest netsh or socat-based workarounds

FAQ

Should I use pwsh or Windows PowerShell?

Use pwsh for scripts that must run on Linux and Windows; use Windows PowerShell only for legacy Windows-only modules.

How do I reliably convert paths between WSL and Windows?

Use wslpath -w to convert Linux-to-Windows and wslpath -u for Windows-to-Linux; prefer /mnt/c/ style paths in examples.