.NET Environment Plugin for Claude Code web

A Claude Code plugin that enables .NET development in Claude Code web sessions by fixing NuGet proxy authentication and providing .NET SDK installation guidance.
Problem Solved
In Claude Code web environments with JWT-authenticated proxies:
- NuGet fails with 401 errors because .NET's
SocketsHttpHandler does not send Proxy-Authorization on the HTTPS CONNECT request (dotnet/runtime #66244)
- The standard .NET SDK installer is blocked because
dot.net redirects to builds.dotnet.microsoft.com which isn't in the proxy allowlist
This plugin solves both problems.
How It Works
NuGet → localhost:8888 (credential provider proxy) → Upstream Proxy (JWT injected) → nuget.org
[no auth required] [Proxy-Authorization header] [internet]
A C# NuGet credential provider:
- Compiles to a .NET DLL in
~/.nuget/plugins/netcore/ for auto-discovery by NuGet
- Embeds an HTTP/HTTPS proxy that injects JWT auth into upstream proxy requests
- Manages the proxy lifecycle as a background daemon
- Implements the NuGet cross-platform plugin protocol v2
Installation
The following installs a plugin to your machine, user profile or project (you'll be asked by Claude). This can then be used to install
a session start hook that sets up a .NET environment in your repo/project for when used in Claude Code web.
Claude Code (CLI)
/plugin marketplace add logiclabs/dotnet-nuget-proxy-skill
/plugin install dotnet-nuget-proxy@dotnet-nuget-proxy
Manual Installation
git clone https://github.com/logiclabs/dotnet-nuget-proxy-skill ~/.claude/plugins/dotnet-nuget-proxy
Automatic Setup (SessionStart Hook)
For .NET projects, add a SessionStart hook so the SDK and proxy are ready automatically when a Claude Code web session starts.
Slash Command (Recommended)
If you already have the plugin installed, run this in a Claude Code session inside your project:
/dotnet-nuget-proxy:install-dotnet-web
Claude will download the plugin files into .claude/plugins/dotnet-nuget-proxy-skill/, configure the SessionStart hook in .claude/settings.json, and tell you what to commit.
One-Line Install
Run this from your project directory:
curl -sSL https://raw.githubusercontent.com/logiclabs/dotnet-nuget-proxy-skill/main/install.sh | bash
Or install into a specific project:
curl -sSL https://raw.githubusercontent.com/logiclabs/dotnet-nuget-proxy-skill/main/install.sh | bash -s /path/to/project
This downloads the latest release, extracts the plugin into .claude/plugins/dotnet-nuget-proxy-skill/, and configures the SessionStart hook in .claude/settings.json. Commit the .claude/ directory to your repo.
Manual Setup
Manual steps (if you prefer not to use the install script)
1. Download and extract the plugin into your project:
mkdir -p .claude/plugins
curl -sSL https://github.com/logiclabs/dotnet-nuget-proxy-skill/archive/refs/tags/v1.0.0.tar.gz \
| tar -xz -C .claude/plugins/ --strip-components=1 --one-top-level=dotnet-nuget-proxy-skill
2. Register the hook in .claude/settings.json:
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash \"$CLAUDE_PROJECT_DIR\"/.claude/plugins/dotnet-nuget-proxy-skill/hooks/session-start.sh"
}
]
}
]
}
}
3. Make the hook executable and commit both to your repo:
chmod +x .claude/plugins/dotnet-nuget-proxy-skill/hooks/session-start.sh
All future Claude Code web sessions will have .NET ready automatically.
The hook only runs in web sessions (checks CLAUDE_CODE_REMOTE internally and exits on desktop). It installs the .NET SDK, compiles the credential provider, starts the proxy, and persists env vars for the session.
Manual Setup for a New Session
1. Install .NET SDK (if not already installed)
Do NOT use dot.net/v1/dotnet-install.sh — it redirects to a blocked domain. Use packages.microsoft.com:
curl -sSL https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb \
-o /tmp/packages-microsoft-prod.deb
dpkg -i /tmp/packages-microsoft-prod.deb
apt-get update --allow-insecure-repositories
apt-get install -y --allow-unauthenticated dotnet-sdk-8.0
curl and apt-get automatically use the HTTPS_PROXY environment variable already set in Claude Code web.
2. Set Up the Credential Provider
source skills/nuget-proxy-troubleshooting/files/install-credential-provider.sh