add-env-var

Add environment variables across .NET and SvelteKit configuration files.

230|29|Updated Dec 25, 2025
One-click install
npx skills add https://github.com/fpindej/netrock --skill add-env-var
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-env-var
Source: https://github.com/fpindej/netrock/tree/main/.claude/skills/add-env-var
Command: npx skills add https://github.com/fpindej/netrock --skill add-env-var

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers manage environment variables for both backend and frontend applications, ensuring correct configuration across different environments and build processes.

Core Features & Use Cases

  • Backend Configuration: Guides on adding variables to appsettings.json, using Aspire wiring, and mapping to Options classes.
  • Frontend Configuration: Instructions for adding variables to .env files, Dockerfiles, and SvelteKit's $env modules.
  • Use Case: You need to add a new API key for a third-party service to your SvelteKit application. This Skill will guide you through adding it to the necessary backend and frontend configuration files, including build-time arguments for Docker.

Quick Start

Add a new backend environment variable named 'MY_API_KEY' with the value '12345' to appsettings.Development.json.

Frequently Asked Questions about add-env-var

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add environment variables to a SvelteKit and .NET project?

To add environment variables, configure them in `appsettings.json` and Aspire Options classes for the backend, and use `.env` files plus SvelteKit's `$env` modules for the frontend. This covers both backend-consumed and frontend-consumed variables.

How do I configure public frontend environment variables in SvelteKit?

Configure public frontend environment variables in SvelteKit by adding them to `.env` files and accessing them via SvelteKit's `$env` modules. This ensures they are correctly exposed to the frontend application during the build process.

How do I pass environment variables as build-time arguments in a Dockerfile?

Pass environment variables as build-time arguments in a Dockerfile by defining them and passing them during the Docker build process. This Skill guides you through wiring these arguments for both backend and frontend containers.

How do I wire backend environment variables using Aspire and Options classes?

Wire backend environment variables by adding them to `appsettings.json` and using Aspire wiring to map them to Options classes. This approach ensures your backend configuration is structured and accessible across different environments.

What is the difference between backend-consumed and frontend-consumed environment variables?

Backend-consumed environment variables are configured in `appsettings.json` and accessed via Options classes, while frontend-consumed variables are placed in `.env` files and accessed through SvelteKit's `$env` modules.