env-var-conventions

Centralize SGLANG_* environment variables in Envs descriptors with typed access and deprecation.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill env-var-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-var-conventions
Source: https://github.com/annealing-inversion/sglang-kimi-deferral/tree/main/.claude/skills/env-var-conventions
Command: npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill env-var-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Conventions for SGLang environment variables — where to define, how to access, how to name, and how to deprecate. Use when adding, renaming, or reviewing any SGLANG_* environment variable (or migrating a legacy SGL_* alias), or when touching python/sglang/srt/environ.py.

Core Features & Use Cases

  • Defines all sglang-owned env vars in the Envs class on python/sglang/srt/environ.py to ensure centralized access and consistent typing.
  • Enforces a standardized naming scheme (SGLANG_ prefixes and verb-based schemes), deprecation handling, and clear separation between sglang-owned and vendor aliases.
  • Provides guidance for tests and overrides to safely modify environment variables in production-like and test environments.

Quick Start

Define a new environment variable under Envs in python/sglang/srt/environ.py and migrate any legacy SGL_ alias.

Frequently Asked Questions about env-var-conventions

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

FAQPage Schema
How do I define and centralize SGLang environment variables for consistent typing?

To centralize SGLang environment variables, define them using the Envs descriptors in python/sglang/srt/environ.py. This ensures consistent access, standardized naming, and typed configuration management across the codebase.

What is the standard naming convention for SGLang env vars and legacy SGL_ aliases?

SGLang env vars must use the SGLANG_ prefix with a verb-based naming scheme. When migrating legacy SGL_ aliases, apply these explicit naming rules to separate sglang-owned variables from vendor aliases.

How do I safely deprecate environment variables in python/sglang/srt/environ.py?

Deprecate environment variables by applying the deprecation handling within the Envs descriptors in python/sglang/srt/environ.py. This provides testable overrides and ensures safe, auditable configuration management during migration.

Can I use testable overrides for SGLang env vars in production-like environments?

Yes, the Envs descriptors in python/sglang/srt/environ.py provide guidance for tests and overrides. This allows you to safely modify environment variables in both production-like and test environments.

When do I need to migrate legacy SGL_ aliases to the SGLANG_ naming scheme?

You need to migrate legacy SGL_ aliases when adding, renaming, or deprecating any SGLANG_ environment variable. This migration enforces a standardized naming scheme and clear separation from vendor aliases.

What are the limitations of managing SGLang env vars without the Envs class?

Without the Envs class in python/sglang/srt/environ.py, you lack centralized access, explicit typing, and auditable deprecation handling. This makes safe configuration management and testable overrides unreliable across the codebase.