Agent skill

Profile Serving

by sohu-mptc in sohu-mptc/FlashRec

Capture torch.profiler traces on a running FlashRec server. An agent skill from sohu-mptc/FlashRec.

Apache-2.0Auto-check passedDevelopment

Install Profile Serving

skills CLI
$ npx skills add sohu-mptc/FlashRec --skill profile-serving -a claude-code

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

GitHub CLI
$ gh skill install sohu-mptc/FlashRec profile-serving --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/sohu-mptc/FlashRec.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/profile-serving .claude/skills/profile-serving && 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
profile-serving
GitHub stars
107
Token cost
~312 tokens
SKILL.md length
64 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Capture torch.profiler traces on a running FlashRec server. An agent skill from sohu-mptc/FlashRec.

  • The user asks to profile
  • SKILL.md covers 采集 and 解读
  • Calls curl
  • Sglang.benchserving --profile

What it does

Profile Serving is an agent skill from sohu-mptc/FlashRec. Capture torch.profiler traces on a running FlashRec server. Use when the user asks to profile, trace, Chrome trace, startprofile, stopprofile, sglang.benchserving --profile, or 性能剖析.

Its SKILL.md is about 310 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 Development, covering Performance optimization. It works with SGLang. The repository describes itself as: FlashRec is a CUDA-graph engine for generative recommendation: wide beam search (3–5 SID steps, n=50–512+) over a trie-constrained catalog, in-process FP8 serving, and ranked… The licence is Apache-2.0.

When your agent uses it

  • The user asks to profile
  • Sglang.benchserving --profile

Example prompts

  • “/profile-serving”

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    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

Profile Serving loads about 312 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 64 words of instructions outside code blocks.

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

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 sohu-mptc/FlashRec at commit 1089682, republished under its Apache-2.0 licence (© sohu-mptc). 64 words, ~312 tokens.

Download SKILL.mdSave it as .claude/skills/profile-serving/SKILL.md (or your agent's skills folder).
name
profile-serving
description
Capture torch.profiler traces on a running FlashRec server. Use when the user asks to profile, trace, Chrome trace, start_profile, stop_profile, sglang.bench_serving --profile, or 性能剖析.

服务端 Profiling

接口与 SGLang 对齐,可直接给 sglang.bench_serving --profile 用。start/stop 在 GPU worker 线程上生效——不要在 HTTP 线程上包 torch.profiler。

采集

默认输出目录:FLASHREC_TORCH_PROFILER_DIR → SGLANG_TORCH_PROFILER_DIR → /tmp。 scripts/serve.sh 会设成仓库下 profiles/。

bash
curl -s -X POST http://127.0.0.1:8000/start_profile \
  -H 'Content-Type: application/json' \
  -d '{"output_dir":"./profiles","num_steps":20,"activities":["CPU","GPU"],"with_stack":true}'

curl -s -X POST http://127.0.0.1:8000/stop_profile

到 num_steps 会自动停。Body:output_dir、num_steps、start_step、 activities(CPU/GPU)、profile_by_stage、with_stack、record_shapes、 profile_prefix。

Chrome trace 区间名:flashrec.batch.wait / prefill / decode_fwd / expand / finalize。

解读

  • 窄 beam + 低并发:batch.wait 或单请求开销主导,不要据此调 graph
  • 宽 beam:看 expand 是否在 CUDA graph 内;eager expand 说明 bs % n != 0 或捕获宽度不够
  • finalize 过重:检查 FLASHREC_DENSE_FINALIZE(默认 1)
  • 对照 SGLang 时两侧都要用 FlashInfer,并关掉 SGLang overlap schedule

© sohu-mptc, 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 .claude/skills/profile-serving of sohu-mptc/FlashRec.

Open the folder on GitHubat commit 1089682

Compare with similar skills

Profile Serving 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.

Profile Serving compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Profile Serving this skillsohu-mptc/FlashRec107—~312Automated safety check: PassApache-2.0
LLM Torch Profiler Analysissgl-project/sglang37k2 repos~6.4kAutomated safety check: PassApache-2.0
SGLang Maintainer-Style ReviewBBuf/AI-Infra-Auto-Driven-SKILLS925—~4.6kAutomated safety check: PassNone
LLM Torch Profiler Trace AnalysisBBuf/AI-Infra-Auto-Driven-SKILLS925—~2.8kAutomated safety check: PassNone
Sglang Diffusion Benchmark Profilesgl-project/sglang37k2 repos~2.4kAutomated safety check: PassApache-2.0
LLM Pipeline Profiler AnalysisBBuf/AI-Infra-Auto-Driven-SKILLS925—~3.9kAutomated safety check: PassNone

Similar skills

  • 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
    DevelopmentAuto-check passed
  • SGLang Maintainer-Style Review

    BBuf/AI-Infra-Auto-Driven-SKILLS

    Reviews SGLang changes the way its maintainers do, drawing on a bundled corpus of public PR review threads and a flowchart of how the diff runs.

    925 GitHub stars~4.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • LLM Torch Profiler Trace Analysis

    BBuf/AI-Infra-Auto-Driven-SKILLS

    Analyzes Torch Profiler traces from SGLang, vLLM and TensorRT-LLM servers into kernel attribution, overlap and fusion tables.

    925 GitHub stars~2.8k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • A skill your agent uses when benchmarking denoise latency or profiling a diffusion bottleneck in SGLang.

    37k GitHub starsUsed in 2 repos~2.4k tokens
    AI & LLM EngineeringAuto-check passed
  • LLM Pipeline Profiler Analysis

    BBuf/AI-Infra-Auto-Driven-SKILLS

    Breaks LLM torch profiler traces down by forward pass, layer and kernel, with timing tables and Perfetto time ranges for the layers you want to inspect.

    925 GitHub stars~3.9k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Graphsignal

    graphsignal/graphsignal

    Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.

    257 GitHub stars~6.2k tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check passed

More from sohu-mptc/FlashRec

  • Model Deploy

    sohu-mptc/FlashRec

    Deploy and serve GenRec checkpoints with FlashRec (install, serve.sh, SID trie, wide-beam knobs, health/curl, FP8, profiling).

    107 GitHub stars~974 tokensUpdated 8 days ago
    Auto-check passed
  • Recif Eval

    sohu-mptc/FlashRec

    Run RecIF beam×concurrency eval and FlashRec vs SGLang/vLLM/TRT-LLM baselines.

    107 GitHub stars~915 tokensUpdated 8 days ago
    Auto-check passed
  • Sid Catalog

    sohu-mptc/FlashRec

    Build SID trie catalogs for FlashRec from OpenOneRec RecIF packed mappings.

    107 GitHub stars~468 tokensUpdated 8 days ago
    Auto-check passed
  • Add Model

    sohu-mptc/FlashRec

    给 FlashRec 引擎接入一个新模型架构(新的 HF checkpoint / 非 Qwen3 结构)。涵盖模型定义、权重合并加载、FP8 双路径、融合 kernel 接线、CUDA graph 兼容、精度校验、以及压测+trace 验证闭环。当用户要"增加/支持/接入新模型"时使用。

    107 GitHub stars~1.7k tokensUpdated 8 days ago
    Auto-check passed

Works with

Categories

Questions about Profile Serving

What does Profile Serving do?

Capture torch.profiler traces on a running FlashRec server. An agent skill from sohu-mptc/FlashRec. Profile Serving is an agent skill from sohu-mptc/FlashRec.profiler traces on a running FlashRec server.

When should I use Profile Serving?

Profile Serving fits situations like: the user asks to profile; sglang.benchserving --profile.

How do I install Profile Serving in Claude Code?

Run `npx skills add sohu-mptc/FlashRec --skill profile-serving -a claude-code`. Or copy the skill folder (.claude/skills/profile-serving in sohu-mptc/FlashRec) into .claude/skills/profile-serving in your project. Claude Code loads it when a task matches its description.

How do I install Profile Serving in Codex?

Run `npx skills add sohu-mptc/FlashRec --skill profile-serving -a codex`. Or copy the skill folder (.claude/skills/profile-serving in sohu-mptc/FlashRec) into .agents/skills/profile-serving in your project. Codex loads it when a task matches its description.

Can I use Profile Serving 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 sohu-mptc/FlashRec --skill profile-serving -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/profile-serving, .gemini/skills/profile-serving, .github/skills/profile-serving and .opencode/skills/profile-serving in your project.

What does Profile Serving need to run?

Going by SKILL.md and its folder, Profile Serving needs the command-line tools its instructions call (curl).

Does Profile Serving access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Profile Serving 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 Profile Serving use?

Profile Serving 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 Profile Serving use?

About 312 tokens (SKILL.md is roughly 1.2k 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 Profile Serving?

Skills that share tags, products or a category with Profile Serving: LLM Torch Profiler Analysis (sgl-project/sglang, 37k stars), SGLang Maintainer-Style Review (BBuf/AI-Infra-Auto-Driven-SKILLS, 925 stars), LLM Torch Profiler Trace Analysis (BBuf/AI-Infra-Auto-Driven-SKILLS, 925 stars) and Sglang Diffusion Benchmark Profile (sgl-project/sglang, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Profile Serving?

sohu-mptc (a GitHub organization) maintains it in sohu-mptc/FlashRec, which has 107 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 1, 2026.

Source: sohu-mptc/FlashRec on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.