Agent Skills in Claude Code and Visual Studio Code: Setup, Benefits, Risks, and a Step-by-Step Example
Installing Visual Studio Code and WSL gives you two important parts of a modern Windows development environment. The next step is connecting them correctly.
VS Code runs as a Windows desktop application, while WSL provides a Linux environment with its own terminal, file system, and development tools. When the connection is configured properly, you can use the familiar VS Code interface while your project and terminal commands run inside Linux.
This setup is useful for web development, command-line tools, package managers, and AI coding agents that expect a Linux-style environment.
The connection itself is not difficult, but beginners often run into problems because the same project can appear through both Windows and Linux paths. The most important goal of this guide is therefore not only to open WSL in VS Code, but to understand where the project lives and which environment is running your commands.
Version note: Extension names, menus, connection indicators, and installation steps may change between VS Code releases. Before publication, compare version-sensitive instructions with the current official Visual Studio Code documentation for WSL development.
By the end of this guide, you should be able to:
This article assumes that Visual Studio Code and WSL are already installed.
If you have not completed those steps, return to the earlier guides in this series before continuing.
VS Code uses a client-and-server model for WSL development.
The visible VS Code window still runs as a Windows desktop application. However, when you connect to WSL, VS Code starts supporting components inside the Linux environment.
That allows Linux-side tools to work with the editor.
A simplified view looks like this:
Windows
├── Visual Studio Code interface
├── Browser
└── WSL connection
└── Linux environment
├── Project files
├── Terminal
├── Git
├── Language tools
└── AI coding toolsThis arrangement gives you the convenience of a Windows application while keeping the development environment inside Linux.
When the connection is active, the integrated terminal should use your Linux shell. Extensions that need to run against the project may also be installed inside the WSL environment rather than only on the Windows side.
That distinction becomes important later when we install development tools, Git, GitHub Copilot, and Claude Code.
Open Visual Studio Code on Windows.
Select the Extensions view from the Activity Bar. You can also open it from the View menu.
Search for:
WSLLook for the official WSL extension published by Microsoft.
Before installing it, confirm:
Depending on the current VS Code distribution, WSL support may also be offered as part of a broader remote development extension package. For a beginner workflow, installing the official WSL extension is normally sufficient.
Select Install.
After installation, VS Code may display a new connection option or remote-development indicator near the lower-left corner of the window.
The exact appearance may vary by version.
There are several ways to connect VS Code to WSL.
The two most useful methods for beginners are:
Both methods should lead to the same general result: a VS Code window connected to your Linux distribution.
Open the Command Palette.
Search for a command similar to:
WSL: Connect to WSLIf you have more than one Linux distribution installed, you may also see an option to connect to a specific distribution.
Choose the distribution you prepared in the previous guide, such as Ubuntu.
VS Code may open a new window while it installs or starts required support components inside WSL.
The first connection may take longer than later connections.
When the connection is complete, look for an environment indicator near the lower-left corner of the window. It should show that the editor is connected to WSL or to the selected Linux distribution.
Open your Linux distribution from the Windows Start menu.
Move into the projects folder created in the previous guide:
cd ~/projectsConfirm your location:
pwdThe output should resemble:
/home/your-username/projectsNow run:
code .The code command launches Visual Studio Code.
The period means “the current directory,” so the command asks VS Code to open the folder you are currently in.
A new VS Code window should open and connect to WSL.
If the command works, this is one of the most convenient ways to open a project because it makes the active directory explicit.
code . Does Not WorkIf the Linux terminal reports that the code command is not found, check the following:
Try opening VS Code normally and connecting to WSL through the Command Palette first.
After the connection succeeds, close the window and try again from the WSL terminal:
code .If the command still fails, compare the error message with the current official VS Code WSL troubleshooting documentation before changing system paths manually.
Avoid copying random shell configuration commands from old forum posts. A path workaround written for an earlier VS Code release may no longer be appropriate.
For Linux-oriented development, a clear project location helps prevent confusion.
In the previous article, we created:
~/projectsInside the WSL terminal, run:
cd ~/projectsCreate a new folder for this exercise:
mkdir wsl-vscode-practiceMove into it:
cd wsl-vscode-practiceConfirm the location:
pwdThe result should look similar to:
/home/your-username/projects/wsl-vscode-practiceOpen the folder in VS Code:
code .The Explorer should display wsl-vscode-practice as the root folder.
This project now lives inside the Linux file system, even though you are viewing and editing it through a Windows desktop application.
Do not assume that a folder is open in WSL only because VS Code launched successfully.
Verify the environment.
Look near the lower-left corner of the VS Code window.
The current interface should display some indication that the window is connected to WSL or to a Linux distribution.
The exact label may vary, but it should not look like a normal local Windows-only window.
Open the Terminal menu and create a new terminal.
Run:
pwdThe path should begin with something similar to:
/home/It should not display a Windows-style path beginning with:
C:\Next, run:
uname -aThe result should contain Linux environment information.
You can also run:
whoamiThis should display the Linux username you created during WSL setup.
Together, these commands confirm that:
Run:
echo $SHELLThe result may resemble:
/bin/bashor another Linux shell path.
This confirms that the integrated terminal is not using Windows PowerShell.
In the VS Code Explorer, create a file named:
README.mdAdd the following content:
# WSL and VS Code Practice
This project is stored inside my WSL Linux environment.
## Environment Check
- Editor: Visual Studio Code
- Operating environment: WSL
- Project location: Linux home directorySave the file.
Return to the integrated terminal and run:
lsYou should see:
README.mdNow display the file contents:
cat README.mdThe text you added in VS Code should appear in the terminal.
This confirms that the editor and the WSL terminal are working with the same project files.
A major source of confusion is that Windows and WSL can both access some of the same files, but they describe locations differently.
A Windows path may look like:
C:\Users\Alex\Documents\projectInside WSL, the same Windows folder may appear as:
/mnt/c/Users/Alex/Documents/projectA project stored inside the Linux home directory may look like:
/home/alex/projects/projectThese locations are not interchangeable.
Files under paths such as:
C:\Users\Alexbelong to the Windows file system.
Inside WSL, Windows drives are commonly mounted under:
/mnt/For example:
/mnt/c/represents the Windows C drive.
Files under paths such as:
/home/alexbelong to the WSL Linux file system.
For Linux-based development tools, this is often the better place to store active projects.
Development tools may behave differently depending on where the project is stored.
Possible issues include:
For a WSL-centered workflow, keep Linux-based projects under a location such as:
~/projectsThen open them through a WSL-connected VS Code window.
This reduces the chance that Windows tools and Linux tools will modify the same project in inconsistent ways.
VS Code can open different terminal profiles.
Depending on your configuration, the terminal menu may offer:
The terminal name alone is not always enough to confirm the environment.
Use the path and commands as evidence.
Inside Linux:
pwdshould show a path beginning with /.
Inside PowerShell:
Get-Locationmay show a path beginning with a Windows drive letter.
Before installing packages or running project commands, confirm:
This three-part check prevents many beginner errors.
When VS Code is connected to WSL, the Extensions view may distinguish between extensions installed on Windows and extensions installed inside WSL.
Some extensions affect only the editor interface and can run locally on Windows.
Other extensions need access to:
These may need to be installed inside WSL.
VS Code normally indicates where an extension is installed or where it needs to run.
When installing an extension, pay attention to labels such as:
Do not assume that installing an extension once makes it available in every environment.
Later, when we install GitHub Copilot and configure Claude Code, we will check whether each component belongs on the Windows side, the WSL side, or both.
After closing VS Code, you can reopen the project in several ways.
Run:
cd ~/projects/wsl-vscode-practice
code .This method is explicit and reliable.
Open VS Code and check the recent folders or workspaces.
A recent WSL project may appear with an environment label.
Confirm that the reopened window is still connected to WSL before running commands.
Connect to WSL from the Command Palette.
Then use the File menu to open:
/home/your-username/projects/wsl-vscode-practiceMake sure you are browsing the Linux file system rather than selecting a similarly named Windows folder.
Check the terminal.
If the path begins with C:\, the folder may be open in a normal Windows window.
Close the folder, connect to WSL, and reopen the Linux path.
A Linux-based project should normally appear under a path beginning with:
/home/Confirm that the VS Code window itself is connected to WSL.
If it is not, connect through the Command Palette or reopen the project with:
code .If the window is connected but a manually selected terminal profile opens PowerShell, create a new terminal and choose the Linux shell associated with the WSL environment.
The terminal may have been moved to another directory with cd.
Run:
pwdCompare the result with the folder displayed at the top of the Explorer.
For beginner workflows, keep the terminal inside the project root unless a command specifically requires another directory.
Open the Extensions view and check where the extension is installed.
It may need a separate installation inside the WSL environment.
Also verify whether the extension depends on a Linux-side runtime or executable.
/mnt/c/This is not automatically wrong. WSL can work with files stored on Windows drives.
However, Linux-heavy development tools may perform more consistently when projects are stored under:
/home/your-username/For this series, use:
~/projectsunless a later tutorial gives a specific reason to use a Windows path.
The first WSL connection may require VS Code to install support components inside the Linux environment.
Allow the process to complete and read any visible error messages.
Later connections are normally faster.
Save your work and close active development processes.
From Windows PowerShell, you can stop WSL with:
wsl --shutdownThen reopen the distribution.
Do not run this command while a database, file operation, package installation, or development server is performing important work.
A simple project structure reduces mistakes.
Inside WSL, use:
/home/your-username/projectsPlace each project in its own folder:
/home/your-username/projects/
├── wsl-vscode-practice/
├── first-web-app/
└── ai-coding-experiments/Avoid placing unrelated files directly in the projects folder.
Each project should have its own:
When starting work, move into the correct folder and open it:
cd ~/projects/first-web-app
code .This creates a clear connection between the terminal location and the VS Code workspace.
In professional development, consistency like this is more valuable than a complicated folder system. A predictable location helps humans, scripts, editors, and AI tools understand the same project context.
AI coding tools depend heavily on context.
If the wrong folder is open, an AI assistant may:
Before asking an AI tool to make changes, confirm:
pwdThen inspect the top-level files:
lsThese two commands provide a quick environment check.
You should know:
A strong prompt cannot compensate for a confused workspace.
Before continuing to the next article, confirm that you can complete each of these actions:
~/projects.code ..pwd and see a Linux path.uname -a and see Linux information./home/ and /mnt/c/.A final verification sequence is:
cd ~/projects/wsl-vscode-practice
pwd
ls
code .Inside the VS Code terminal, run:
pwd
whoami
uname -aThe results should confirm that the project and terminal are both operating inside WSL.
Visual Studio Code and WSL work well together because they separate the user interface from the development environment.
VS Code gives you a familiar editor, file explorer, terminal panel, and extension system. WSL provides the Linux file system, shell, and command-line environment used by many modern development tools.
The most important practice is consistency. Store WSL-based projects in a clear Linux location, open them through a WSL-connected VS Code window, and verify the terminal before running commands.
You now have a development workspace where Windows, VS Code, and Linux can work together without mixing their roles.
The next article will move from the local development environment to GitHub. We will create a GitHub account, review essential security and profile settings, and prepare for storing project repositories online.
No.
Projects designed for Windows-specific tools may be better stored in the Windows file system. Projects using Linux-oriented tools often work more consistently inside the WSL file system.
The important point is to choose deliberately and avoid switching between environments without understanding the consequences.
Yes. Windows provides ways to browse WSL files.
However, avoid editing or moving Linux system files with tools that do not understand Linux permissions and metadata. For project work, using a WSL-connected VS Code window is generally safer and more consistent.
An extension may be installed on the Windows side but not inside the WSL environment.
Extensions that need access to Linux tools or project files may require a separate WSL installation. Check the extension details and the environment labels shown by VS Code.
Comments
Post a Comment