wsl-networking-mode-dns-fallback

wsl-networking-mode-dns-fallback is a skill for Claude Code, Codex from chen3feng/agent-skills. It costs 47 tokens per session (2,116 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for WSL2, the Linux environment that runs inside Windows, when mirrored networking fails and the distribution loses DNS, the system that turns domain names into IP addresses.

In plain words
What is it for?
Diagnosing WSL startup networking errors, repairing the distribution’s DNS configuration, and restoring network access for package installs, downloads, and builds.
Why use it?
It addresses the combined WSL networking and resolver settings that cause commands such as apt, curl, or git clone to fail when finding internet hosts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Diagnosing WSL startup networking errors, repairing the distribution’s DNS configuration, and restoring network access for package installs, downloads, and builds.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback
Install

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.

Any agent
npx skills add chen3feng/agent-skills --skill wsl-networking-mode-dns-fallback
Clone the repo
git clone --depth 1 https://github.com/chen3feng/agent-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for wsl-networking-mode-dns-fallback

README.md
[![agentmods](https://agentmods.dev/badge/skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback/github.svg)](https://agentmods.dev/skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback)
Your own site
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback/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.

agentmods 80×15 button for wsl-networking-mode-dns-fallback

Your own site · 80×15
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/wsl-networking-mode-dns-fallback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.02116
Opus 5 $0.00023 $0.01058
Sonnet 5 $0.00009 $0.00423
Haiku 4.5 $0.00005 $0.00212

Measured 10d ago against content hash 520aa1a0095e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

wsl-networking-mode-dns-fallback scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

You're running something in a WSL2 distro from Windows (apt-get, curl,
skills/wsl-networking-mode-dns-fallback/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WSL networking fallback leaves the distro with no DNS

When to use

You're running something in a WSL2 distro from Windows (apt-get, curl, git clone, cmake fetching deps, a CI sweep script) and it fails at name resolution:

  • Temporary failure resolving 'archive.ubuntu.com'
  • curl: (6) Could not resolve host: github.com
  • apt-get update prints W: Failed to fetch ... Temporary failure resolving
  • getent hosts <anything> returns nothing, exit code 2.

And you see one or both of these on WSL startup:

  • wsl: An internal error occurred. Error code: CreateInstance/CreateVm/ConfigureNetworking/0x8007054f
  • wsl: Failed to configure network (networkingMode Mirrored), falling back to networkingMode None.

This is not a transient DNS glitch. The distro is actually networkless, and /etc/resolv.conf is either missing or stale.

Problem

Two independent misconfigurations combine into a total outage:

  1. networkingMode = mirrored in %USERPROFILE%\.wslconfig. Mirrored mode depends on Hyper-V virtual-switch features that fail on some Windows builds / VPN / antivirus setups with ConfigureNetworking/0x8007054f. WSL then "helpfully" falls back to networkingMode = None, which means no NAT, no vEthernet, nothing — the distro only has lo and cannot reach the host network, let alone the internet.

    • ip addr inside the distro shows only lo and sometimes a leftover 10.255.255.254/32 on lo (the old mirrored address).
    • ping 8.8.8.8Network is unreachable.
  2. generateResolvConf = false in /etc/wsl.conf. With that flag, WSL will not rewrite /etc/resolv.conf on boot. Whatever state the file was last left in persists — and if it was a broken symlink (a common leftover from distros like systemd-resolved experiments), cat /etc/resolv.conf prints No such file or directory, and every lookup fails regardless of the underlying network.

Either one alone would break DNS. Together they look like "WSL is totally broken" and the error messages don't point at either config file.

Read the full file on GitHub · 197 lines

Changes

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.

  1. 10d ago First seen · 197 lines · 47 tokens per session scan A 520aa1a0095e

Subscribe to this mod's changes

wsl-networking-mode-dns-fallback is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 47 tokens to every session and 2,116 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

Triage Kubernetes Service DNS

Diagnose in-cluster DNS resolution failures and isolate root causes.

bregman-arie/devops-sre-skills · 19 tokens

graphics-api-hooking

Analyze Direct3D/DXGI, OpenGL, and Vulkan rendering, presentation, composition, and capture evidence. Use to distinguish API samples, PresentMon event metrics, Tracy instrumentation, compatibility translation, frame images, and validation diagnostics; review swap chains, overlays, resource lifetime, and…

gmh5225/awesome-game-security · 90 tokens

yt-dlp-music-downloads

Download YouTube playlists into the Navidrome music library.

AmineDjeghri/personal-os-setup · 20 tokens

skill-deployment

Use when deploying the shared agent skills via chezmoi, or fixing "not managed" errors.

AmineDjeghri/personal-os-setup · 24 tokens

wispterm-diagnostics

Use when a user wants to report, troubleshoot, or collect context for a WispTerm issue, including crashes, rendering/DPI glitches, high CPU, keyboard/input bugs, selection/copy/scrolling, SSH/SCP failures, SSH image preview failures, HTML preview/browser panel failures, SSH disconnects such as…

xuzhougeng/wispterm · 88 tokens

procmon

Capture and analyze Windows process / file / registry / network activity with OpenProcMon (procmon-cli). Use when investigating what a program does — files it writes, registry keys it touches, network it makes, its process tree and call stacks — or when analyzing a Procmon-compatible .PML capture. The model: a capture…

progmboy/openprocmon · 80 tokens