running-cli-in-wsl-portable
Skill2 starsChanged 2 months agoBSD-3-ClauseView on GitHub
Runs Bash command lines in a Portable installation under WSL. What this does is execute the command line inside a Portable bash installation in WSL. Use this when a command line should be run under a WSL portable environment.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- addressing-pull-request-commentsSkill
- analyzing-github-issueSkill
- applying-ruby-conventionsSkill
- applying-test-conventionsSkill
- committing-changesSkill
- creating-pull-requestSkill
- editing-filesSkill
- enforcing-project-rulesSkill
- implementing-github-issueSkill
- improving-agent-reflectionSkill
- syncing-branch-with-baseSkill
- updating-docSkill
- validating-production-qualitySkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When running a bash command under a WSL portable environment, follow those steps.
- Distinctive: line 15
Always tell the user "SKILL: I am running CLI in WSL Portable" to inform the user that you are running this skill.
- Very specific: line 34
Always use it every time another skill specifically mentions skill: running-cli-in-wsl-portable.
- Distinctive: line 35
Always use it every time the user asks you to run a CLI command using the WSL Portable environment.
- Distinctive: line 36
Always use it every time you need to run a CLI command that needs a WSL Portable environment.
- Distinctive: line 37
Never use this skill when you are under a Linux environment.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Running CLI in WSL Portable
Sequential steps to be followed when using this skill
When running a bash command under a WSL portable environment, follow those steps. The original bash command to be run is later referenced as {original_cli}.
1. Inform the user
- Always tell the user "SKILL: I am running CLI in WSL Portable" to inform the user that you are running this skill.
2. Run the command line with the right prefix
- Find this skill directory absolute path, later referenced as {skill_absolute_path}.
- Always use
cli: {skill_absolute_path}\scripts\wsl_portable_bash.cmd "{original_cli}". - Be careful that the path to the script should be absolute and using anti-slashes (
\). However the argument will be executed under WSL, so it should follow Linux conventions, with file paths using slashes (/).
Example:
C:\my-repo\.cline\skills\running-cli-in-wsl-portable\scripts\wsl_portable_bash.cmd "mkdir linux-path/to/my-files"Example with Linux file patterns that don't need to be escaped:
C:\my-repo\.cline\skills\running-cli-in-wsl-portable\scripts\wsl_portable_bash.cmd "ls *.md"When to use it
- Always use it every time another skill specifically mentions
skill: running-cli-in-wsl-portable. - Always use it every time the user asks you to run a CLI command using the WSL Portable environment.
- Always use it every time you need to run a CLI command that needs a WSL Portable environment.
- Never use this skill when you are under a Linux environment.
Usage and code examples
Those examples are given for a Windows environment.
Running a Hello World prompt under a WSL Portable environment, with example of the output
Note that the WSL Portable environment may output some lines on stderr. You can safely ignore them.
C:\my-repo\.cline\skills\running-cli-in-wsl-portable\scripts\wsl_portable_bash.cmd "echo 'Hello World'"
# Setting $HOME to /mnt/i/Env/Linux/Programs/bash/bash.home
# Setting $XDG_CONFIG_HOME to /mnt/i/Env/Linux/Programs/bash/bash.config
# Hello WorldListing all workspace Ruby files (*.rb) under a WSL Portable environment
C:\my-repo\.cline\skills\running-cli-in-wsl-portable\scripts\wsl_portable_bash.cmd "ls -la *.rb"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

