Agent Skill
2/7/2026

web-environment-setup

Sets up Claude Code web environment for building the Umbraco.AI solution. Installs .NET SDK, configures proxy for NuGet, and prepares git for GitVersioning. Use this when starting a new Claude Code web session to build the project.

U
umbraco
14GitHub Stars
1Views
npx skills add umbraco/Umbraco.AI

SKILL.md

Nameweb-environment-setup
DescriptionSets up Claude Code web environment for building the Umbraco.AI solution. Installs .NET SDK, configures proxy for NuGet, and prepares git for GitVersioning. Use this when starting a new Claude Code web session to build the project.

name: web-environment-setup description: Sets up Claude Code web environment for building the Umbraco.AI solution. Installs .NET SDK, configures proxy for NuGet, and prepares git for GitVersioning. Use this when starting a new Claude Code web session to build the project. allowed-tools: Bash, Read

Web Environment Setup

You are helping set up the Umbraco.AI repository for building in Claude Code web environment.

Task

Run the web environment setup script to prepare the environment for .NET development.

Quick Start

# One-command setup
source .claude/scripts/setup-web-environment.sh

# Build
dotnet build Umbraco.AI.slnx

Workflow

  1. Run the setup script:

    source .claude/scripts/setup-web-environment.sh
    
  2. Verify the setup by checking:

    • dotnet --version returns 10.x
    • Proxy environment variables are set
    • Git is not a shallow clone
  3. Test the build:

    dotnet build Umbraco.AI.slnx
    

Problem

Claude Code web runs in a sandboxed environment with restrictions:

  1. Proxy Authentication - Network requests go through a JWT-authenticated proxy
  2. Package Feed Restrictions - Only certain hosts are allowed (e.g., api.nuget.org but not www.myget.org)
  3. Shallow Git Clones - May break Nerdbank.GitVersioning
  4. .NET SDK - May not be pre-installed

Scripts

ScriptPurposeUsage
setup-web-environment.shFull environment setupsource .claude/scripts/setup-web-environment.sh
setup-dotnet-proxy.shProxy + NuGet config onlysource .claude/scripts/setup-dotnet-proxy.sh
dotnet-with-proxy.shRun dotnet with proxy.claude/scripts/dotnet-with-proxy.sh restore

What setup-web-environment.sh Does

  1. Installs .NET SDK 10.0 via apt (if not present)
  2. Starts px-proxy to handle JWT-authenticated proxy for NuGet
  3. Creates user-level NuGet.Config that uses only api.nuget.org (bypasses restricted MyGet feeds)
  4. Unshallows git clone so Nerdbank.GitVersioning can calculate version height

Environment Detection

All scripts automatically detect if they're running in Claude Code web by checking for JWT proxy patterns:

if [[ "$HTTP_PROXY" =~ "jwt_" ]] && [[ "$HTTP_PROXY" =~ "@" ]]; then
    # Claude Code web environment - run setup
else
    # Local environment - do nothing
fi
EnvironmentHTTP_PROXY valueDetection
Claude Code webhttp://...jwt_eyJ...@host:port✅ Detected
Local (no proxy)(unset)❌ Not detected
Local (corporate proxy)http://proxy.corp:8080❌ Not detected

On local machines, the scripts do nothing - they're safe to run anywhere.

Troubleshooting

IssueSolution
Proxy errorsCheck /tmp/px-proxy.log
NuGet restore failsVerify proxy: pgrep -f px
GitVersioning errorsRun git fetch --unshallow origin
MyGet warningsSafe to ignore - nuget.org is used instead

How It Works

┌─────────────────────────────────────────────────────────────────┐
│                    Claude Code Web Environment                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  HTTP_PROXY = http://...jwt_<token>@<host>:<port>              │
│       │                                                         │
│       ▼                                                         │
│  ┌─────────────┐     ┌─────────────┐     ┌─────────────┐       │
│  │  px-proxy   │────▶│  Sandbox    │────▶│  Allowed    │       │
│  │  :3128      │     │  Proxy      │     │  Hosts      │       │
│  └─────────────┘     └─────────────┘     └─────────────┘       │
│       ▲                                         │               │
│       │                                         ▼               │
│  ┌─────────────┐                        ┌─────────────┐        │
│  │   dotnet    │                        │ api.nuget.org│        │
│  │   restore   │                        │ (allowed)   │        │
│  └─────────────┘                        └─────────────┘        │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

The px-proxy handles the JWT authentication transparently, allowing standard .NET tooling to work through the sandbox proxy.

Skills Info
Original Name:web-environment-setupAuthor:umbraco