write-sglang-test

Write SGLang CI and unit tests following project conventions.

3|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/moirai-internal/sglang --skill write-sglang-test-moirai-internal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-sglang-test
Source: https://github.com/moirai-internal/sglang/tree/main/.claude/skills/write-sglang-test
Command: npx skills add https://github.com/moirai-internal/sglang --skill write-sglang-test-moirai-internal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and template for writing robust Continuous Integration (CI) and Unit Tests (UT) for the SGLang project, ensuring consistency and adherence to established conventions.

Core Features & Use Cases

  • Standardized Test Structure: Enforces the use of CustomTestCase and specific directory structures (test/registered/).
  • Fixture Management: Guides on reusing server fixtures and launching test servers efficiently.
  • Model Selection: Recommends appropriate models for different test scenarios (e.g., small models for basic functionality, 8B for performance).
  • CI Integration: Details how to register tests for CI pipelines using register_cuda_ci and select appropriate test suites.
  • Use Case: When a developer needs to add a new test for a recently implemented SGLang feature, this Skill will guide them through the entire process, from setting up the test environment to registering it for CI.

Quick Start

Use the write-sglang-test skill to generate a template for a new SGLang unit test.

Frequently Asked Questions about write-sglang-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write SGLang unit tests following project conventions?

To write SGLang unit tests, use the CustomTestCase structure and place files in the test/registered/ directory to ensure maintainability. This enforces a standardized test structure across the project.

How do I register SGLang tests for CI pipelines?

To register SGLang tests for CI pipelines, use the register_cuda_ci function and select the appropriate test suites for your specific test scenario. This ensures your tests are correctly integrated into the continuous integration workflow.

What models should I use for SGLang testing?

For SGLang testing, you should select appropriate models based on the scenario: use small models for basic functionality verification and 8B models for performance testing. This ensures efficient and relevant test coverage.

How do I manage server fixtures when testing SGLang?

When testing SGLang, you should reuse existing server fixtures and follow guidelines for launching test servers efficiently. This approach minimizes resource overhead and speeds up test execution.

Does SGLang test development require specific directory placement?

Yes, SGLang test development requires correct test file placement within the project structure, specifically inside the test/registered/ directory. Adhering to strict file placement rules ensures maintainability and reliability.