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.
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.
curl -O https://raw.githubusercontent.com/sgl-project/sglang/main/.agents/skills/write-sglang-test/SKILL.mdgit clone --depth 1 https://github.com/sgl-project/sglangWrote 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.
[](https://agentmods.dev/skills/sgl-project/sglang/write-sglang-test)<a href="https://agentmods.dev/skills/sgl-project/sglang/write-sglang-test"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/write-sglang-test/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.
<a href="https://agentmods.dev/skills/sgl-project/sglang/write-sglang-test"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/write-sglang-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Data Exfiltration · line 225 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 275 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00088 | $0.05294 |
| Opus 5.5 | $0.00035 | $0.02118 |
| Sonnet 5.5 | $0.00018 | $0.01059 |
| Haiku 4.5 | $0.00009 | $0.00529 |
Grade A, and why
write-sglang-test 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 14d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
response = requests.post( How it starts
The opening of the file, as written. The whole thing — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing SGLang CI / UT Tests
Apply kernel-organization for the public operator namespace, logical grouping, lazy registry metadata, and test placement. The implementation tutorial below does not replace that API contract.
This skill covers how to write and register tests. For CI pipeline internals (stage ordering, fail-fast, gating, partitioning, debugging CI failures), see the CI workflow guide. Whether a case is worth adding at all is decided by unit-test-admission — read it before writing the case, not after.
Core Rules
- Always use
CustomTestCase— never rawunittest.TestCase. It ensurestearDownClassruns even whensetUpClassfails, preventing resource leaks in CI. tearDownClassmust shut the server down gracefully — callterminate_and_kill_process_tree(cls.process), never a barekill_process_tree. SIGKILL alone skips the server's userspace cleanup and leaves its GPU memory charged to the dead process; the next class then OOMs while loading weights. Keep it defensive too:hasattr/null checks before accessing resources (e.g.cls.process) thatsetUpClassmay not have finished allocating.- Place non-kernel tests in
test/registered/<kind>/<subsystem>/—<kind>isunit,e2e,accuracy,perf, orstress; kernel tests usetest/registered/kernels/{ops,benchmark}/<group>/; hardware belongs in registrations, not directory names - Reuse server fixtures — inherit from
DefaultServerBaseor writesetUpClass/tearDownClasswithpopen_launch_server - Mock boundaries, not SGLang behavior — mock slow or external dependencies only when the assertion still checks an observable result, state transition, or error. A test whose evidence is only
assert_called*mirrors its mock and is not admissible. Launch a real server only when inference results or lifecycle behavior are the contract under test.
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.
- 14d ago Changed b3d9ac5c5960
- 1mo ago Changed · +4 lines f9bb83c36946
- 1mo ago Changed 78397e6e90a3
- 1mo ago Changed · -1 lines 9dc7f0c2eea6
- 1mo ago Changed · -18 lines ba2a0eccabc0
- 1mo ago Changed · +4 lines af716dea54a3
- 2mo ago First seen · 454 lines · 88 tokens per session scan A 9a916274d5d0
write-sglang-test is a skill published in the GitHub repository sgl-project/sglang (38,324 stars, last pushed today), licensed Apache-2.0. It adds 88 tokens to every session and 5,294 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
tdd-workflow
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
rust-testing
Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.
cpp-testing
Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.
golang-testing
Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.
swift-protocol-di-testing
Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.
neuron-test
Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…