sglang: Skill for Claude Code

.agents/skills/sglang-runtime-context/SKILL.md

sglang-runtime-context is a skill for Claude Code, Codex from sgl-project/sglang. It costs 93 tokens per session (10,987 once invoked), scanned A, original, Apache-2.0.

A guide to SGLang's runtime configuration and process-wide state, including how startup settings are published, grouped, and read during execution.

In plain words
What is it for?
Use it when developing or testing code that reads resolved settings, manages runtime resources, or interacts with the scripted runtime's configuration and state.
Why use it?
It helps developers use the intended configuration sources and avoid reading the original startup record or handling shared resources and per-request flags incorrectly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is sgl-project/sglang's own configuration. It tells Claude Code and Codex 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 · 38,324 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/.agents/skills/sglang-runtime-context/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sgl-project/sglang

Made for: Claude Code, Codex.

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 sglang-runtime-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/sgl-project/sglang/sglang-runtime-context/github.svg)](https://agentmods.dev/skills/sgl-project/sglang/sglang-runtime-context)
Your own site
<a href="https://agentmods.dev/skills/sgl-project/sglang/sglang-runtime-context"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/sglang-runtime-context/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 sglang-runtime-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/sgl-project/sglang/sglang-runtime-context"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/sglang-runtime-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,987 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00093 $0.10987
Opus 5.5 $0.00037 $0.04395
Sonnet 5.5 $0.00019 $0.02197
Haiku 4.5 $0.00009 $0.01099

Measured 7d ago against content hash d32079b2e7a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sglang-runtime-context scanned grade A with 0 findings 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/sglang-runtime-context/SKILL.md · 666 lines

How it starts

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

SGLang runtime-context architecture

One container owns process-static runtime state: sglang.srt.runtime_context.RuntimeContext (a process singleton reached via get_context()). Everything below is a tier on it.

Tier Accessor Holds Lifecycle
raw config seed get_server_args() the published ServerArgs — the startup record, for debugging, dumps and provenance. Business code does not read fields off it: the read ratchet pins that at zero, and "Reading config: the seed is off limits" below says what to read instead, which forms the ratchet sees, and what is outside it by construction (a runtime-computed name; a whole-object hand-off) published at process entry; re-publish is last-publish-wins (the tokenizer publish in the launcher process; sequential engine rebuild in one process, e.g. unit tests) and re-projects the bags; read-only
resolved config get_exec() get_memory() get_schedule() get_model() get_spec() get_serving() get_observability() get_disagg() get_lora() get_mm() get_device() namespace config bags — the single source of truth for resolved config; leaves are real attributes (dynamo-traceable). Each is a module function of no arguments, and a module binds the name once: manager.get_disagg(), self.get_disagg = get_disagg, or a same-named import next to the bag one (from model_loader import get_model) all import fine and fail only when that path runs. ruff --select F811 catches the import collision; RuntimeContext has no bag-named member and no __getattr__, so the member-call shapes are an AttributeError at call time — give it a delegating __getattr__ and they go silent instead projected at publish from the declarations over server_args' raw fields; mutated only via get_context().override
runtime flags get_flags() state that is not a pure function of config: capture (cuda-graph lifecycle), moe (ACTIVE backends, swappable), dp (DP-attention runtime flags) materialized at subsystem init; groups offer override() for tests
resources get_resources(), get_stream(name), get_buffer(name, factory) process-level handles: graph pools, EPLB state, EP dispatcher state, named side streams, workspace buffers lazy; cleared by reset_context()
per-forward get_forward() forward-scoped flags (multi-stream switch, MoE output buffer, attn-TP inputs, extend-in-batch) contextvar-backed; scoped(**kw) restores on exit; new threads see defaults
parallel get_parallel() one spelling per name: scoped override, then permanent stamp, then published parallel config leaf ranks: stamped at publish; group handles: stamped at distributed init; configured and derived widths: after publish

reset_context() (unit-test teardown) drops the published config and installs fresh flags/resources/forward tiers.

Read the full file on GitHub · 666 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. 7d ago Changed d32079b2e7a8
  2. 8d ago Changed · -4 lines 526cbca6b8a4
  3. 9d ago Changed · +13 lines 6e6412371ee6
  4. 28d ago Changed 1224d6b91a3b
  5. 1mo ago Changed · -8 lines dac2d0e6f851
  6. 1mo ago Changed · +34 lines 3f24aeeadf94
  7. 1mo ago Changed · +2 lines 89762ebfd385
  8. 1mo ago Changed · +20 lines cbfa0d64710d
  9. 2mo ago First seen · 609 lines · 93 tokens per session scan A 6c2955b512b0

Subscribe to this mod's changes

sglang-runtime-context is a skill published in the GitHub repository sgl-project/sglang (38,324 stars, last pushed today), licensed Apache-2.0. It adds 93 tokens to every session and 10,987 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. 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

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

mlx-serve

Hook an app, game or script up to the local mlx-serve server for LLM chat, embeddings, image, speech, music, sound effect, video and 3D generation, and Laya/Kev/Clef typed decisions, or make a whole film or music video on this Mac. Use when code should call mlx-serve or the user wants a video, song, pictures or game…

ddalcu/mlx-serve · 88 tokens

stripe-projects

Provision SaaS services + sync creds via Stripe Projects.

NousResearch/hermes-agent · 15 tokens

fastapi-patterns

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

affaan-m/ECC · 35 tokens

status

Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.

mem0ai/mem0 · 54 tokens