sglang: Skill for Claude Code

.claude/skills/env-var-conventions/SKILL.md

env-var-conventions is a skill for Claude Code from sgl-project/sglang. It costs 77 tokens per session (3,245 once invoked), scanned A, original, Apache-2.0.

A set of rules for SGLang environment variables, which are settings supplied to a program through the operating system. It explains where to define them, how to read them, how to name them, and how to retire old names.

In plain words
What is it for?
Adding, renaming, reviewing, or migrating SGLang environment variables, especially variables beginning with SGLANG_ or legacy SGL names.
Why use it?
It prevents environment-variable settings from being defined inconsistently or read through outdated helpers. This makes configuration easier to find and maintain.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is sgl-project/sglang's own configuration. It tells Claude Code how to work on sglang itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sglang configures →

About the project

SGLang is a framework for running inference for large language models and multimodal models, meaning it processes inputs to produce model outputs such as text or other media. It is used to serve and accelerate open AI models and related workloads.

sgl-project/sglang · 35,682 stars · on GitHub · sglang.io

Reuse

Borrowing it

Nothing to install: this file belongs to sgl-project/sglang. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sgl-project/sglang/main/.claude/skills/env-var-conventions/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sgl-project/sglang

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for env-var-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/sgl-project/sglang/env-var-conventions/github.svg)](https://agentmods.dev/skills/sgl-project/sglang/env-var-conventions)
Your own site
<a href="https://agentmods.dev/skills/sgl-project/sglang/env-var-conventions"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/env-var-conventions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for env-var-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/sgl-project/sglang/env-var-conventions"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/env-var-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,245 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.03245
Opus 5 $0.00039 $0.01622
Sonnet 5 $0.00015 $0.00649
Haiku 4.5 $0.00008 $0.00325

Measured 9d ago against content hash 977a40ecca1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

env-var-conventions scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

`override` mutates the real `os.environ`, so child processes spawned **inside** the `with` block inherit the override. This is the supported way to seed a `subprocess.Popen`:
.claude/skills/env-var-conventions/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Environment Variables — Conventions

Apply this skill when adding, renaming, or reviewing any sglang-owned environment variable (SGLANG_*, or a legacy SGL_* alias being phased out), or when touching python/sglang/srt/environ.py.

Rule 1 — Define in the Envs class in python/sglang/srt/environ.py

All sglang-owned env vars live as EnvField descriptors on the Envs class. Never add a new os.getenv("SGLANG_..."), get_bool_env_var("SGLANG_..."), or get_int_env_var("SGLANG_...") call site — the helpers in python/sglang/srt/utils/common.py carry an explicit FIXME: move your environment variable to sglang.srt.environ and exist only for pre-existing call sites.

Group the new entry under an existing section comment (e.g. # Logging Options, # Scheduler: recv interval, # Flashinfer). Add a new section comment only when none fits — never drop a new entry at the bottom of an unrelated block.

Decision table: register in Envs or use os.getenv?

Variable Owner Goes through Envs?
SGLANG_* sglang Always. The canonical prefix for all new entries.
MOONCAKE_*, ASCEND_*, DEEP_NORMAL_*, IS_H200, USE_TRITON_W8A8_FP8_KERNEL, HF_HUB_DISABLE_XET, DISABLE_OPENAPI_DOC Upstream/vendor alias that sglang wants to centralize Yes — register in Envs so .get() / .override() work uniformly. Keep the upstream prefix.
CUDA_*, NCCL_*, TORCH_*, OMP_*, HF_HUB_* (raw upstream) External tooling No. Read with os.getenv — they're set by the launcher / driver, not by sglang.
RANK, LOCAL_RANK, WORLD_SIZE, MASTER_ADDR, MASTER_PORT, HOME, PATH Distributed launcher / OS No. os.getenv only.
Test runner internals (PYTEST_CURRENT_TEST, etc.) Test framework No. os.getenv only.

SGL_* is not a parallel valid prefix — it's a deprecated legacy alias. _convert_SGL_to_SGLANG rewrites SGL_* to SGLANG_* at import time with a DeprecationWarning. Never define a new SGL_* descriptor or os.getenv("SGL_...") call site; if you see one in code, it's tech debt to migrate.

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 204 lines · 77 tokens per session scan A 977a40ecca1b

Subscribe to this mod's changes

env-var-conventions is a skill published in the GitHub repository sgl-project/sglang (35,682 stars, last pushed today), licensed Apache-2.0. It adds 77 tokens to every session and 3,245 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llama-factory

Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.

davila7/claude-code-templates · 51 tokens

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

perf-optimize

Launch and operate this repo's perf-optimize workflow, which iteratively APPLIES TensorRT-LLM serving optimizations — baseline benchmark at one concurrency or a Pareto curve of them (tok/s/user vs tok/s/gpu), analytical SOL projection on by default (via the internal-perf-sol-analysis skill) sizing the headroom the…

NVIDIA/TensorRT-LLM · 224 tokens

perf-analyze

Launch and operate this repo's perf-analyze workflow, which DIAGNOSES a TensorRT-LLM serving deployment without applying changes — benchmark at one concurrency or a Pareto curve of them (tok/s/user vs tok/s/gpu), analytical SOL projection on by default (via the internal-perf-sol-analysis skill), nsys + ncu per-kernel…

NVIDIA/TensorRT-LLM · 159 tokens

fireworks-ai-inference

Fast inference and fine-tuning platform with serverless and on-demand GPU deployments. OpenAI-compatible API for chat completions, embeddings, function calling, vision, and structured output. Supports SFT, DPO, and RL fine-tuning. SOC2 + HIPAA compliant.

synthetic-sciences/openscience · 62 tokens

ort

ONNX Runtime in Rust via the ort crate (2.x): loading sessions, configuring CPU/CoreML/CUDA execution providers, tensor I/O with ndarray, async-safe spawnblocking wrapping, global thread-pool init, and debugging provider/opset issues.

bobmatnyc/claude-mpm-skills · 54 tokens