sglang: Skill for Claude Code

.agents/skills/processor-model-parity/SKILL.md

processor-model-parity is a skill for Claude Code, Codex from sgl-project/sglang. It costs 84 tokens per session (3,949 once invoked), scanned A, original, Apache-2.0.

A Rust implementation and test process that makes SGLang's request rendering produce the same chat prompt and token IDs as its Python server path.

In plain words
What is it for?
Use it when adding or porting a model, updating its renderer, or debugging prompt and token differences in SGLang's Rust processor.
Why use it?
It prevents Rust and Python serving paths from interpreting the same chat request differently, while keeping output parsing and image processing outside its scope.

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 →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python tests/scripts/generate_parity.py tests/fixtures/parity/<model-id>.json.

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/processor-model-parity/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 processor-model-parity

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sgl-project/sglang/processor-model-parity"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/processor-model-parity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,949 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.
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.00084 $0.03949
Opus 5.5 $0.00034 $0.01580
Sonnet 5.5 $0.00017 $0.00790
Haiku 4.5 $0.00008 $0.00395

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

Security

Grade A, and why

processor-model-parity 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 3d 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/processor-model-parity/SKILL.md · 249 lines

How it starts

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

Processor model parity

rust/sglang-processor renders chat requests for SGLang's Rust hosts (the Rust server, sgl-router, the renderer). A model is supported only when, for the same request body, the processor produces the same prompt text and the same prompt token ids as Python's OpenAIServingChat. Python is the reference, Dynamo is the implementation, and SGLang code exists only where the two differ.

Scope: the request -> prompt -> token ids path, plus the checks that let hosts serve the model's OpenAI requests through /generate (see "OpenAI layer"). Multimodal preprocessing is not covered here: render_request fails on media content parts, so hosts send those chats to the engine. The fixture generator serves every checkpoint text-only, so a media case records that rejection.

Done means

  • All text should work: every text chat the engine accepts renders and tokenizes in the processor (sgl-router's AllText). Only what SGLang rejects or the processor cannot reproduce goes to the engine; list it in the PR.
  • Chat and completions go through the engine's /generate, with the router rendering, tokenizing and parsing (lower_chat, lower_completion); the engine's OpenAI route is only the Unsupported fallback. That needs the cookbook's --reasoning-parser and --tool-call-parser ported. Verify the route against a live engine.

The worked example is DeepSeek-V4-Flash-0731: src/render/models/deepseek_v4.rs plus tests/fixtures/parity/deepseek-v4-flash-0731.json. Paths below are relative to rust/sglang-processor/ unless they start with python/.

Where a model's code goes

Piece File Needed when
Identity -> formatter src/render/selection.rs (select_chat_formatter) always; mirror the order of chat_encoding.resolve_chat_encoding_spec
Formatter variant src/render/mod.rs (ChatFormatter, its render_request arm, plus the render_prompt, stop_strs and resolve_thinking arms) always
SGLang-specific steps src/render/models/<model>.rs, re-exported in models/mod.rs only where Dynamo diverges from Python
Parity cases tests/fixtures/parity/<model-id>.json always
README row the render table in README.md always

Read the full file on GitHub · 249 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. 3d ago Changed · -1 lines 8b7bc5ff227a
  2. 14d ago Changed · +37 lines b4146219263f
  3. 18d ago Changed · +1 lines 7756d6f98e15
  4. 19d ago Changed · +19 lines c3c5a0fea32b
  5. 20d ago First seen · 193 lines · 84 tokens per session scan A 39151872c99c

Subscribe to this mod's changes

processor-model-parity is a skill published in the GitHub repository sgl-project/sglang (38,324 stars, last pushed today), licensed Apache-2.0. It adds 84 tokens to every session and 3,949 once invoked, about $0.0003 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-10-09.