/agentic-awesome-skills:windows-agent-shellfrom agentic-awesome-skills
Diagnoses cross-shell issues on Windows: Git Bash path rewriting, PowerShell quoting/encoding, CRLF line endings. Use when output is garbled or commands work in one shell but break in another.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Keep the scope, sandbox, credentials and approval settings supplied by the user or host. Obtain authorization before delegating, exposing project files to another provider, enabling connectors or hooks, using paid services or deploying. Use synthetic or redacted inputs for examples. Keep security reviews static and defensive, with findings and fixes grounded in source inspection.
A coding agent on Windows: Git Bash path rewriting, PowerShell quoting and encoding, CRLF. Use when output comes back garbled, or it works here and breaks there.
When something works here and breaks there, suspect the environment you did not measure. A Windows coding agent runs through Git Bash, PowerShell or cmd. Each splits arguments, expands characters, converts paths and decodes text differently. A command right in one can pass with a different meaning in another.
Hold the invocation constant before attributing a change to configuration. The shell, CLI version, path spelling and line endings are part of the invocation. Every version-specific line carries its version and observation date. Retest the specific behavior before relying on it (§ Re-verify).
2026-10-24).commandWindows. Apply the guardrail-hooks skill for the hook side.powershell.exe) ships with Windows; PowerShell 7 uses pwsh. A script or instruction saying pwsh fails where it is absent.python <skill dir>/scripts/probe_argv.py <the same arguments>. It prints exactly what the program receives and which encodings its pipes use.\ as an escape. Write C:/Python313/python.exe; Windows accepts it. Backslashes also fed Claude Code's Windows command analyser and caused permission prompts (observed 2026-08-16).C:/work/app rather than c:/work/app with npm --prefix. On Vitest, a lowercase drive can give No test suite found, zero tests and exit 1 (observed 2026-08-22). Keep the command shape constant when comparing runs: changed shapes can look like a worker-count cliff or a broken suite./ into a Windows path before the program sees it. gh api /repos/owner/name fails with invalid API endpoint: "C:/Program Files/Git/repos/owner/name". --flag=/etc/x arrives as --flag=C:/Program Files/Git/etc/x (verified and observed 2026-10-24, Git 2.49.0, gh 2.100.0). Drop the leading slash (gh api repos/owner/name) or set MSYS_NO_PATHCONV=1 for that command./c/x paths before Windows programs open them. Git Bash spells C:/x as /c/x, which Windows programs can't open. Convert paths read from commands (/c/x → C:/x). Claude Code hook-input file paths arrive with backslashes even under Git Bash (docs, read 2026-10-24); normalize before comparing.npm --prefix <worktree> install can create a package junction to another checkout when run from a checkout supplying a package the worktree depends on. Recursive deletion of node_modules, or git worktree remove --force, goes through that junction. Run installs with the target as the process's working directory. List node_modules for junctions before deleting; remove the junction itself first. rmdir on the link doesn't follow it. Then run git worktree remove without --force.git commit -m "..." are command substitution. Backticked words execute and are replaced by their output, usually nothing, without warning. See § Commit messages for the safe spelling.-c.foo=bar token in two. Windows PowerShell 5.1 does this too (reproduced and observed 2026-10-24, 5.1.26100): ["-c", ".a.b=c"] bare, ["-c.a.b=c"] quoted. Quote it, and pin the quoted spelling with a test. A matrix can half-break and look finished: check the assets, not the run. A flag that has never been passed before has never been tested.$LASTEXITCODE, with stderr non-fatal around them. Under $ErrorActionPreference = "Stop", Windows PowerShell 5.1 turns redirected native stderr into a terminating error. Reproduced 2026-10-24 (5.1.26100): an exit-0 program writing one warning, called with 2>&1, ended the script with NativeCommandError.$env:DATABASE_URL = "" removes it, so a loader such as dotenv fills it back in from .env; a supposedly database-free run reaches the configured database. Bash's DATABASE_URL= cmd passes an empty value instead (reproduced and observed 2026-10-25, 5.1.26100). Set a single space when the code trims values to absent, or pass an explicit flag. When an attempt may have touched a real system, say so in the handoff.2026-09-25), which can kill a release between the tag and the installers. Use powershell.exe -NoProfile -ExecutionPolicy Bypass -File <script> from the Bash tool with a long timeout. This has carried 16-minute runs without interruption.Get-Content. It decodes with the ANSI code page. (Get-Content f -Raw) -replace 'a','b' | Set-Content f -Encoding utf8 gives each § a stray Â. It turns every — into â € ”; -Encoding utf8 makes the write look safe, but the damage is on the read. Reproduced and observed 2026-10-24 (5.1.26100): the write also adds a UTF-8 BOM and trailing CRLF.
--body-file or -F body=@file, which reads bytes.check_text.py. Run python <skill dir>/scripts/check_text.py <files> to flag mojibake, BOM, CRLF and invalid UTF-8.git checkout <good-ref> -- <file>. Don't reverse double encoding: CP1252's 0x80–0x9F range doesn't round-trip, so reversal loses characters.cp1250 or cp1252. PYTHONUTF8=1 uses utf-8 (observed 2026-10-24, Python 3.13.1). In piped scripts, reconfigure stdout and stderr to UTF-8 and decode stdin as UTF-8 bytes, or set PYTHONUTF8=1.core.autocrlf can normalize CRLF on commit while leaving the working tree wrong despite .gitattributes specifying eol=lf. Source-anchored tests can fail in a file the batch never touched, misleading a delegate into blaming the checkout.
git ls-files --eol | grep w/crlf. It lists endings differing from the index. Use check_text.py for untracked files; grep -c $'\r' is not reliable under Git Bash.check_text.py --fix-crlf <files>, which changes nothing else.Make each path, directory and write target literal for the analyser. If an ordinary command stops for manual approval, try the harmless probe cd <dir> && sed -n '1,5p' <file>. If the problem still reproduces, open references/troubleshooting.md for the dated workaround table. Drop workarounds whose cause is gone.
Use directory flags for commands resolving configuration from their working directory. Use npm --prefix <dir> run <script>, git -C <dir>, node <absolute script path>, and --cwd <dir> for delegate CLIs. npm --prefix was verified to set the script's own working directory and survive nested npm run. A standalone cd leaving the session's project root was bounced next call with Shell cwd was reset to ... (observed 2026-08-16).
Move loops into scripts without concealing safety-relevant flags from the classifier. A script is fine for moving a loop out of the command. Never use it to hide a safety-relevant flag. It stays on disk and gets read.
Read auto-mode settings and denial reasons from their effective sources. These facts are not Windows-specific (observed 2026-08-16):
autoMode is read only from user settings, never project .claude/settings*.json. Since 2.1.207, a checked-in repository cannot grant itself rules."$defaults" when extending an autoMode array. Without it, the array replaces the built-in list. For soft_deny, that silently drops force-push and production-deploy protection. claude auto-mode config shows the result./permissions → Recently denied for a classifier block's real reason. Since 2.1.208, the agent sees only Blocked by classifier.Write CLI text to a file and pass it by path. Use git commit -F <file>, gh ... --body-file <file>, or gh api ... -F body=@<file>. The shell expands nothing in the file, and an analyser has nothing to infer.
Write text containing backslashes with the file tool. Run scripts by path and pass other text by path. Skip heredocs even with a quoted delimiter, because the Windows Bash tool can strip an escape. See test-harness § Generated files in references/rules-from-bugs.md for the related test rule.
Use a quoted heredoc for other text where your version accepts it. The usual fix is git commit -F -, never -m "...", because backticks execute and vanish silently (§ Arguments 1). A quoted delimiter (<<'EOF') prevents shell expansion. Native Windows auto mode in Claude Code 2.1.232/2.1.233 read heredocs as “expansion obfuscation” and prompted (observed 2026-08-16). On 2.1.310 (observed 2026-10-24), they ran without stopping.
Never -m with backticks · never text that came through PowerShell 5.1's Get-Content (§ Encoding 1).
Stop a Windows background server by its process ID or listening port. Stopping the task can end only its shell wrapper. Find the server process, stop it, and check that the port is free before reporting it stopped.
When you shell out to someone else's CLI, its version on the target machine is the contract. Local tests and review can pass against tools different from the target's.
gh api user --jq .login, which every plausible version has.{.--json the way the old gh auth status version does.mv -n declines to overwrite; Git Bash's mv exits 0 (observed 2026-09-25).Retest each version-specific fact and replace any line whose behaviour changed. Correct its date and remove workarounds whose cause is gone. Open references/troubleshooting.md for the retest matrix.
Each rule's origin, the case that taught it, is in receipts.md beside this file; read it when a rule's edge is unclear.
A probe shows the program received the arguments, paths and text you meant. The command means the same thing in the shell that actually runs it.
| File | Does |
|---|---|
scripts/check_text.py | flags mojibake (UTF-8 decoded as CP1252 or CP1250), a UTF-8 BOM, CRLF and invalid UTF-8 in files, directories or a repository's changed and untracked files (--changed); --fix-crlf normalises line endings and nothing else; --self-test checks the checker |
scripts/probe_argv.py | prints the arguments a program actually received, its working directory and its pipe encodings, for measuring what a shell did to a command |
references/troubleshooting.md | dated Git Bash auto-mode workarounds and retest commands for individual shell behaviours |
Launch a harmless argument probe with a workspace path containing spaces. Compare the received argv with the expected single path argument before running a file-writing command.
Treat upstream examples as patterns. Validate scope and results against current project constraints, available tools and decisions recorded by the owner.
Adapted from Pawel Huryn’s upstream skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.2 plugins in one repository ship this exact skill · first indexed Nov 21, 2026
Other plugins' skills for the same job