AgentStack
SKILL verified Apache-2.0 Self-run

New Environment Variable

skill-rapid-recovery-agency-inc-agents-skills-new-environment-variable · by rapid-recovery-agency-inc

This skill provides instructions on how to add new environment variables and ensures robust, testable, and maintainable environment variable usage across both TypeScript and Python projects.

No reviews yet
0 installs
1 views
0.0% view→install

Install

$ agentstack add skill-rapid-recovery-agency-inc-agents-skills-new-environment-variable

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of New Environment Variable? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Skill Instructions

This skill provides instructions into how to add new environment variables, and also, provided context, guidelines and patterns for managing environment variables in both TypeScript and Python projects. It emphasizes best practices for loading, validating, and accessing environment variables to ensure consistency and maintainability across the codebase.

Principles

  • 12-Factor App: All config is stored in environment variables, never hardcoded.
  • Centralized Access: All environment variable instrumentation is maintained in "shared/environment.ts" for TypeScript and "shared/environment.py" for Python; and access is through a single exported function "env()".
  • Validation: Required variables are validated at startup; missing keys are reported.
  • Type Safety: Use interfaces/types (TypeScript) or dataclasses (Python) to define expected variables.
  • Runtime Loading: Always load environment variables at runtime, not at module load time.
  • Override for Flexibility and Testing: Provide a function "setEnvironment(newenvironment)" for TypeScript and "setenvironment(new_environment)" for Python to set or override variables values.
  • No Magic Strings: Never use raw string keys for env vars outside the central module.

When to use the skill

Use this skill whenever you need to add a new environment variable to the project, or when you need to access environment variables in your code. This skill ensures that you follow best practices for environment variable management, which helps maintain a clean and consistent codebase.

Step-by-step procedures to follow

  1. Identify the new environment variable you need to add, and determine its name and expected type.
  2. Open the central environment variable module: "shared/environment.ts" for TypeScript or "shared/environment.py" for Python.
  3. Add the new environment variable to the appropriate interface/type (TypeScript) or dataclass (Python) that defines the expected environment variables.
  4. Implement validation logic for the new variable in the "env()" function to ensure it is present and of the correct type at startup.
  5. Use the "env()" function to access the environment variable in your code, ensuring you do not use raw string keys for accessing it.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.