Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/sgl-project/sglang/scripted-runtime-notesnpx skills add sgl-project/sglang --skill scripted-runtime-notesgit clone --depth 1 https://github.com/sgl-project/sglangWhat 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 | $0.00037 | $0.00435 |
| Opus 5 | $0.00018 | $0.00217 |
| Sonnet 5 | $0.00007 | $0.00087 |
| Haiku 4.5 | $0.00004 | $0.00044 |
Grade A, and why
scripted-runtime-notes 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 2d 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.
What it actually says
Scripted Runtime — Notes
Notes for anything related to the SGLang scripted runtime.
When to Add an API
Tests read r.req.* and t._scheduler.* directly — there is no encapsulation boundary. A thin wrapper buys zero isolation; it only grows the surface.
Add an API only if it does real work:
- Control primitive — drives the engine through a real path (
start_req,pause_generation,abort,evict_radix,exhaust_kv). Reuse the real path; never hand-mutate state. - Hook-backed — value cannot be read from a snapshot; accumulate via
scheduler_hook.on_run_batchor the recv proxy (chunks_done). Read-only; never monkey-patch; never add*_counttosrt/. - Multi-structure derivation, widely reused — scans
chunked_req+waiting_queue+running_batch+last_batch(is_idle,status,batch_composition).
Else: don't. Read r.req.X / t._scheduler.X in the test; inline single-use accessors.
Never:
- Weaken an assertion to fit a missing probe.
- Probe implementation details ("field non-None", "which branch ran") — assert the consequence.
Other Tips
- Engine-self-driven behavior: drive the real loop, don't call the private. Never synchronously call a scheduler private (e.g.
scheduler._abort_on_waiting_timeout()) from the harness/test — it runs at the wrong loop phase, bypasses the orderedrecv_requests→process_input_requestsinjection, and can fire in states the real loop never reaches (e.g. while paused). For sweeps the engine runs itself (timeout/idle), enable the config/env and advance the loop withyield.
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.
- 2d ago First seen · 30 lines · 37 tokens per session scan A 9d35487900f6
scripted-runtime-notes is a skill published in the GitHub repository sgl-project/sglang (32,926 stars, last pushed 2d ago), licensed Apache-2.0. It adds 37 tokens to every session and 435 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
perf-host-analysis
Analyze host/CPU overhead in TensorRT-LLM inference from nsys traces. Detect whether host overhead is the bottleneck using GPU idle ratio, host prep exposed ratio, and per-phase evidence. For regressions, isolate forward steps via allreduce/NVTX patterns, compare host operation breakdowns across versions, and identify…
perf-host-optimization
Profiles and optimizes TensorRT-LLM host/CPU overhead using lineprofiler (with nsys support planned). Runs iterative profile-analyze-optimize-validate rounds. Use when GPU utilization is low or optimizing PyExecutor throughput.
trtllm-model-onboard-multimodal
Onboard a HuggingFace multimodal model (vision/audio/video + text) to the TensorRT-LLM PyTorch backend. Use when writing a new tensorrtllm/torch/models/modeling .py plus its input processor and weight mapper, or extending an existing VLM. Not for AutoDeploy — use ad-model-onboard for that path.
ad-model-onboard
Translates a HuggingFace model into a prefill-only AutoDeploy custom model using reference custom ops, validates with hierarchical equivalence tests.
trtllm-case-executor
Run TensorRT-LLM test cases, benchmarks, evaluations, or custom scripts by checking the environment (local GPU or Slurm), selecting the appropriate Docker image, and executing either locally or via Slurm job submission. Accepts pre-built command strings — command construction for trtllm-bench, trtllm-eval, and…
trtllm-moe-develop
Review, design, and refactor TensorRT-LLM PyTorch MoE code for architecture fit, clean code, maintainability, and testability. Always use for any modification, review, refactor, or design planning that touches MoE modules, including tensorrtllm/torch/moe/fusedmoe, ConfigurableMoE, MoE backends…