Agent skill

Kernel Organization

by sgl-project in sgl-project/sglang

Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Kernel Organization

skills CLI
$ npx skills add sgl-project/sglang --skill kernel-organization -a claude-code

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

GitHub CLI
$ gh skill install sgl-project/sglang kernel-organization --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/kernel-organization .claude/skills/kernel-organization && 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
kernel-organization
GitHub stars
37k
Token cost
~1.3k tokens
SKILL.md length
606 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
Apache-2.0

At a glance

Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations.

  • Works in 5 steps: Search all runtime, test, benchmark,… → Keep tuning files with the GEMM that… → Preserve module singleton state: every… → …
  • AI & LLM Engineering work in your project
  • SKILL.md covers Choose the owner, Register the public entry point, Place and preserve tests and Verify a migration
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Kernel Organization is an agent skill from sgl-project/sglang. Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations. Use with add-jit-kernel, add-sgl-kernel, and write-sglang-test for placement and migration checks.

Its SKILL.md is about 1.3k 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. 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

  • AI & LLM Engineering work in your project

Example prompts

  • “/kernel-organization”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Search all runtime, test, benchmark, documentation, patch-string, and lazy
  2. Keep tuning files with the GEMM that loads them and preserve relative lookup
  3. Preserve module singleton state: every runtime caller must import the same
  4. Separate relocation commits from semantic changes. Use
  5. Run the namespace/dispatch CPU tests, the registered-test validation hook,

What it can do on your machine

Read from SKILL.md and the folder at commit 1c42ad3. 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.

    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

Kernel Organization loads about 1.3k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 606 words of instructions outside code blocks.

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

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 1c42ad3, republished under its Apache-2.0 licence (© sgl-project). 606 words, ~1,252 tokens.

Download SKILL.mdSave it as .claude/skills/kernel-organization/SKILL.md (or your agent's skills folder).
name
kernel-organization
description
Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations. Use with add-jit-kernel, add-sgl-kernel, and write-sglang-test for placement and migration checks.

Kernel organization

Read python/sglang/kernels/README.md and test/README.md before choosing a location. RFC #29630 establishes the namespace; subsequent migrations #32148 and #40922 clarify logical grouping and remove the old _jit_ filename prefix.

Choose the owner

  • Put callable SGLang kernel APIs under sglang.kernels.ops.<group>. Runtime and integration tests import from that namespace, including its submodules. The sgl_kernel wheel retains its own public API and packaging tests.
  • Group by computation, not model or GPU: GEMM and GEMV in gemm, expert routing in moe, attention index selection in attention, sampling in sampling, normalization in layernorm. A quantized GEMM is still a GEMM; quantization alone belongs in quantization.
  • Model-specific files/subpackages and tuning data are allowed inside a logical group. Do not add a model bundle or an implementation file directly under ops/. Propose a new logical group only for a distinct responsibility, and update ops._GROUPS, documentation, and tests together.
  • Classify a fused operator by its complete contract. Do not split a fused kernel into separate launches just to separate norm, RoPE, or quantization. Split unrelated public entry points that happen to share a source file.
  • Keep shared CUDA build/runtime infrastructure in kernels/jit; operator wrappers call it from their logical group. Keep process groups, communicator state, model dispatch, and buffer ownership in srt. K3-specific adapters in srt/layers/communication/ need not pretend to be generic interfaces.

Register the public entry point

Add lazy KernelSpec metadata in the owning group's __init__.py, or use the existing BaseFusedOp registration when the operation has interchangeable backends. Group imports must not import GPU implementations or compile kernels.

Use <group>.<name> for the op id and module:callable for the target. Preserve existing backend dispatch and describe actual device/architecture restrictions with CapabilityRequirement; JIT/AOT are not device types. Input shape/dtype checks remain part of the entry point's contract. Registering a torch custom op does not register it in the SGLang kernel inventory. Predicates, private JIT factories, reference helpers, and runtime classes are not separate kernel APIs.

Show full SKILL.md (289 more words)Show less

Place and preserve tests

  • Kernel numerical tests: test/registered/kernels/ops/<group>/.
  • CI microbenchmarks: test/registered/kernels/benchmark/<group>/.
  • Inventory/selector tests: test/registered/unit/kernels/.
  • Runtime unit tests: test/registered/unit/<subsystem>/, following the tested runtime module. A CUDA allocation does not make a runtime test a kernel test.
  • Non-CI smoke scripts and benchmarks: test/manual/kernels/; do not leave standalone test/benchmark entry points in production operator modules.
  • Shared test helpers: sglang.test.kernels. Preserve vendored upstream trees and AOT wheel packaging boundaries instead of reorganizing them incidentally.

For a move/split, preserve assertions, parametrization, fixtures, platform skips, execution entry points, and CI stages/runners. Apportion existing time estimates across split files; do not duplicate the original budget for every output file or silently drop a registration. Follow write-sglang-test for CI registration.

Verify a migration

  1. Search all runtime, test, benchmark, documentation, patch-string, and lazy registry references before deleting the old path. Check relative imports and package re-exports as well as direct imports. Do not leave forwarding shims.
  2. Keep tuning files with the GEMM that loads them and preserve relative lookup behavior. Check wheel/package inclusion as well as source-tree execution.
  3. Preserve module singleton state: every runtime caller must import the same new communication adapter, not a second copy of its buffer registry.
  4. Separate relocation commits from semantic changes. Use mechanical-refactor-verify to reproduce moves, and compare test inventories and CI registration coverage before/after. Only delete an experimental path after checking its call sites, flags, source, and dedicated tests together.
  5. Run the namespace/dispatch CPU tests, the registered-test validation hook, pre-commit, and relevant GPU tests when available. State exactly which GPU checks ran; import/AST checks do not prove numerical or performance parity.

Do not infer violations solely from a model name inside a group, a missing _jit_ prefix, use of a runtime utility, or absence of BaseFusedOp inheritance.

© 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/kernel-organization of sgl-project/sglang.

Open the folder on GitHubat commit 1c42ad3

Compare with similar skills

Kernel Organization 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.

Kernel Organization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kernel Organization this skillsgl-project/sglang37k—~1.3kAutomated safety check: PassApache-2.0
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Clean Startup Logguqiong96/Lsglang1431 repos~4.5kAutomated safety check: PassApache-2.0
Gptqmodel Tokenizer NormalizationModelCloud/GPTQModel1.3k—~1.1kAutomated safety check: PassCustom licence
slime RL Post-TrainingOrchestra-Research/AI-Research-SKILLs13k5 repos~2.8kAutomated safety check: PassMIT
SGLang Structured ServingOrchestra-Research/AI-Research-SKILLs13k3 repos~2.9kAutomated safety check: PassMIT

Similar skills

  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Clean Startup Log

    guqiong96/Lsglang

    Clean up noisy startup warnings and spurious prints in SGLang server logs.

    143 GitHub starsUsed in 1 repo~4.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Diagnose and correct GPT-QModel tokenizer initialization, tokenization normalization, special-token handling, prompt rendering, and chat-template problems.

    1.3k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • slime RL Post-Training

    Orchestra-Research/AI-Research-SKILLs

    Guides reinforcement-learning post-training of LLMs with slime, which pairs Megatron-LM training with SGLang rollouts, including GRPO runs on GLM, Qwen3 and Llama 3 models.

    13k GitHub starsUsed in 5 repos~2.8k tokens
    AI & LLM EngineeringAuto-check passed
  • SGLang Structured Serving

    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.

    13k GitHub starsUsed in 3 repos~2.9k tokens
    AI & LLM EngineeringAuto-check passed
  • verl RL Training

    Orchestra-Research/AI-Research-SKILLs

    Trains LLMs with reinforcement learning using verl, from ByteDance's Seed team, with GRPO, PPO and other algorithms and swappable training and rollout backends.

    13k GitHub starsUsed in 3 repos~2.4k tokens
    AI & LLM EngineeringAuto-check passed

More from sgl-project/sglang

All 31 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 Kernel Organization

What does Kernel Organization do?

Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations. Kernel Organization is an agent skill from sgl-project/sglang. Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations.

When should I use Kernel Organization?

Kernel Organization fits situations like: AI & LLM Engineering work in your project.

How do I install Kernel Organization in Claude Code?

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

How do I install Kernel Organization in Codex?

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

Can I use Kernel Organization 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 kernel-organization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kernel-organization, .gemini/skills/kernel-organization, .github/skills/kernel-organization and .opencode/skills/kernel-organization in your project.

What does Kernel Organization need to run?

SKILL.md names no scripts, command-line tools or credentials: Kernel Organization is instructions for the agent only.

Does Kernel Organization 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 Kernel Organization 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 Kernel Organization use?

Kernel Organization 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 Kernel Organization use?

About 1.3k tokens (SKILL.md is roughly 5k 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 Kernel Organization?

Skills that share tags, products or a category with Kernel Organization: SageMaker Serving Image Selection (huggingface/skills, 11k stars), Clean Startup Log (guqiong96/Lsglang, 143 stars), Gptqmodel Tokenizer Normalization (ModelCloud/GPTQModel, 1.3k stars) and slime RL Post-Training (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.

Who maintains Kernel Organization?

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