Agent skill

Speculative Naming

by sgl-project in sgl-project/sglang

Naming conventions for SGLang speculative decoding identifiers.

Apache-2.0Auto-check passedDevOps & Cloud

Install Speculative Naming

skills CLI
$ npx skills add sgl-project/sglang --skill speculative-naming -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sgl-project/sglang speculative-naming --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sgl-project/sglang.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/speculative-naming .claude/skills/speculative-naming && rm -rf skills-src

Use ~/.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/

Facts

Skill name
speculative-naming
GitHub stars
37k
Used in
2 other repos
Token cost
~1.6k tokens
SKILL.md length
599 words
Files
1
Skills in repo
32
Repo updated
First seen
Licence
Apache-2.0

At a glance

Naming conventions for SGLang speculative decoding identifiers.

  • Reviewing identifiers in speculative decoding code — anything under python/sglang/srt/speculative/
  • SKILL.md covers Rule 1 — Verb form, drop -ed, Rule 2 — The extra/bonus token…, Rule 3 — accept includes… and Rule 4 — num_ for counts; _ct…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Related attention backends

What it does

Speculative Naming is an agent skill from sgl-project/sglang. Naming conventions for SGLang speculative decoding identifiers. Use when adding, renaming, or reviewing identifiers in speculative decoding code — anything under python/sglang/srt/speculative/, related attention backends, scheduler accumulators, IPC fields, observability metrics, or CLI flags.

Its SKILL.md is about 1.6k 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 DevOps & Cloud, covering LLM inference and serving and Observability. 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.

When your agent uses it

  • Reviewing identifiers in speculative decoding code — anything under python/sglang/srt/speculative/
  • Related attention backends
  • Scheduler accumulators
  • Observability metrics

Example prompts

  • “/speculative-naming”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit f620d73. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Speculative Naming loads about 1.6k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 599 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from sgl-project/sglang at commit f620d73, republished under its Apache-2.0 licence (© sgl-project). 599 words, ~1,569 tokens.

Download SKILL.mdSave it as .claude/skills/speculative-naming/SKILL.md (or your agent's skills folder).
name
speculative-naming
description
Naming conventions for SGLang speculative decoding identifiers. Use when adding, renaming, or reviewing identifiers in speculative decoding code — anything under `python/sglang/srt/speculative/`, related attention backends, scheduler accumulators, IPC fields, observability metrics, or CLI flags.

Speculative Decoding — Naming Conventions

Apply this skill when adding, renaming, or reviewing identifiers in speculative decoding code (anything under python/sglang/srt/speculative/, related attention backends, scheduler accumulators, IPC fields, observability metrics, or CLI flags).

Rule 1 — Verb form, drop -ed

Use the verb form accept everywhere. Don't use the past-participle form accepted.

Don'tDo
num_accepted_tokensnum_accept_tokens
accepted_indicesaccept_indices
accepted_token_idsaccept_tokens (also see Rule 3)

Rule 2 — The extra/bonus token is bonus_token / bonus_tokens

The "+1" token that the target model always emits in addition to verifying drafts is the bonus token. Use bonus_token / bonus_tokens per Rule 7.

Don'tDo
verified_id / verified_idsbonus_token / bonus_tokens
output_id / output_ids (when referring to the bonus)bonus_token / bonus_tokens

req.output_ids (the full output history of a request) is unrelated and stays as is.

Rule 3 — accept includes bonus; correct excludes bonus

The semantic distinction lives in the verb, not the noun. Don't enumerate noun pairs.

VerbMeaning
accept_*Includes the bonus token
correct_*Drafts only, no bonus

Pair with whatever noun fits the data (tokens, drafts, indices, …). No required pairing, but preferred default nouns: accept_tokens and correct_drafts — correct semantically describes drafts (what got verified), accept describes the resulting token sequence (incl. bonus).

FormMeaning
accept_tokens / accept_indicesInclude bonus
correct_draftsDrafts only, no bonus
num_accept_tokensCount incl. bonus
num_correct_draftsCount excl. bonus
Exception: accept_rate / accept_length follow paper convention

These two metric names are entrenched in the spec-decoding literature and in external-facing fields (meta_info, Prometheus). Their semantics are paper-defined, not Rule-3-defined:

NamePaper termBonus?Definition
accept_rate$\alpha$ (Leviathan 2023)Noper-draft-token acceptance probability = correct_drafts / proposed_drafts
accept_length$\tau$ (EAGLE)Yesavg tokens per verify step = completion_tokens / verify_ct

Internal counters still follow Rule 3 strict semantics: num_correct_drafts (no bonus), num_accept_tokens (with bonus).

Rule 4 — num_ for counts; _ct for counters; _rate for rates; no prefix for IDs

Each form has its own marker. Never mix (no num_X_ct, no num_accept_rate).

FormPatternMeaningExamples
Countnum_XSnapshot quantity at one point in time (often a tensor or scalar)num_accept_tokens, num_correct_drafts, num_proposed_drafts
CounterX_ctMonotonically incrementing accumulator over timespec_verify_ct, forward_ct
Rate / ratioX_rateFractional value in [0, 1]accept_rate
Tokens / content arrayno prefixThe actual token data, not a countaccept_tokens, correct_drafts, bonus_token
Show full SKILL.md (239 more words)Show less

Rule 5 — Drop redundant _token_id / _token_ids suffix in spec scope

_id / _ids and _token / _tokens are both fine. But don't combine — _token_id / _token_ids is redundant inside spec decoding, because spec code only ever deals with vocab integers.

The semantic differs by scope:

ScopeExampleWhat _token_id means
Framework / multimodal / tokenizerimage_token_id, pad_token_id, eos_token_id, mask_token_id, bos_token_idA specific named/role token's vocab ID. The prefix names the role; _token_id says it's the integer ID for that role. Both halves carry information.
Spec decodingaccepted_token_ids, curr_token_id, out_token_idsRedundant. Spec only deals with vocab integers; _id adds nothing beyond _token.
Renames
Don'tDo
accepted_token_idsaccept_tokens (Rule 1 + 3)
curr_token_idcurrent_token
out_token_idsout_tokens
_resolve_spec_overlap_token_ids_resolve_spec_overlap_tokens

Rule 6 — Singular vs plural

Plural for any non-scalar tensor ([bs]-shaped, flat, or multi-dim); singular only for scalars (kernel tl.load results, single-int locals). Applies to all spec-decoding tensors (tokens, indices, etc.).

python
accept_tokens: torch.Tensor     # [total_accepted] flat - plural
accept_indices: torch.Tensor    # [bs, num_draft_tokens] - plural
draft_tokens: torch.Tensor      # [bs * num_draft_tokens] flat - plural
bonus_tokens: torch.Tensor      # [bs] - plural
accept_token = tl.load(...)     # int32 scalar in a kernel iteration - singular
bonus_token = tl.load(...)      # int32 scalar inside a kernel - singular

Out of scope (these names stay as is)

These rules apply to spec-decoding-specific identifiers. Pre-existing or framework-level names are kept.

  • PyTorch / ecosystem: seq_lens, extend_seq_lens, cu_seqlens_q
  • Framework / multimodal vocab: image_token_id, pad_token_id, eos_token_id, mask_token_id, hot_token_id, bos_token_id, topk_id
  • Request-level state: req.input_ids, req.output_ids, req.origin_input_ids, next_token_ids (model_runner.sample output)
  • Frozen C++ kwargs: accept_token_num (sgl-kernel)
  • Non-token IDs: req_id, gpu_id, layer_id, program_id
  • _len / _lens names: num_X is preferred for counts (Rule 4), but _len / _lens names are acceptable. Triton kernel params in particular often use _lens / _len to align with the PyTorch ecosystem (seq_lens, cu_seqlens_q). Rule 1 still requires the -ed-less form (accept_length OK, accepted_length not).

© 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

Files

Just SKILL.md in .agents/skills/speculative-naming of sgl-project/sglang.

Open the folder on GitHubat commit f620d73

Used in 2 other repositories

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.

Compare with similar skills

Speculative Naming 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.

Speculative Naming compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Speculative Naming this skillsgl-project/sglang37k2 repos~1.6kAutomated safety check: PassApache-2.0
Hyperloom SetupAMD-AGI/Hyperloom218—~7.2kAutomated safety check: NotesCustom licence
Dstack Prototypingdstackai/dstack2.3k—~1.6kAutomated safety check: PassMPL-2.0
One EvalOpenDCAI/One-Eval165—~2.4kAutomated safety check: PassApache-2.0
Agent Kill Switchvivekchand/clawmetry426—~1.1kAutomated safety check: PassMIT
Clawmetry Selfcheckvivekchand/clawmetry426—~515Automated safety check: PassMIT

Similar skills

  • Hyperloom Setup

    AMD-AGI/Hyperloom

    Configures Hyperloom after pip install --target . An agent skill from AMD-AGI/Hyperloom.

    218 GitHub stars~7.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • 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.

    2.3k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • One Eval

    OpenDCAI/One-Eval

    驱动 One-Eval 对 API 或本地模型做端到端评测,覆盖纯文本、多模态、代码生成、函数调用和 Agent benchmark。当用户想评测模型在一个或多个 benchmark 上的表现、比较分数、补充 metric,或生成图文评测报告时使用本 skill。

    165 GitHub stars~2.4k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agent Kill Switch

    vivekchand/clawmetry

    Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry.

    426 GitHub stars~1.1k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Clawmetry Selfcheck

    vivekchand/clawmetry

    Read your own agent telemetry from ClawMetry (waste, progress, cost) and act on it before finishing a task.

    426 GitHub stars~515 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Dstack Presets

    dstackai/dstack

    Create and manage dstack presets: a toolkit that streamlines model inference optimization with agents, and a portable preset format.

    2.3k GitHub stars~403 tokensUpdated today
    DevOps & CloudAuto-check passed

More from sgl-project/sglang

All 32 skills in this repo
  • Sglang Prod Incident Triage

    sgl-project/sglang

    Replay-first debug flow for SGLang serving problems. An agent skill from sgl-project/sglang.

    37k GitHub starsUsed in 3 repos~2.1k tokens
    Auto-check passed
  • LLM Torch Profiler Analysis

    sgl-project/sglang

    Unified LLM torch-profiler triage skill for sglang, vllm, TensorRT-LLM, and TokenSpeed.

    37k GitHub starsUsed in 2 repos~6.4k tokens
    Auto-check passed
  • Babysit PR To Pass CI

    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.

    37k GitHub starsUsed in 2 repos~3k tokens
    Auto-check passed
  • Compute Mamba Ratio

    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…

    37k GitHub starsUsed in 2 repos~2.9k tokens
    Auto-check passed
  • Debug Distributed Hang

    sgl-project/sglang

    Debug hanging issues in SGLang distributed inference (TP/PP/DP/EP).

    37k GitHub starsUsed in 2 repos~2.4k tokens
    Auto-check passed
  • Env Var Conventions

    sgl-project/sglang

    Conventions for SGLang environment variables — where to define, how to access, how to name, and how to deprecate.

    37k GitHub starsUsed in 2 repos~2.9k tokens
    Auto-check passed

Works with

Questions about Speculative Naming

What does Speculative Naming do?

Naming conventions for SGLang speculative decoding identifiers. Speculative Naming is an agent skill from sgl-project/sglang. Naming conventions for SGLang speculative decoding identifiers.

When should I use Speculative Naming?

Speculative Naming fits situations like: reviewing identifiers in speculative decoding code — anything under python/sglang/srt/speculative/; related attention backends; scheduler accumulators; observability metrics.

How do I install Speculative Naming in Claude Code?

Run `npx skills add sgl-project/sglang --skill speculative-naming -a claude-code`. Or copy the skill folder (.agents/skills/speculative-naming in sgl-project/sglang) into .claude/skills/speculative-naming in your project. Claude Code loads it when a task matches its description.

How do I install Speculative Naming in Codex?

Run `npx skills add sgl-project/sglang --skill speculative-naming -a codex`. Or copy the skill folder (.agents/skills/speculative-naming in sgl-project/sglang) into .agents/skills/speculative-naming in your project. Codex loads it when a task matches its description.

Can I use Speculative Naming in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sgl-project/sglang --skill speculative-naming -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/speculative-naming, .gemini/skills/speculative-naming, .github/skills/speculative-naming and .opencode/skills/speculative-naming in your project.

What does Speculative Naming need to run?

SKILL.md names no scripts, command-line tools or credentials: Speculative Naming is instructions for the agent only. Our summary lists: Python 3.

Does Speculative Naming access the network?

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.

Is Speculative Naming safe to install?

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.

What licence does Speculative Naming use?

Speculative Naming 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.

How many tokens does Speculative Naming use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Speculative Naming?

Skills that share tags, products or a category with Speculative Naming: Hyperloom Setup (AMD-AGI/Hyperloom, 218 stars), Dstack Prototyping (dstackai/dstack, 2.3k stars), One Eval (OpenDCAI/One-Eval, 165 stars) and Agent Kill Switch (vivekchand/clawmetry, 426 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Speculative Naming?

sgl-project (a GitHub organization) maintains it in sgl-project/sglang, which has 36,907 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 9, 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.