claude-code-wsl2-setup
AGENTS.md56 starsChanged 46 days agoMITView on GitHub
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Run screenshot paste only through the systemd user service.
- Very specific: line 20
Keep scripts/doctor.sh read-only: no file edits, service changes, or notifications.
- Very specific: line 24
Run bash scripts/check.sh for shell syntax, shellcheck, local Markdown links, documentation snippets, and focused behavior tests.
- Distinctive: line 29
If a check cannot run, report that explicitly instead of claiming the change works.
- Distinctive: line 33
Read README.md, then only the relevant component docs.
- Distinctive: line 35
Call out Windows-side steps that WSL cannot safely apply, including Windows Terminal settings and SharpKeys remapping.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md 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
Repository instructions
Purpose
- This repository preserves the maintainer's previous Claude Code setup for WSL2 + Windows Terminal. The maintainer now uses Ubuntu + Ghostty and no longer tests WSL2 daily. It has no build system or package manager; lightweight checks live in
tests/andscripts/; deliverables are Markdown docs, shell scripts, and config snippets. - The current machine's
~/.claude/is not the source of truth for the preserved WSL2 setup. Do not synchronize it with this repository or install WSL2 components on Ubuntu as part of documentation maintenance. - Root
*.mdfiles document setup components. Keep optional components clearly labeled. Agents, skills, and copies of official plugins were removed; do not add them back. Do not present the repository as a tested Ubuntu setup. - The separate
codex-wsl2-setuprepository no longer exists. The Codex notification and terminal-title notes stay here because they reuse this repository's scripts; Codex delegation was removed; recover it from git history if needed. Do not restore a Codex backup tree here.
Non-obvious constraints
- Run screenshot paste only through the systemd user service; do not add shell or Claude hooks that can race or stop the supervised
wsl-screenshot-cliprocess. The upstream installer offers to add exactly those, so the guide installs a pinned release instead. Seeimage-paste.md. bin/claude-notifypasses text to PowerShell base64-encoded. Never interpolate text into a PowerShell string literal: PowerShell also ends single-quoted strings at‘ ’ ‚ ‛, and Codex replies are untrusted model output.- There are no
PreToolUseorPostToolUsehooks in this setup, and none should be added. Every one tried here matched on patterns, and a pattern that is wrong in either direction is worse than nothing: a truncating hook destroyed the middle of failing test output, a credential-blocking hook rejected ordinary source files namedtoken_manager.py, and a Ruff autofix hook silently deleted imports out of files Claude had just written. Prefer exact-matchpermissions.denyrules, which cannot misfire. Seepruned-notes.md. Notificationhooks remain part of the documented WSL2 setup. Seeclaude-notify.md.- Browser automation is no longer documented here;
playwright-cli.mdand the Playwright section ofmcp-setup.mdwere removed.mcp-setup.mdnow covers only the project-scoped Figma Desktop MCP. Recover the old pages from git history rather than rewriting them. ~/.claude/keybindings.jsonmust be an object containing abindingsarray; a bare array silently fails.- In
~/.claude/settings.json, merge settings instead of replacing the file. Useattribution, not deprecated or invented attribution keys. Seesettings.md. - Normalize
assets/preview-*.pngto a 1220x788#0d1117canvas and render previews at width 720 inREADME.md.tests/test_docs.pyenforces both. - Keep
scripts/doctor.shread-only: no file edits, service changes, or notifications. Its output goes into public issues, so keep home paths and Windows user names abbreviated.
Verification
- Run
bash scripts/check.shfor shell syntax, shellcheck, local Markdown links, documentation snippets, and focused behavior tests. These checks do not validate Windows GUI behavior. - Checks that need
tmux,zsh,pwsh, orshellcheckskip when the tool is missing; CI setsCHECKS_REQUIRE_ALL=1, which turns those skips into failures. Report which checks were skipped locally. - Shell changes: also run a focused behavior check for any behavior not covered by the suite.
- JSON/config changes: parse them and verify the live consumer loads them when possible.
- Documentation changes: verify referenced paths, commands, cross-links, and consistency with the documented WSL2 scope. Do not claim WSL2 runtime verification from an Ubuntu-only check; record real WSL2 runs in
maintenance.mdunder "WSL2 verification status". - If a check cannot run, report that explicitly instead of claiming the change works.
Setup requests
- Read
README.md, then only the relevant component docs. Confirm the target environment is WSL2 before applying WSL2-specific configuration. Install requested components; leave optional or legacy components alone unless requested. - Preserve existing user settings while merging hooks, permissions, plugins, and statusline configuration.
- Call out Windows-side steps that WSL cannot safely apply, including Windows Terminal settings and SharpKeys remapping.
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.

