Dstack Prototyping
dstackai/dstack
Use with the dstack skill for model-serving work when the image, serving command, resources, backend/fleet choice, or service behavior is not proven.
Code style for SGLang large classes Scheduler, TokenizerManager, and ModelRunner: frozen-code conventions and init orchestration style.
$ npx skills add sgl-project/sglang --skill large-class-style -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sgl-project/sglang large-class-style --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/large-class-style .claude/skills/large-class-style && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "large-class-style" agent skill from https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-style into .claude/skills/large-class-style/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "large-class-style", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-styleType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sgl-project/sglang --skill large-class-style -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sgl-project/sglang large-class-style --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/large-class-style .agents/skills/large-class-style && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "large-class-style" agent skill from https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-style into .agents/skills/large-class-style/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "large-class-style", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sgl-project/sglang --skill large-class-style -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sgl-project/sglang large-class-style --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/large-class-style .cursor/skills/large-class-style && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "large-class-style" agent skill from https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-style into .cursor/skills/large-class-style/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "large-class-style", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sgl-project/sglang.git --path .agents/skills/large-class-style--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sgl-project/sglang --skill large-class-style -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sgl-project/sglang large-class-style --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/large-class-style .gemini/skills/large-class-style && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "large-class-style" agent skill from https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-style into .gemini/skills/large-class-style/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "large-class-style", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sgl-project/sglang large-class-styleInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sgl-project/sglang --skill large-class-style -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/large-class-style .github/skills/large-class-style && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "large-class-style" agent skill from https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-style into .github/skills/large-class-style/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "large-class-style", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sgl-project/sglang --skill large-class-style -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sgl-project/sglang large-class-style --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/large-class-style .opencode/skills/large-class-style && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "large-class-style" agent skill from https://github.com/sgl-project/sglang/tree/main/.agents/skills/large-class-style into .opencode/skills/large-class-style/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "large-class-style", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
large-class-styleCode style for SGLang large classes Scheduler, TokenizerManager, and ModelRunner: frozen-code conventions and init orchestration style.
Large Class Style is an agent skill from sgl-project/sglang. Code style for SGLang large classes Scheduler, TokenizerManager, and ModelRunner: frozen-code conventions and init orchestration style. Use when modifying any of these three classes or reviewing changes to them.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering. It works with SGLang and Python. The repository describes itself as: SGLang is a high-performance serving framework for large language models and multimodal models. The licence is Apache-2.0.
2 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit b7b2975. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Large Class Style loads about 1.9k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 816 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sgl-project/sglang at commit b7b2975, republished under its Apache-2.0 licence (© sgl-project). 816 words, ~1,935 tokens.
.claude/skills/large-class-style/SKILL.md (or your agent's skills folder).Conventions for SGLang's three large classes:
Scheduler — python/sglang/srt/managers/scheduler.pyTokenizerManager — python/sglang/srt/managers/tokenizer_manager.pyModelRunner — python/sglang/srt/model_executor/model_runner.pypython/sglang/srt/model_executor/model_runner.pyEvery statement refers to a collaborator and is one of:
init_<thing> helper whose body is essentially a single construction (follows §2); use maybe_init_<thing> with a one-line gate when conditional.__init__).self.foo.run(...)).if choosing whether / which collaborator to wire or call, the order of calls, threading one call's result into the next.# model_runner.py — orchestration only.
def init_foo(self): # construct
self.foo = FooManager(server_args=self.server_args, device=self.device)
self.init_foo() # wire (in __init__)
if self.server_args.enable_bar: # coordinate: select
self.bar.prepare(forward_batch) # delegate
out = self.foo.run(forward_batch) # delegate
self.baz.consume(out) # coordinate: thread result into next delegate# NOT allowed in a frozen file: domain logic inlined.
self.foo = None
if self.server_args.enable_foo:
config = build_foo_config(self.model_config, self.device) # config logic in frozen file
self.foo = FooManager(config) # inline construction, not via (maybe_)init_foo
out = [step(x) for x in batch] # computation, not coordinationFooManager (its __init__ or a factory) plus a (maybe_)init_foo helper.When you extract domain logic into a collaborator (a factory, an initializer, a pipeline), give it the specific values it needs — model_config, device, the sizes — not the whole frozen object (ModelRunner, Scheduler).
Passing the god object back re-creates the coupling the split was meant to remove: the module still reads dozens of attributes off it, can't be unit-tested without building the whole class, and every field rename ripples back in.
Default to narrow, keyword args. Reference shape: layer_setup.resolve_layer_indices(*, model, model_config, is_draft_worker, spec_algorithm).
Return a small frozen struct and let the orchestrator assign it onto its own fields. The collaborator should not reach back in and mutate the god object.
If a leaf genuinely needs the live object — its constructor contract already takes the runner, or it reads state that mutates after init — confine that dependency to the smallest leaf and pass narrow args everywhere above it. Note why it can't be narrowed.
ModelRunner owns by reading model_runner.py, the hidden writes race with the orchestrator's own ordering, and the callee silently depends on being invoked at exactly the right moment.# Good — callee reads the runner and returns a small frozen struct; the orchestrator
# owns the writes.
# model_runner.py
class ModelRunner:
def bar(self):
self.foo_result = foo(self)
# another_file.py
def foo(model_runner) -> FooResult:
return FooResult(a=xx, b=yy, c=zz)
# Avoid — callee reaches back in and writes the runner's fields.
# model_runner.py
class ModelRunner:
def bar(self):
foo(self)
# another_file.py
def foo(model_runner):
model_runner.a = xx
model_runner.b = yy
model_runner.c = zz__init__ styleApply when modifying the __init__ of the three classes above.
__init__, which rots against upstream.init_* helpers lets them override exactly what they need.TokenizerManager.__init__ in python/sglang/srt/managers/tokenizer_manager.py.__init__ is an orchestrator. Sequence of self.init_*(...) calls + minimal glue. No non-trivial construction inlined.init_* = one concern a subclass might swap. Don't lump.init_<thing> (snake_case, names the component). Conditional construction → maybe_init_<thing>, gate inside the helper.self.* set by earlier helpers. Ordering lives in __init__. Shared intermediates → pass as args, not via self.*.init_<thing>, not another inline block. One-line self.foo = server_args.foo is fine; structured logic is not.init_* signatures. Breaking changes → call out in PR.© sgl-project, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/large-class-style of sgl-project/sglang.
Open the folder on GitHubat commit b7b2975
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in sgl-project/sglang, which our catalogue first saw on October 7, 2026.
Large Class Style next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Large Class Style this skillsgl-project/sglang | 37k | 2 repos | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Dstack Prototypingdstackai/dstack | 2.3k | — | ~1.6k | Automated safety check: Pass | MPL-2.0 | |
| One EvalOpenDCAI/One-Eval | 165 | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Add Jit Kernelguqiong96/Lsglang | 143 | 1 repos | ~10k | Automated safety check: Pass | Apache-2.0 | |
| SGLang Structured ServingOrchestra-Research/AI-Research-SKILLs | 13k | 3 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Hyperloom Workload Optimizeramd/skills | 398 | — | ~1.7k | Automated safety check: Notes | MIT |
dstackai/dstack
Use with the dstack skill for model-serving work when the image, serving command, resources, backend/fleet choice, or service behavior is not proven.
OpenDCAI/One-Eval
驱动 One-Eval 对 API 或本地模型做端到端评测,覆盖纯文本、多模态、代码生成、函数调用和 Agent benchmark。当用户想评测模型在一个或多个 benchmark 上的表现、比较分数、补充 metric,或生成图文评测报告时使用本 skill。
guqiong96/Lsglang
Step-by-step tutorial for adding a new lightweight JIT CUDA kernel to sglang's jitkernel module
Orchestra-Research/AI-Research-SKILLs
Covers serving LLMs with SGLang, whose RadixAttention reuses cached prefixes, and constraining output to JSON, regex or grammar for agent and tool-calling workloads.
amd/skills
Autonomously optimizes end-to-end LLM inference throughput on AMD Instinct GPUs and reports a validated gain, using the Hyperloom multi-agent optimizer.
BBuf/AI-Infra-Auto-Driven-SKILLS
Compares SGLang, vLLM, TensorRT-LLM and TokenSpeed on one model and workload, searching server flags to find the best deployment command within a latency SLA.
sgl-project/sglang
Replay-first debug flow for SGLang serving problems. An agent skill from sgl-project/sglang.
sgl-project/sglang
Unified LLM torch-profiler triage skill for sglang, vllm, TensorRT-LLM, and TokenSpeed.
sgl-project/sglang
Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.
sgl-project/sglang
Compute the optimal --mamba-full-memory-ratio (or --max-mamba-cache-size pin) for a hybrid attention + linear-attention (Mamba / GDN / KDA) model's two serving memory pools, from the workload and…
sgl-project/sglang
Debug hanging issues in SGLang distributed inference (TP/PP/DP/EP).
sgl-project/sglang
Conventions for SGLang environment variables — where to define, how to access, how to name, and how to deprecate.
Categories
Code style for SGLang large classes Scheduler, TokenizerManager, and ModelRunner: frozen-code conventions and init orchestration style. Large Class Style is an agent skill from sgl-project/sglang. Code style for SGLang large classes Scheduler, TokenizerManager, and ModelRunner: frozen-code conventions and init orchestration style.
Large Class Style fits situations like: modifying any of these three classes; reviewing changes to them.
Run `npx skills add sgl-project/sglang --skill large-class-style -a claude-code`. Or copy the skill folder (.agents/skills/large-class-style in sgl-project/sglang) into .claude/skills/large-class-style in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sgl-project/sglang --skill large-class-style -a codex`. Or copy the skill folder (.agents/skills/large-class-style in sgl-project/sglang) into .agents/skills/large-class-style in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sgl-project/sglang --skill large-class-style -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/large-class-style, .gemini/skills/large-class-style, .github/skills/large-class-style and .opencode/skills/large-class-style in your project.
SKILL.md names no scripts, command-line tools or credentials: Large Class Style is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Large Class Style is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Large Class Style: Dstack Prototyping (dstackai/dstack, 2.3k stars), One Eval (OpenDCAI/One-Eval, 165 stars), Add Jit Kernel (guqiong96/Lsglang, 143 stars) and SGLang Structured Serving (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sgl-project (a GitHub organization) maintains it in sgl-project/sglang, which has 36,851 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 8, 2026.
Source: sgl-project/sglang on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.