claude-code-wsl2-setup
AGENTS.md50 starsChanged 3 months agoMITView on GitHub
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
In this repository3 other files it gives its agents.
- commit-push-prSkill
- deep-teachSkill
- pytorch-trainingSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 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.
2
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 22
Run bash scripts/check.sh for shell syntax, local Markdown links, and focused behavior tests.
- Distinctive: line 26
If a check cannot run, report that explicitly instead of claiming the change works.
- Distinctive: line 30
Read README.md, then only the relevant component docs.
- Distinctive: line 32
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 16,595 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;agents/andskills/contain optional installable artifacts. Keep optional and legacy components clearly labeled. Do not present the repository as a tested Ubuntu setup. - Codex skills and setup live in the separate
congmnguyen/codex-wsl2-setuprepository. 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. Seeimage-paste.md. - 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.
Verification
- Run
bash scripts/check.shfor shell syntax, local Markdown links, and focused behavior tests. These checks do not validate Windows GUI behavior. - 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.
- 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.

