Install wsl auto

From X-School-Academy/skill-pilot · View interactive version

Install wsl auto is an AI agent skill from the GitHub repository X-School-Academy/skill-pilot. Installs and validates WSL on Windows with guided automation for modern and legacy installation paths. Use when a user asks to install WSL, set up Linux on Windows, or fix a broken WSL install.

How to use this skill

Skill file

AI Builder - Install WSL Auto

This skill installs Windows Subsystem for Linux (WSL) safely, chooses the correct installation path, validates the environment, and gives the user a practical post-install guide.

When to Use This Skill

Your Roles in This Skill

Role Communication

As an expert in your assigned roles, you must announce your actions before performing them using the following format:

As a {Role, and Role-XYZ if have more roles}, I will {action description}

This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.

Key Principles

Instructions

Follow these steps in order.

Step 1: Confirm Context and Safety

  1. Confirm the user is on Windows and can run PowerShell as Administrator.
  2. Explain that enabling Windows features and restarting are expected.
  3. Ask whether to use the default distribution (Ubuntu-22.04) or a user-specified distro.
  4. If the user is unsure, use:

references/distributions.md

and choose a beginner-safe default (Ubuntu-22.04).

Step 2: Run Compatibility Check

  1. Execute:

scripts/check-wsl-compatibility.ps1

  1. Parse the JSON summary at the end and decide:
  1. If not running as admin, stop and ask the user to reopen PowerShell as Administrator.

Step 3A: Modern Install Path

Use this path for Windows build 19041+.

  1. Execute:

scripts/install-wsl-modern.ps1 -Distribution <distro>

The script normalizes common distro aliases and rejects unsupported distro names.

  1. If the script reports needsRestart = true, guide the restart.
  2. After restart, continue with Step 4 and Step 5.

Step 3B: Manual Install Path

Use this path for older Windows 10 builds.

  1. Pre-restart phase:

scripts/install-wsl-manual.ps1 -Distribution <distro>

  1. Restart Windows when prompted.
  2. Post-restart phase:

scripts/install-wsl-manual.ps1 -ContinueAfterRestart -Distribution <distro>

The script normalizes common distro aliases and validates availability.

  1. If kernel update is required, follow the official Microsoft package flow noted by the script output.
  2. Continue with Step 4 and Step 5.

Step 4: First-Run User Setup

  1. Ensure the Linux distro launches once.
  2. Guide user to create Linux username and password.
  3. Explain password entry has no visible characters in terminal.
  4. Confirm the user can reopen WSL after first-run setup.

Step 5: Validate Installation

  1. Execute:

scripts/test-wsl.ps1 -Strict

  1. Confirm:
  1. If strict mode fails only on network checks in constrained environments, rerun:

scripts/test-wsl.ps1

and treat network as advisory.

  1. If checks fail, route to references/troubleshooting.md.

Step 6: Handoff and Next Steps

  1. Provide a short result summary: install method, distro, and validation outcome.
  2. Provide quick-start guidance from:

references/user-guide.md

  1. If unresolved issues remain, provide targeted fixes from:

references/troubleshooting.md

  1. If distro selection needs adjustment or reinstall, use:

references/distributions.md

  1. End with concrete next action for the user.

Expected Output

Provide a structured final report with:

Common Issues

When these occur, use references/troubleshooting.md and report exactly which step failed.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.