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/.claude/skills/mechanical-refactor-verify/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/mechanical-refactor-verify)<a href="https://agentmods.dev/skills/sgl-project/sglang/mechanical-refactor-verify"><img src="https://agentmods.dev/badge/skills/sgl-project/sglang/mechanical-refactor-verify.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00068 | $0.01387 |
| Opus 5 | $0.00034 | $0.00694 |
| Sonnet 5 | $0.00014 | $0.00277 |
| Haiku 4.5 | $0.00007 | $0.00139 |
Grade A, and why
mechanical-refactor-verify 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mechanical Refactor — Machine-Checkable Verification
1. Overview
- The correctness of a mechanical change (file split, function move, module extraction, rename) must be machine-checkable, not eyeballed — the proof is something anyone can re-run, whoever made the change and whenever.
- One property: a commit is a pure relocation. One proof: reproduce — regenerate the move from the base commit with faithful primitives, run the formatter, byte-diff against the target.
- Empty diff = the proof. Any residual = a bundled non-move change, surfaced for review.
- A reshape must not ride along: split into optional prepare + certified move +
optional postpare (
guide-split.md).
2. Commands — what do you want to do?
The skill takes an argument naming one of three commands; invoked without one, pick the row matching your task.
split <base>..<tip>— author a compliant refactor branch: split it into commits, satisfy the contract (extract, move, file split) →guide-split.md: §1 splits the PR into classified pieces (the chain contract: classification format, correct labeling, proofs PASS, non-mechanical commits correctness-reviewed); §2 splits one piece into prepare + move + postpare (the case recipes and the anti-patterns). The argument is the chain to author (or a single commit / a description of the change to split).construct <base>..<tip> [--match REGEX] [--out DIR]— construct the proof, for the chain or one commit →guide-construct-proof.md: §1 generates + publishes the whole chain's proof folder (the flags are the generator's:scripts/mechanical_refactor_proof_generator.py <base>..<tip> --match REGEX --out DIR); §2 proves a single commit — pass just<commit>(the generator, or a hand-writtenReprowhen it reportsUNSUPPORTED).verify --base <base> --branch <branch> --proof <folder> [--jobs N] [--skip-passed]— verify someone's proof: a whole chain / PR branch →guide-verify-proof.md: run the chain verifier with exactly these flags (scripts/mechanical_refactor_reproduction_cli.py) — it checks every commit declaresmechanical_provableornon_mechanical_provable, runs every provable commit's proof (never a sample), and writes one full report; then audit the authored surfaces and theHUMAN_REVIEWrows. Re-running one commit's script is for diagnosis only.- Decide whether a change counts as a clean move →
spec-reproduction-utils.md: the property, the whole whitelist / not-allowed list, and each primitive's contract. The source of truth for the reproduction module; if any other file disagrees, it wins. - Change this skill itself (edit the engine, the generator, or the spec) →
guide-modify-skill.md: the spec-leads rule, the faithfulness invariant, and the testing bar a change must clear before it is trusted.
What ships with it
40 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- guide-construct-proof.md 8.6 KB
- guide-modify-skill.md 6.3 KB
- guide-split.md 19 KB
- guide-verify-proof.md 8.3 KB
- scripts/mechanical_refactor_proof_generator.py 63 KB runs code
- scripts/mechanical_refactor_reproduction_cli.py 18 KB runs code
- scripts/mechanical_refactor_reproduction_utils.py 64 KB runs code
- scripts/tests/proof_generator/conftest.py 559 B runs code
- scripts/tests/proof_generator/generator_testlib.py 3.1 KB runs code
- scripts/tests/proof_generator/test_infer_extract_functions.py 10 KB runs code
- scripts/tests/proof_generator/test_infer_extracts.py 6.6 KB runs code
- scripts/tests/proof_generator/test_infer_imports.py 5.1 KB runs code
- scripts/tests/proof_generator/test_infer_moves.py 17 KB runs code
- scripts/tests/proof_generator/test_main_single_commit.py 2.1 KB runs code
- scripts/tests/proof_generator/test_script_and_diff.py 6.7 KB runs code
- scripts/tests/reproduction_cli/cli_testlib.py 1.8 KB runs code
- scripts/tests/reproduction_cli/conftest.py 514 B runs code
- scripts/tests/reproduction_cli/test_classification.py 4.0 KB runs code
- scripts/tests/reproduction_cli/test_proof_discovery.py 3.3 KB runs code
- scripts/tests/reproduction_cli/test_report.py 3.3 KB runs code
- scripts/tests/reproduction_cli/test_skip_passed.py 6.0 KB runs code
- scripts/tests/reproduction_cli/test_verify_chain.py 7.4 KB runs code
- scripts/tests/reproduction_utils/conftest.py 841 B runs code
- scripts/tests/reproduction_utils/reproduction_testlib.py 1.2 KB runs code
- scripts/tests/reproduction_utils/test_add_imports.py 9.4 KB runs code
- scripts/tests/reproduction_utils/test_call_sites.py 8.0 KB runs code
- scripts/tests/reproduction_utils/test_delete_file.py 2.3 KB runs code
- scripts/tests/reproduction_utils/test_extract_function.py 6.3 KB runs code
- scripts/tests/reproduction_utils/test_extract_symbols_to_new_module.py 8.7 KB runs code
- scripts/tests/reproduction_utils/test_extract_to_new_module.py 3.7 KB runs code
- scripts/tests/reproduction_utils/test_infra_helpers.py 5.3 KB runs code
- scripts/tests/reproduction_utils/test_move_assign.py 2.5 KB runs code
- scripts/tests/reproduction_utils/test_move_symbol_delegate.py 10 KB runs code
- scripts/tests/reproduction_utils/test_move_symbol.py 16 KB runs code
- scripts/tests/reproduction_utils/test_remove_import.py 5.2 KB runs code
- scripts/tests/reproduction_utils/test_remove_imported_name.py 6.2 KB runs code
- scripts/tests/reproduction_utils/test_repath_import.py 2.8 KB runs code
- scripts/tests/reproduction_utils/test_verify_and_run.py 6.4 KB runs code
- spec-reproduction-cli.md 8.3 KB
- spec-reproduction-utils.md 13 KB
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.
- 8d ago First seen · 83 lines · 68 tokens per session scan A 418574f04606
mechanical-refactor-verify is a skill published in the GitHub repository sgl-project/sglang (35,551 stars, last pushed today), licensed Apache-2.0. It adds 68 tokens to every session and 1,387 once invoked, about $0.0003 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-analyze
Launch and operate this repo's perf-analyze workflow, which DIAGNOSES a TensorRT-LLM serving deployment without applying changes — benchmark at one concurrency or a Pareto curve of them (tok/s/user vs tok/s/gpu), analytical SOL projection on by default (via the internal-perf-sol-analysis skill), nsys + torch-profiler…
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
copilotkit-debug
Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.
agent-merge-conflict-arbiter
Neutral arbiter for merge conflicts between two agents.
python-debugpy
Debug Python: pdb REPL + debugpy remote (DAP).
llama-factory
Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.