Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add chen3feng/agent-skills --skill wsl-bash-crlf-or-tempfilegit clone --depth 1 https://github.com/chen3feng/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/chen3feng/agent-skills/wsl-bash-crlf-or-tempfile)<a href="https://agentmods.dev/skills/chen3feng/agent-skills/wsl-bash-crlf-or-tempfile"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/wsl-bash-crlf-or-tempfile/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/wsl-bash-crlf-or-tempfile"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/wsl-bash-crlf-or-tempfile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.02449 |
| Opus 5 | $0.00024 | $0.01224 |
| Sonnet 5 | $0.00010 | $0.00490 |
| Haiku 4.5 | $0.00005 | $0.00245 |
Grade A, and why
wsl-bash-crlf-or-tempfile scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WSL bash scripts: kill CRLF, or route through a temp file
When to use
You're driving a Linux toolchain from Windows: a PowerShell or .bat
script builds a multi-line bash body and runs it in WSL via
wsl.exe -d <distro> -- bash -c "<body>". Symptoms that land you
here:
bash: line 1: set: pipefail : invalid option name(note the phantom space before the:— that's a literal\r).bash: line N: $'<something>\r': command not found.- Heredoc bodies that silently truncate at the wrong line.
- A bash
if/thenblock reports a syntax error at a line that looks perfectly fine in your editor.
It's not "my bash is wrong"; it's CRLF contamination crossing the Windows → WSL boundary.
Problem
PowerShell's here-strings (@' … '@, @" … "@) and .bat echo
lines emit CRLF by default. When you hand the resulting string
to wsl.exe bash -c "$body", Linux bash reads the \r as a
normal character that is part of the previous token:
set -euo pipefail\rbecomes the commandsetwith options-e,-u,-o,pipefail\r. bash printsset: pipefail : invalid option name— the "space" before the colon in the error message is actually the carriage return.FOO=bar\rsetsFOOtobar\r, and the later comparison[ "$FOO" = "bar" ]silently fails.fi\r/done\rare accepted as words, so theif/foris never closed and the parser reports an error many lines below the actual cause.
Why it's easy to miss:
- Your editor (VS Code, Notepad++, etc.) happily hides
\r. - The CRLF shows up only when the script crosses into WSL. If
you run the same body via
Invoke-Expressionon Windows, or dump it to disk andtypeit, everything looks fine. - The usual quoting-skills reflex (escape the dollar signs, quote the body, etc.) doesn't help — this is a line-ending issue, not a quoting issue.
The related \0 NUL trap at the API boundary is a different
problem (see Pitfalls below).
Solution
Two reliable fixes. Prefer #2 for anything beyond a one-liner — it composes better and gives you a debuggable artifact.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 228 lines · 48 tokens per session scan A b2201e2a57a0
wsl-bash-crlf-or-tempfile is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 2,449 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
wispr-flow-debug
Debug and test the Wispr Flow AutoHotkey dictation triggers (Copilot key + extra keys) from WSL by deploying macos.ahk to the Windows Desktop, reloading AutoHotkey, and reading the debug log. Use when an activation/trigger key isn't starting/stopping dictation, when the overlay clicks land wrong, or when verifying a…
windows-dev-process-cleanup
A Windows troubleshooting guide for auditing and safely cleaning leftover development processes and UWP background tasks. UWP is Windows' platform for packaged apps.
flare
Manage Flare error tracking and performance monitoring using the flare CLI. Use when the user wants to list, triage, resolve, snooze, or debug errors; manage projects; create projects and retrieve API keys; check error counts; investigate slow routes, queries, jobs, or commands; view aggregated performance data and…
audit-architecture
Run an application-wide, read-only architecture audit that finds materially useful simplifications in a codebase's data structures, state representation, control flow, algorithms, and ownership boundaries. Fans out bounded read-only agents per subsystem, verifies every finding against the repo, and ranks results P0 to…
powershell-docs
PowerShell 7.6 + Windows PowerShell 5.1 — variables, arrays, hashtables, functions, classes, remoting, modules, DSC.
oh-my-posh
Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.