add-env-var

Add and manage environment variables across .NET and SvelteKit configurations.

1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/Emmanuelkwaa/NetRockTemplate --skill add-env-var-emmanuelkwaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-env-var
Source: https://github.com/Emmanuelkwaa/NetRockTemplate/tree/main/.claude/skills/add-env-var
Command: npx skills add https://github.com/Emmanuelkwaa/NetRockTemplate --skill add-env-var-emmanuelkwaa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured approach to adding and managing environment variables for both backend and frontend applications, ensuring consistency and proper configuration across different environments.

Core Features & Use Cases

  • Backend Configuration: Guides on adding variables to appsettings.json, integrating with Aspire, and mapping to Options classes.
  • Frontend Configuration: Details on updating .env files, Dockerfile, and build arguments for frontend variables, including public and private types.
  • Use Case: You need to add a new API key for a third-party service to your SvelteKit application. This Skill will walk you through adding it securely to the backend and exposing it to the frontend if necessary, including build-time configurations.

Quick Start

Add a new backend environment variable named 'MyNewBackendVar' with a default value of 'DefaultValue'.

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 .NET and SvelteKit project?

To add environment variables to a .NET and SvelteKit project, you configure backend variables in appsettings.json and map them to Options classes, while updating .env files and Dockerfile build arguments for the frontend. This ensures proper configuration across both environments.

What is the best way to expose public frontend variables in SvelteKit during build time?

Exposing public frontend variables in SvelteKit involves updating your .env files and passing them as build-time arguments in the Dockerfile. This approach securely handles public frontend variables while keeping private secrets isolated on the backend.

How do I securely handle API keys for a third-party service in a SvelteKit application?

Securely handling API keys in a SvelteKit application requires adding the key to the backend configuration, such as appsettings.json, and only exposing it to the frontend through controlled build-time arguments if strictly necessary. This maintains secure handling of secrets and runtime configuration.

Does Aspire integration support backend environment variable configuration in .NET?

Yes, Aspire integration supports backend environment variable configuration in .NET. It facilitates adding and managing variables by integrating with appsettings.json and mapping them directly to Options classes for consistent runtime configuration.

Why do I need to update my Dockerfile when adding environment variables to a frontend application?

Updating your Dockerfile is necessary when adding environment variables to a frontend application because public frontend variables are often injected during the build process. This ensures the variables are correctly compiled and available at runtime without exposing private secrets.